-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathClassApplication.java
45 lines (34 loc) · 1.25 KB
/
ClassApplication.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
40
41
42
43
44
45
package naomi.me.spotopen;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.database.sqlite.SQLiteDatabase;
import com.facebook.stetho.Stetho;
/**
* Created by naomikoo on 2016-08-31.
*/
public class ClassApplication extends Application {
public static FavouritedClassesDb db;
@Override
public void onCreate() {
super.onCreate();
// Create an InitializerBuilder
Stetho.InitializerBuilder initializerBuilder =
Stetho.newInitializerBuilder(this);
// Enable Chrome DevTools
initializerBuilder.enableWebKitInspector(
Stetho.defaultInspectorModulesProvider(this)
);
// Enable command line interface
initializerBuilder.enableDumpapp(
Stetho.defaultDumperPluginsProvider(getApplicationContext())
);
// Use the InitializerBuilder to generate an Initializer
Stetho.Initializer initializer = initializerBuilder.build();
// Initialize Stetho with the Initializer
Stetho.initialize(initializer);
db = new FavouritedClassesDb(getApplicationContext(), "SpotOpen", null, 1);
Intent intent = new Intent(this, RefreshService.class);
startService(intent);
}
}