I have an application which I need to launch an activity of type called (timbre), the problem is when the device is blocked the activity is not launched, in any other situation if it is launched ... My code to perform that function is this:
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
if (remoteMessage.getData()!=null) {
//Log.d("WILSON", remoteMessage.getNotification().getBody());
Map<String,String> data=new HashMap<>();
String customer=data.get("customer");
String lat=data.get("lat");
String lng=data.get("lng");
Intent intent = new Intent(getBaseContext(), CustommerCall.class);
intent.putExtra("lat", lat);
intent.putExtra("lng", lng);
startActivity(intent);
}
}
But as I said before, it works for me in any situation, except when the device is blocked .... Any help?