Code example for AtomicInteger

Methods: getAndDecrement

0
        resumed.getAndIncrement();
    } 
 
    @Override 
    public void onActivityPaused(Activity activity) {
        openActivities.getAndDecrement();
    } 
 
    @Override 
    public void onActivityStopped(Activity activity) {
        stopped.getAndIncrement();
        if (isApplicationClosing()) { 
            Log.d(MCMDefines.LOG_TAG, "Malcom session stops");
            MCMCoreAdapter.getInstance().moduleStatsEndBeacon(); 
        } 
 
        //Unregister the broadcast receiver only if the notification module has registered it 
        if (MCMNotificationModule.getInstance().isBroadcastReceiverRegistered()) { 
            MCMNotificationModule.getInstance().unregisterBroadcastReceiver(activity.getApplicationContext());
        } 
Connect your IDE to all the code out there  Get Codota for Java