File tree Expand file tree Collapse file tree 4 files changed +14
-8
lines changed
src/main/java/net/gotev/uploadservicedemo
uploadservice/src/main/java/net/gotev/uploadservice Expand file tree Collapse file tree 4 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ allprojects {
23
23
jcenter()
24
24
mavenCentral()
25
25
mavenLocal()
26
+ maven { url " https://maven.google.com" }
26
27
}
27
28
}
28
29
Original file line number Diff line number Diff line change @@ -2,12 +2,12 @@ apply plugin: 'com.android.application'
2
2
apply plugin : ' android-apt'
3
3
apply plugin : ' com.getkeepsafe.dexcount'
4
4
5
- def sdkVersion = 25 ;
5
+ def sdkVersion = 26 ;
6
6
def libraryVersion = " 3.3.1"
7
7
8
8
android {
9
9
compileSdkVersion sdkVersion
10
- buildToolsVersion ' 25 .0.2 '
10
+ buildToolsVersion ' 26 .0.1 '
11
11
12
12
defaultConfig {
13
13
applicationId " net.gotev.uploadservicedemo"
@@ -29,7 +29,7 @@ repositories {
29
29
}
30
30
31
31
def butterKnifeVersion = " 8.5.1"
32
- def supportVersion = " 25.3.1 "
32
+ def supportVersion = " 26.0.0 "
33
33
def stethoVersion = " 1.4.2"
34
34
35
35
dependencies {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ public void onCreate() {
38
38
.enableWebKitInspector (Stetho .defaultInspectorModulesProvider (this ))
39
39
.build ());
40
40
41
- enableStrictMode ();
41
+ // enableStrictMode();
42
42
}
43
43
44
44
// Set your application namespace to avoid conflicts with other apps
Original file line number Diff line number Diff line change @@ -117,19 +117,24 @@ public UploadTask() {
117
117
*/
118
118
protected void init (UploadService service , Intent intent ) throws IOException {
119
119
this .notificationManager = (NotificationManager ) service .getSystemService (Context .NOTIFICATION_SERVICE );
120
+ this .params = intent .getParcelableExtra (UploadService .PARAM_TASK_PARAMETERS );
121
+ this .service = service ;
122
+ this .mainThreadHandler = new Handler (service .getMainLooper ());
123
+
120
124
if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .O ) {
121
125
String notificationChannelId = params .notificationConfig .getNotificationChannelId ();
126
+
122
127
if (notificationChannelId == null ) {
128
+ params .notificationConfig .setNotificationChannelId (UploadService .NAMESPACE );
123
129
notificationChannelId = UploadService .NAMESPACE ;
124
130
}
131
+
125
132
if (notificationManager .getNotificationChannel (notificationChannelId ) == null ) {
126
- NotificationChannel channel = new NotificationChannel (notificationChannelId , "Upload Service channel" , NotificationManager .IMPORTANCE_DEFAULT );
133
+ NotificationChannel channel = new NotificationChannel (notificationChannelId , "Upload Service channel" , NotificationManager .IMPORTANCE_HIGH );
127
134
notificationManager .createNotificationChannel (channel );
128
135
}
129
136
}
130
- this .service = service ;
131
- this .mainThreadHandler = new Handler (service .getMainLooper ());
132
- this .params = intent .getParcelableExtra (UploadService .PARAM_TASK_PARAMETERS );
137
+
133
138
}
134
139
135
140
@ Override
You can’t perform that action at this time.
0 commit comments