I Want to run background service for give me location of user but when I destroy or lock mobile screen, service are killed, it shows nothing. I hope any one had idea about it. please Share.
Sensor Service
I Want to run background service for give me location of user but when I destroy or lock mobile screen, service are killed, it shows nothing. I hope any one had idea about it. please Share.
Sensor Service
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
super.onStartCommand(intent, flags, startId);
Log.d(TAG, "onStartCommand");
...
return START_STICKY;
}
Did you try START_STICKY
?