Android Open Source - DailySelfie Application Daily Selfie






From Project

Back to project page DailySelfie.

License

The source code is released under:

Apache License

If you think the Android project DailySelfie listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package it.lusio.android.dailyselfie;
/* w w  w.  j a  va  2  s . co  m*/
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.util.Log;

import it.lusio.android.dailyselfie.alarm.AlarmSetter;

public class ApplicationDailySelfie extends Application {

    private static int started = 0;
    private static int stopped = 0;

    public static boolean isApplicationVisible() {
        return started > stopped;
    }

    @Override
    public void onCreate() {
        registerActivityLifecycleCallbacks(new ActivityLifecycleCallbacks() {
            @Override
            public void onActivityCreated(Activity activity, Bundle savedInstanceState) {
            }

            @Override
            public void onActivityStarted(Activity activity) {
                ++started;
                Log.d(Constants.TAG, "One Activity Started.");
            }

            @Override
            public void onActivityResumed(Activity activity) {
            }

            @Override
            public void onActivityPaused(Activity activity) {
            }

            @Override
            public void onActivityStopped(Activity activity) {
                ++stopped;
                Log.d(Constants.TAG, "One Activity Stopped.");
            }

            @Override
            public void onActivitySaveInstanceState(Activity activity, Bundle outState) {
            }

            @Override
            public void onActivityDestroyed(Activity activity) {
            }
        });

        new AlarmSetter(getApplicationContext()).startAlarm();
    }
}




Java Source Code List

it.lusio.android.dailyselfie.ApplicationDailySelfie.java
it.lusio.android.dailyselfie.ApplicationTest.java
it.lusio.android.dailyselfie.Constants.java
it.lusio.android.dailyselfie.alarm.AlarmReceiver.java
it.lusio.android.dailyselfie.alarm.AlarmSetter.java
it.lusio.android.dailyselfie.ui.ActivityImageViewer.java
it.lusio.android.dailyselfie.ui.ActivityMain.java
it.lusio.android.dailyselfie.ui.AdapterGridView.java
it.lusio.android.dailyselfie.ui.Selfie.java
it.lusio.android.dailyselfie.ui.SquareImageView.java