Bom dia Pessoal, Tenho uma notificação que ao clicar nela abre a MainActivity, porém gostaria de chamar um Método que está dentro de um Fragment, é possível isso?
--
-- Segue o código da notificação
- Notification notification = new Notification(R.mipmap.ic_servico_ativo,
- getText(R.string.servico),System.currentTimeMillis());
- //Chamo a MainActivity ao clicar na notificação
- Intent notificationIntent = new Intent(this, MainActivity.class);
- PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
- notification.setLatestEventInfo(this, getText(R.string.notificacao_titulo),
- getText(R.string.notificacao_msg),
- pendingIntent);
- startForeground(10000, notification);
............
Márcio Fornari
..........................................................................
Márcio Fornari
..........................................................................
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário