package org.mercury_im.messenger.di.module;

import android.app.Application;

import org.jivesoftware.smackx.ping.android.ServerPingWithAlarmManager;
import org.mercury_im.messenger.MercuryImApplication;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;

@Module
public class AppModule {

    private MercuryImApplication mApplication;

    public AppModule(MercuryImApplication application) {
        this.mApplication = application;
        ServerPingWithAlarmManager.onCreate(application);
    }

    @Provides
    @Singleton
    Application provideApplication() {
        return mApplication;
    }
}
