want to write background location tracking application android -


hi want create location tracking application in android runs in background after user terminates application left swipe recent application. till have used intent service started main activity gets killed when terminate application. other idea implement this? have tried registering location updates , doing work of service in onlocation changed event. listener gets unregister after application exists. don't need full code need approach this.

have tried track in service? without reference activity. have start service activity first time. note: service isn't killed swiping recent apps, rather killed os when more ram required. restart after killed have return start_sticky onstartcommand i.e:

@override public int onstartcommand(intent intent, int flags, int startid) {      return start_sticky; } 

also, here should register locationlistener , perform whatever action need. , always, remember add permissions.


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -