Monday, March 25, 2013

Example of using NotificationCompat.Builder

Last exercise demonstrate "Notification.Builder". If your app supports versions of Android as old as API level 4, you can instead use NotificationCompat.Builder, available in the Android Support library.

Example of using NotificationCompat.Builder

Simple replace Notification.Builder with NotificationCompat.Builder, and import

    myNotification = new NotificationCompat.Builder(context)
          .setContentTitle("Exercise of Notification!")

- error of using NotificationCompat.Builder, IllegalArgumentException: contentIntent required


chintan Patel said...

Can we Vibrate mobile when Notification is Recieve

Andr.oid Eric said...

hello chintan Patel,

Check HERE