YuhanXu / omnidroid

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

Send GMAIL action halts activities on failure #148

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup an event that sends gmail as the action
2. Have an internet connection that is limited/firewalled and doesn't allow 
traffic out such as nyu's nyuguest wireless network that requires 
authentication using the browser before it allows you to access internet 
resources.  This may also work without an internet connection, I didn't try it.
3.  After a minute or so, this will cause a "Send Gail failed, No network" 
notification which is expected, but while we're waiting for this to occur the 
omnidroid activities are unresponsive while processing this action.

Original issue reported on code.google.com by case.and...@gmail.com on 27 Jul 2010 at 7:34

GoogleCodeExporter commented 8 years ago
We probably just need to run a new thread to call GmailService.send() for this 
one. I tried reproducing the bug in the emulator set to airplane mode, but the 
failure notice showed up right away so I guess an actual device might be needed 
to test this one.

Not sure if sqlite supports concurrent transactions, if not, we might need to 
place synchronization blocks in either ResultProcessor or FailedActionsDbHelper.

Original comment by renc...@gmail.com on 28 Jul 2010 at 9:40

GoogleCodeExporter commented 8 years ago
See this code for potential code example on how to do threading to avoid 
blocking:
http://codereview.appspot.com/1868050/diff/1/2

Original comment by case.and...@gmail.com on 30 Jul 2010 at 6:58