0
Мне нужно отправить параметры, когда пользователь нажимает на уведомление.параметры передачи из ожидающего намерения
Мой код для создания Извещение:
NotificationManager notifManager = (NotificationManager) c.getSystemService(c.NOTIFICATION_SERVICE);
Notification note = new Notification(R.drawable.ic_launcher, "Smartdrifter", System.currentTimeMillis());
Intent WA = new Intent(c, WebActivity.class);
WA.putExtra("url", urlTarget);
WA.putExtra("valid", notifId);
WA.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent intent = PendingIntent.getActivity(c, 0, WA, 0);
notifManager.cancel(notifId);
note.setLatestEventInfo(c, titulo, texto, teste());
notifManager.notify(notifId, note);
Мой код для запроса Params:
String url = getIntent().getStringExtra("url");
Но ответ NULL.
Существует другая форма параметров запроса?
Спасибо.
Что такое 'urlTarget'? – RobinHood
Извините! urlTarget является строкой, а notifId длинной – JARPSimoes