-2
I have an android app that runs in the background. It happens that the lock/unlock the mobile screen, the application stops. I wonder if there is a way to start the application as soon as the user unlock the screen. I am using the BootReceiver.
Class:
public class BootReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
    Intent i = new Intent(context, MeuServico.class);
    i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    context.startActivity(i);
}
You managed to solve with my answer?
– Murillo Comino