9

Notification returns a java.lang.NullPointerException when Pressed

view full story
linux-howto

http://stackoverflow.com – I have this method to create notifications: private void showNotification(Context context) { PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(context, MainScreen.class), 0); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setSmallIcon(R.drawable.ic_launcher) .setContentTitle("Create the Orange Orangutan!!") .setContentText("Hello!"); mBuilder.setContentIntent(contentIntent); mBuilder.setDefaults(Notification.DEFAULT_SOUND); mBuilder.setAutoCancel(true); (HowTos)