android How to start activity when user clicks a notification?
问题 I wanna open activity when user clicks a notification. I know this question is duplicated but couldn`t find a solution here is what i did NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this) .setSmallIcon(R.drawable.notification_icon) .setContentTitle("My notification") .setContentText("Hello World!"); Intent resultIntent = new Intent(this, ResultActivity.class); // Because clicking the notification opens a new ("special") activity, there's // no need to create an