Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

onReceive doesnt fire except only when intent is NEW_MSG_RECEIVED

why is it that this activates the onReceive on main activity

if(remoteMessage.getData().get("body").contains("new msg")) {
           Intent intent = new Intent("NEW_MSG_RECEIVED");
           LocalBroadcastManager.getInstance(this).sendBroadcast(intent);
       }

but if I change the action in new intent to anything but NEW_MSG_RECEIVED it doesnt activate the onReceive

Comments