android - Firebase onMessageReceived is triggering twice -
i scheduling notification launched when message received firebase service problem notification triggering twice(once on time , second time after maybe 30 min) here code: sharedpreferences = preferencemanager .getdefaultsharedpreferences(getapplicationcontext()); // check if message contains data payload. if (remotemessage.getdata().size() > 0) { intent myintent = new intent(myfirebasemessagingservice.this, myalarmservice.class); pendingintent = pendingintent.getservice(myfirebasemessagingservice.this, 0, myintent, 0); alarmmanager alarmmanager = (alarmmanager)getsystemservice(alarm_service); long currenttime = system.currenttimemillis(); int hour=sharedpreferences.getint("hour",9); int min=sharedpreferences.getint("min",0); calendar calendar = calendar.getinstance(); calendar.set(calendar.hour_of_day,hour); calendar.set(calendar.minute,min); alarmmanage...