App crash (if closed) after click on notification

896 Views Asked by At

I've a problem with my application. I use a class to manage push notification from Azure, extending NotificationsHandler.All works,the method onReceive "catch" the incoming notification,using bundle i can read each field of the json from azure server.If i click on the notification i can start the activity as follows:

fragment_richiesta_tabsV2 dettaglioTabs= new fragment_richiesta_tabsV2(); Intent myIntent = new Intent(contesto, dettaglioTabs.getClass()); contentIntent = PendingIntent.getActivity(contesto, 0,myIntent, PendingIntent.FLAG_UPDATE_CURRENT);

the problem is when the app is closed from the recent apps.The notification arrives,but if i click on the app crash...how can i solve? thanks

0

There are 0 best solutions below