Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • Big View Notification Android

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 178
    Comment on it

    This tutorial is about Big View of Notification.

    Big View notification introduced in Android 4.1.

    Big View Notification has advantage to set functionality from Notification like you  Alarm application
    and you can Dismiss/Snooze alarm from notification with Big View Notification.


    Here we Start.

    1. Create Pending Intent for Notification when user click on Notification.

     Intent intent = new Intent(Intent.ACTION_VIEW,
            PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);


    2. Create Intents for Big View.

     Intent facebook = new Intent(Intent.ACTION_VIEW,
            PendingIntent piFb =  PendingIntent.getActivity(this, 0, facebook, 0);
            Intent google = new Intent(Intent.ACTION_VIEW,
            PendingIntent piGoogle =  PendingIntent.getActivity(this, 0, google, 0);


    3. Create Notification Builder object.

    NotificationCompat.Builder builder = new NotificationCompat.Builder(this);


    4. Set Notification icon.



    5. Set Pending Content.



    6. Set Auto Cancel.



    7. Set Text to Notification.

      builder.setContentTitle("Big View Notification");
            builder.setContentText("This is content text of Big View Notification");
            builder.setSubText("sub text of notification");


    8. Set Notification Type to BigView Type.

     builder.setStyle(new NotificationCompat.BigTextStyle()
                    .bigText("Big View Message"))
                    .addAction (R.drawable.ic_launcher,
                            "Facebook ", piFb)
                    .addAction (R.drawable.ic_launcher,
                            "Google", piGoogle);


    9. Create Notification Manager.

      NotificationManager notificationManager = (NotificationManager) getSystemService(


    10. call below line of code from you button click to Notify Notification .



    Happy Coding :D

 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: