Note that there are some explanatory texts on larger screens.

plurals
  1. POTracking user's sms and geo position in the background - is my idea working?
    primarykey
    data
    text
    <p>I'm fresh with Android. I face some ambitious university project, so I hope you'll tell me if my idea about following app's implementation is correct and efficient:</p> <p><strong>Business scenario:</strong></p> <ul> <li>WebService consumes informations about user's sms (sendt/received) and GPS/"network provided" position</li> <li>GPS/"network provided" position's should be sendt to WebService every 1 minute (if it's value changed)</li> <li>sms update should be sendt to WebService immediately</li> </ul> <p><strong>My implementation idea...</strong></p> <p>I'm going to use AlarmManager prepare Intent matching BroadcastReceiver (and schedule it with 1 minute interval). Then I'll start <a href="https://github.com/commonsguy/cwac-wakeful#readme" rel="nofollow">WakefullIntentService</a> in onReceive() method. This will feed my WebService in the background. That would work for sending data over HTTP in the background.</p> <p><strong>... and doubts:</strong></p> <p>How about updating GPS/"network provided" position data in the background? Should I start some additional service and use LocationListener within it? There would be no sense for using AlarmManager then - I could feed my WebService from this location-monitoring service.</p> <p>But as I read here: <a href="http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/" rel="nofollow">Diamonds Are Forever. Services Are Not.</a> it's not a good practise to play with never-ending services. As I understand it would not work correctly when my phone is sleeping.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload