Попробуйте так много решений в моем приложении, но до тех пор, пока они не будут работать, нажмите на уведомление для перенаправления на другое действие. Пожалуйста, дайте мне правильное решение для этого, потому что я пробовал так много решений, = true и single top. Мой код прикрепить на эту ссылку, пожалуйста, найти и дать мне РаствораGCM Уведомление перенаправления на активность не сработала
=>https://www.dropbox.com/sh/vguv249ame7zid0/AABDaqjdkMEsFmPagxH3F8U4a?dl=0
Intent resultIntent = new Intent(this, RedirectToLeaderboard.class);
resultIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
Random r = new Random();
notifyID = r.nextInt(30000 - 1) + 1;
PendingIntent resultPendingIntent = PendingIntent.getActivity(this, notifyID, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent.getService(getApplicationContext(), 0, resultIntent, PendingIntent.FLAG_UPDATE_CURRENT);
NotificationCompat.Builder mNotifyBuilder;
NotificationManager mNotificationManager;
mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotifyBuilder = new NotificationCompat.Builder(this).setSmallIcon(R.mipmap.notification_all_icon).setLargeIcon(BitmapFactory.decodeResource(this.getResources(), R.mipmap.notification_all_icon));
// Set pending intent
mNotifyBuilder.setContentIntent(resultPendingIntent);
mNotificationManager.notify(notifyID, mNotifyBuilder.build());
, какой вид класса это, где вы создаете это уведомление, это деятельность –
GCMNotificationIntentService расширяет GcmListenerService {} –
эта функция или код звонит? , поместите один журнал или тост, чтобы проверить его –