My Application uses a service that is started by a BOOT_COMPLETE BroadcastReceiver, in run i\'m getting an error
my code:
public class projet extends Br
Best way is to first start an IntentService
from BroadcastReceiver.onReceive()
using:
context.StartService(new Intent(context, YourIntentService.class));
Then in the IntentService.onHandleIntent()
:
@Override
protected void onHandleIntent(Intent intent) {
mContext = getApplicationContext();
mContext.bindService(new Intent("com.ServiceToBind.BIND"), yourConnection, Context.BIND_AUTO_CREATE);
}