// Path: app/src/main/java/com/sampleapp/constants/ValueConstants.java
// public interface ValueConstants {
// 
//     String LOCATION_PERMISSION = android.Manifest.permission.ACCESS_FINE_LOCATION;
//     int REQUEST_CAMERA = 1001;
//     int REQUEST_Gallery = 1002;
//     int REQUEST_LOCATION = 1003;
//     String DEVICE_TYPE = "android";
//     String NEW_THREAD = "newThread";
//     String MAIN_THREAD = "mainThread";
//     String DATE_INPUT_FORMAT = "yyyy-MM-dd HH:mm:ss";
//     String DATE_OUTPUT_FORMAT = "EEEE, h:mm a";
// 
//     // type check for error during login
//     @IntDef({ValidationType.VALID, ValidationType.USER_NAME_INVALID, ValidationType.PASSWORD_INVALID})
//     @Retention(RetentionPolicy.SOURCE)
//     @interface ValidationType {
//         int VALID = 0, USER_NAME_INVALID = 1, PASSWORD_INVALID = 2;
//     }
// 
//     // type of dialog opened in MainActivity
//     @IntDef({DialogType.DIALOG_DENY, DialogType.DIALOG_NEVER_ASK})
//     @Retention(RetentionPolicy.SOURCE)
//     @interface DialogType {
//         int DIALOG_DENY = 0, DIALOG_NEVER_ASK = 1;
//     }
// }


import android.content.Context;
import com.sampleapp.constants.ValueConstants;
import javax.inject.Named;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import rx.Scheduler;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
package com.sampleapp.utils;





/**
 * Created by saveen_dhiman on 05-November-16.
 * Provide injects for utility objects
 */

@Module
public class UtilsModule {

    private Context mContext;

    public UtilsModule(Context context) {
        this.mContext = context;
    }

    // get AppUtils instance
    @Provides
    @Singleton
    public AppUtils getAppUtils() {
        return new AppUtils(mContext);
    }

    // get DateTimeUtils instance
    @Provides
    @Singleton
    public DateTimeUtils getDateTimeUtils() {
        return new DateTimeUtils();
    }

    // get ProgressBarHandler instance
    @Provides
    @Singleton
    public ProgressBarHandler getProgressBar() {
        return new ProgressBarHandler(mContext);
    }

    //get dialog utils
    @Provides
    @Singleton
    public DialogsUtil getDialogUtils() {
        return new DialogsUtil(mContext);
    }

    //get new thread
    @Provides
    @Singleton
// Path: app/src/main/java/com/sampleapp/constants/ValueConstants.java
// public interface ValueConstants {
// 
//     String LOCATION_PERMISSION = android.Manifest.permission.ACCESS_FINE_LOCATION;
//     int REQUEST_CAMERA = 1001;
//     int REQUEST_Gallery = 1002;
//     int REQUEST_LOCATION = 1003;
//     String DEVICE_TYPE = "android";
//     String NEW_THREAD = "newThread";
//     String MAIN_THREAD = "mainThread";
//     String DATE_INPUT_FORMAT = "yyyy-MM-dd HH:mm:ss";
//     String DATE_OUTPUT_FORMAT = "EEEE, h:mm a";
// 
//     // type check for error during login
//     @IntDef({ValidationType.VALID, ValidationType.USER_NAME_INVALID, ValidationType.PASSWORD_INVALID})
//     @Retention(RetentionPolicy.SOURCE)
//     @interface ValidationType {
//         int VALID = 0, USER_NAME_INVALID = 1, PASSWORD_INVALID = 2;
//     }
// 
//     // type of dialog opened in MainActivity
//     @IntDef({DialogType.DIALOG_DENY, DialogType.DIALOG_NEVER_ASK})
//     @Retention(RetentionPolicy.SOURCE)
//     @interface DialogType {
//         int DIALOG_DENY = 0, DIALOG_NEVER_ASK = 1;
//     }
// }


// Path: app/src/main/java/com/sampleapp/utils/UtilsModule.java
import android.content.Context;
import com.sampleapp.constants.ValueConstants;
import javax.inject.Named;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import rx.Scheduler;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

package com.sampleapp.utils;





/**
 * Created by saveen_dhiman on 05-November-16.
 * Provide injects for utility objects
 */

@Module
public class UtilsModule {

    private Context mContext;

    public UtilsModule(Context context) {
        this.mContext = context;
    }

    // get AppUtils instance
    @Provides
    @Singleton
    public AppUtils getAppUtils() {
        return new AppUtils(mContext);
    }

    // get DateTimeUtils instance
    @Provides
    @Singleton
    public DateTimeUtils getDateTimeUtils() {
        return new DateTimeUtils();
    }

    // get ProgressBarHandler instance
    @Provides
    @Singleton
    public ProgressBarHandler getProgressBar() {
        return new ProgressBarHandler(mContext);
    }

    //get dialog utils
    @Provides
    @Singleton
    public DialogsUtil getDialogUtils() {
        return new DialogsUtil(mContext);
    }

    //get new thread
    @Provides
    @Singleton
    @Named(ValueConstants.NEW_THREAD)