// Path: app/src/main/java/york/com/retrofit2rxjavademo/MyApplication.java
// public class MyApplication extends Application implements HasActivityInjector {
//     @Inject
//     DispatchingAndroidInjector<Activity> dispatchingActivityInjector;
// 
//     private static final String sBASE_URL = "http://rap.taobao.org/mockjsdata/15987/";
//     private static final int sDEFAULT_TIMEOUT = 10;
// 
//     @Override
//     public void onCreate() {
//        super.onCreate();
// 
//         DaggerAppComponent
//                 .builder()
//                 .application(this)
//                 .network(new NetworkModule(sBASE_URL, sDEFAULT_TIMEOUT))
//                 .build()
//                 .inject(this);
//     }
// 
// 
//     @Override
//     public AndroidInjector<Activity> activityInjector() {
//         return dispatchingActivityInjector;
//     }
// }


import android.content.Context;
import dagger.Module;
import dagger.Provides;
import york.com.retrofit2rxjavademo.MyApplication;
import york.com.retrofit2rxjavademo.di.scope.AppScope;
package york.com.retrofit2rxjavademo.di.module;



/**
 * @author: YorkYu
 * @version: V2.0.0
 * @project: Retrofit2RxjavaDemo
 * @package: york.com.retrofit2rxjavademo.di.module
 * @description: description
 * @date: 2017/7/7
 * @time: 17:31
 */
@Module
public class AppModule {
    @Provides
    @AppScope
// Path: app/src/main/java/york/com/retrofit2rxjavademo/MyApplication.java
// public class MyApplication extends Application implements HasActivityInjector {
//     @Inject
//     DispatchingAndroidInjector<Activity> dispatchingActivityInjector;
// 
//     private static final String sBASE_URL = "http://rap.taobao.org/mockjsdata/15987/";
//     private static final int sDEFAULT_TIMEOUT = 10;
// 
//     @Override
//     public void onCreate() {
//        super.onCreate();
// 
//         DaggerAppComponent
//                 .builder()
//                 .application(this)
//                 .network(new NetworkModule(sBASE_URL, sDEFAULT_TIMEOUT))
//                 .build()
//                 .inject(this);
//     }
// 
// 
//     @Override
//     public AndroidInjector<Activity> activityInjector() {
//         return dispatchingActivityInjector;
//     }
// }


// Path: app/src/main/java/york/com/retrofit2rxjavademo/di/module/AppModule.java
import android.content.Context;
import dagger.Module;
import dagger.Provides;
import york.com.retrofit2rxjavademo.MyApplication;
import york.com.retrofit2rxjavademo.di.scope.AppScope;

package york.com.retrofit2rxjavademo.di.module;



/**
 * @author: YorkYu
 * @version: V2.0.0
 * @project: Retrofit2RxjavaDemo
 * @package: york.com.retrofit2rxjavademo.di.module
 * @description: description
 * @date: 2017/7/7
 * @time: 17:31
 */
@Module
public class AppModule {
    @Provides
    @AppScope
    Context provideContext(MyApplication application) {