is Notification Builder Supported - Android Android OS

Android examples for Android OS:Notification Create

Description

is Notification Builder Supported

Demo Code


//package com.java2s;

import android.os.Build;

public class Main {
    public static boolean isNotificationBuilderSupported() {
        try {/* w  w w . j  ava 2 s. c  om*/
            return (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB)
                    && Class.forName("android.app.Notification.Builder") != null;
        } catch (ClassNotFoundException e) {
            return false;
        }
    }
}

Related Tutorials