I want to send data to the server periodically, I\'m using background Service
for that, but I want to send when the data got updated, and updated data I\'m getting
1.Sending data to service Upto Lolipop edition
Intent serviceIntent= new Intent(DriverActivity.this,demoService.class);
serviceIntent.putExtra("token", token);
startService(serviceIntent);
Retrieving data in Service class :
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
Toast.makeText(this, "Starting..", Toast.LENGTH_SHORT).show();
Log.d(APP_TAG,intent.getStringExtra("token"));
return "your flag";
}