Is it possible to start service without starting application? I need to refresh data of my application at-least hourly, how can I do it if user no in my application?
you can start your service on boot. You need the following in your AndroidManifest.xml file:
In your
In your
In MyBroadcastReceiver.java:
package com.example;
public class MyBroadcastreceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Intent startServiceIntent = new Intent(context, MyService.class);
context.startService(startServiceIntent);
}
}