Code example for NotificationManager

Methods: cancelAll

	private static final String TAG = "NotifierHelper";
    private static final int NOTIFY_1 = 0x1001;
    public static void clear(Context caller) {
        NotificationManager notifier = (NotificationManager) caller.getSystemService(Context.NOTIFICATION_SERVICE);
    // display customized Toast message 
    public static int SHORT_TOAST = 0;
    public static int LONG_TOAST = 1;
    public static void displayToast(Context caller, String toastMsg, int toastType){
    	try {// try-catch to avoid stupid app crashes 
	        LayoutInflater inflater = LayoutInflater.from(caller);
	        View mainLayout = inflater.inflate(R.layout.toast_layout, null);
	        View rootLayout = mainLayout.findViewById(;
	        ImageView image = (ImageView) mainLayout.findViewById(;
Experience pair programming with AI  Get Codota for Java