Think simple and practical ...
So First Question : Who is the Primary Actor?
Android Phone User is obviously Primary Actor.[ User ]
Then Ask : What can Primary Actor do with my application?
Forget the details and how you implement the system. Just simply ask the question above.
From given context it seems that Actor [ User ]
- Can Trigger Alarms When Shake Phone
- Can also Setup Alarms which will be triggered automatically when time is reached.
- Can Stop any Alarm when triggered
So Possible Use Cases: Trigger Alarm, Set-up Alarm, Stop Alarm
Then instead of just drawing diagrams lets write simple steps of Trigger Alarm Use Case Scenarious:
Use Case Name : Trigger Alarm
Primary Actor : Android Phone User
Trigger: Actor Shakes the Phone, or Alarm Trigger Time is passed-reached
Main Success Scenario:
A. User Shakes The Phone
- Our Android Application(OAA) detects the user shake
- OAA trigger the Alarm X
- .... 4 ....
B. An Alarm Trigger Time is passed-reached
- Our Android Application(OAA) check the current time and detects the triggers that time is passed-reached.
- OAA trigger the time passed-reached alarms. 3....
Now the question,
Stoping-Alarm is a real use case? Or just a step of a Trigger Alarm use case scenario?
You can discover it while writings use case for it on your context. For me stopping an alarm is seem to be just a step in Trigger Alarm scenario.So I can simplify my diagrams by just deleting Stop-Alarm and make it a step of Trigger Alarm use case as in Extension or Alternative Flows such as
Alternative Flows [ For Trigger Alarm ]
User Can Stop any Triggered Alarm.
But may be later I may think that to show alternative flow "stop alarm" on my diagram will give more complete picture about overall features of my applictaion, so i may use extends relationship to show it:
You may ask that, when the user shake the phone it is obvious that he-she is primary actor, but when the " An Alarm Trigger Time is passed-reached" system automaticaly trigger it , not the user. So may be an artifical Time actor exist.But Time can not be a primary actor, since Time does not have a goal to satisfy like user.
But when you think carefully, The User is the guy behind the alarms even automatic ones since he/she set up those alarms.So even for the automatically triggered alarms, the primary actor is actual User.
Maybe we think that we should make "Time" factor more clear on our diagram, suppose for the "purist UML" guys :-)
Can put Time as an "secondary actor" on our diagram.But I think this ONLY make your diagrams UGLY and open "philosophical" questions about Use Case Actors. :-)
Check Rational Nice Paper : Dear Dr. Use Case: Is the Clock an Actor?
Dear Dr. Use Case: Is the Clock an Actor?
Last But Not Least
Do not waste your time with UML Use Case Diagrams much. The important things are Use Case Scenarious.