joelmap / omnidroid

Automatically exported from code.google.com/p/omnidroid
Apache License 2.0
0 stars 0 forks source link

Option to queue actions when resources unavailable #92

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. put phone in airplane mode
2. add an action for "Time is" with "SMS->Send SMS"
3. Watch for the alert texts to tell you it wasn't sent.

What is the expected output?
1. Provide user with an option to queue actions when resource is unavailable.
2. Process queue items when service is restored (airplane mode disabled)

Original issue reported on code.google.com by case.and...@gmail.com on 22 Jun 2010 at 7:58

GoogleCodeExporter commented 9 years ago

Original comment by case.and...@gmail.com on 3 Jul 2010 at 6:52

GoogleCodeExporter commented 9 years ago
andrew,

what happens during airplane mode? are you connected to the internet?

my point is, if you just monitor connected/disconnected from the internet would 
that help?

Original comment by sv767%ny...@gtempaccount.com on 8 Jul 2010 at 1:35

GoogleCodeExporter commented 9 years ago
That would definitely help yes and it would be a step in the right direction, 
but it's just a piece of the puzzle.

I'm thinking more general than internet.  I'm wondering if we can wrap our 
action intents with return values so that when they are sent we know if they've 
succeeded or not.  If not we have a queue inside omnidroid and process at a 
later time.

I think what we need is these main feature:
1) Actions need to return values so we can queue failed actions
2) We need different resource monitors to determine when 
WiFi/Dataplan/Phone/SMS/Filesystem/etc./ has the resources available.
3) We need the queue system to store 1) and realize changes in 2) and process 
events

The queue system handles events from 1) and tries to process that item from the 
queue maybe every 5 minutes or so (can be more sophisticated, but doesn't need 
to be to start) after it detects that that actions resource has been 
re-acquired.

For example, right now lets say I set up a rule to twitter my events... but I 
don't have a data-plan.  So my twitter actions fall on deaf ears most of the 
time, but I'm never alerted to the fact that the action never succeeded.

Original comment by case.and...@gmail.com on 8 Jul 2010 at 2:15

GoogleCodeExporter commented 9 years ago
this doesn't answer my question.
Is phone connected to the internet when it's in airplane mode?

if you keep trying to process actions, that will consume too much batteries. 
imagine if you really are in the ariplane. that's why I was thinking to 
identify the cause of failure and only go back to that action when resources 
are available. there might still be actions that you wanna go back to every 
minute or two, say server error for example, and we wouldn't even queue actions 
that were failed because of authentication error.

Original comment by sv767%ny...@gtempaccount.com on 8 Jul 2010 at 4:49

GoogleCodeExporter commented 9 years ago
Of course you're right, the phone is not connected in airplane mode and we 
don't need to try and process that action again until the resource becomes 
available.  That's exactly what I was trying to describe when I was talking 
about needing resource monitors described in part 2) my last comment.

Original comment by case.and...@gmail.com on 8 Jul 2010 at 2:42

GoogleCodeExporter commented 9 years ago
Issue 49 has been merged into this issue.

Original comment by sv767%ny...@gtempaccount.com on 10 Jul 2010 at 7:14

GoogleCodeExporter commented 9 years ago
andrew,

I haven't been able to get results from service. Do you know anything about it? 

Original comment by sv767%ny...@gtempaccount.com on 10 Jul 2010 at 7:25

GoogleCodeExporter commented 9 years ago
Sorry, I don't know much about it.

Original comment by case.and...@gmail.com on 10 Jul 2010 at 11:21

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/1810042/show

commtted r829

Original comment by sv767%ny...@gtempaccount.com on 26 Jul 2010 at 7:06

GoogleCodeExporter commented 9 years ago
http://codereview.appspot.com/1810042/show

commtted r829

Original comment by sv767%ny...@gtempaccount.com on 26 Jul 2010 at 7:06