app/src/main/java/com/geekyouup/android/ustopwatch/AlarmUpdater.java
/*public static void showCountdownChronometerNotification(Context context, long endTime)
    {
        if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
        {
            // The PendingIntent to launch our activity if the user selects this notification
            Intent launcher = new Intent(context,UltimateStopwatchActivity.class);
            launcher.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
            PendingIntent contentIntent = PendingIntent.getActivity(context, 0,launcher,PendingIntent.FLAG_ONE_SHOT);

            Notification notification = new Notification.Builder(context)
                    .setContentTitle("Ultimate Stopwatch")
                    .setUsesChronometer(true)
                    .setWhen(System.currentTimeMillis() + endTime)
                    .setSmallIcon(R.drawable.notification_icon)
                    .setContentIntent(contentIntent)
                    .build();

            NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
            // We use a layout id because it is a unique number.  We use it later to cancel.
            notificationManager.notify(R.layout.countdown_fragment, notification);
        }
    }  */




NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
We use a layout id because it is a unique number.  We use it later to cancel.
NotificationManager notificationManager = ( NotificationManager ) context . getSystemService ( Context . NOTIFICATION_SERVICE ) ; We use a layout id because it is a unique number . We use it later to cancel .
public static void cancelChronometerNotification(Context context) {
        try {
            ((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).cancel(R.layout.stopwatch_fragment);
        } catch (Exception ignored) {
        }
    }
public static void cancelChronometerNotification ( Context context ) { try { ( ( NotificationManager ) context . getSystemService ( Context . NOTIFICATION_SERVICE ) ) . cancel ( R . layout . stopwatch_fragment ) ; } catch ( Exception ignored ) { } }
public static void showCountdownChronometerNotification(Context context, long endTime)
{
if(android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH)
{
 The PendingIntent to launch our activity if the user selects this notification
Intent launcher = new Intent(context,UltimateStopwatchActivity.class);
launcher.setFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
PendingIntent contentIntent = PendingIntent.getActivity(context, 0,launcher,PendingIntent.FLAG_ONE_SHOT);
public static void showCountdownChronometerNotification ( Context context long endTime ) { if ( android . os . Build . VERSION . SDK_INT > = Build . VERSION_CODES . ICE_CREAM_SANDWICH ) { The PendingIntent to launch our activity if the user selects this notification Intent launcher = new Intent ( context UltimateStopwatchActivity . class ) ; launcher . setFlags ( Intent . FLAG_ACTIVITY_SINGLE_TOP ) ; PendingIntent contentIntent = PendingIntent . getActivity ( context 0 launcher PendingIntent . FLAG_ONE_SHOT ) ;
//((NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE)).cancel(R.layout.countdown_fragment);