urbanairship-core/src/main/java/com/urbanairship/automation/AutomationEngine.java
public void start() {
        if (isStarted) {
            return;
        }

        this.startTime = System.currentTimeMillis();
        this.backgroundThread.start();
        this.backgroundHandler = new Handler(this.backgroundThread.getLooper());
        this.backgroundScheduler = Schedulers.looper(backgroundThread.getLooper());

        activityMonitor.addListener(activityListener);
        analytics.addAnalyticsListener(analyticsListener);

        backgroundHandler.post(new Runnable() {
            @Override
            public void run() {
                cleanSchedules();
                resetExecutingSchedules();
                restoreDelayAlarms();
                restoreIntervalAlarms();
                prepareSchedules(dataManager.getScheduleEntries(ScheduleEntry.STATE_PREPARING_SCHEDULE));
            }
        });

        restoreCompoundTriggers();
        onScheduleConditionsChanged();
        onEventAdded(JsonValue.NULL, Trigger.LIFE_CYCLE_APP_INIT, 1.00);
        isStarted = true;
    }
/**
     * Performs setup and starts listening for events.
     */
Performs setup and starts listening for events.
Performs setup and starts listening for events .
public void start() {
        if (isStarted) {
            return;
        }
        this.startTime = System.currentTimeMillis();
        this.backgroundThread.start();
        this.backgroundHandler = new Handler(this.backgroundThread.getLooper());
        this.backgroundScheduler = Schedulers.looper(backgroundThread.getLooper());
        activityMonitor.addListener(activityListener);
        analytics.addAnalyticsListener(analyticsListener);
        backgroundHandler.post(new Runnable() {
            @Override
            public void run() {
                cleanSchedules();
                resetExecutingSchedules();
                restoreDelayAlarms();
                restoreIntervalAlarms();
                prepareSchedules(dataManager.getScheduleEntries(ScheduleEntry.STATE_PREPARING_SCHEDULE));
            }
        });
        restoreCompoundTriggers();
        onScheduleConditionsChanged();
        onEventAdded(JsonValue.NULL, Trigger.LIFE_CYCLE_APP_INIT, 1.00);
        isStarted = true;
    }
public void start ( ) { if ( isStarted ) { return ; } this . startTime = System . currentTimeMillis ( ) ; this . backgroundThread . start ( ) ; this . backgroundHandler = new Handler ( this . backgroundThread . getLooper ( ) ) ; this . backgroundScheduler = Schedulers . looper ( backgroundThread . getLooper ( ) ) ; activityMonitor . addListener ( activityListener ) ; analytics . addAnalyticsListener ( analyticsListener ) ; backgroundHandler . post ( new Runnable ( ) { @ Override public void run ( ) { cleanSchedules ( ) ; resetExecutingSchedules ( ) ; restoreDelayAlarms ( ) ; restoreIntervalAlarms ( ) ; prepareSchedules ( dataManager . getScheduleEntries ( ScheduleEntry . STATE_PREPARING_SCHEDULE ) ) ; } } ) ; restoreCompoundTriggers ( ) ; onScheduleConditionsChanged ( ) ; onEventAdded ( JsonValue . NULL , Trigger . LIFE_CYCLE_APP_INIT , 1.00 ) ; isStarted = true ; }
Performs setup and starts listening for events.
Performs setup and starts listening for events .