-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.java
39 lines (27 loc) · 1.03 KB
/
App.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package com.headytest.android;
import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import com.headytest.android.app_constants.Constants;
import com.headytest.android.dagger_component.DaggerNetComponent;
import com.headytest.android.dagger_component.NetComponent;
import com.headytest.android.dagger_modules.ApplicationModule;
import com.headytest.android.dagger_modules.NetworkModule;
/**
* Created by amod on 9/26/2017.
*/
public class App extends Application {
private NetComponent mNetComponent;
@Override
public void onCreate() {
super.onCreate();
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);
mNetComponent = DaggerNetComponent.builder()
.applicationModule(new ApplicationModule(this))
.networkModule(new NetworkModule(Constants.BASE_URL))
.build();
}
public NetComponent getNetComponent() {
return mNetComponent;
}
}