mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-29 15:51:17 +00:00
Replaced Notification with NotificationCompat.
This commit is contained in:
parent
d369cd3876
commit
7a5855fec5
2 changed files with 14 additions and 1 deletions
12
build.gradle
12
build.gradle
|
@ -12,6 +12,18 @@ buildscript {
|
|||
apply plugin: 'android'
|
||||
apply plugin: 'android_sign'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven {
|
||||
url "http://4thline.org/m2"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:13.0.+'
|
||||
}
|
||||
|
||||
|
||||
android {
|
||||
compileSdkVersion 19
|
||||
buildToolsVersion "19.0.3"
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.app.Service;
|
|||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.os.IBinder;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
|
||||
public class SyncthingService extends Service {
|
||||
|
||||
|
@ -18,7 +19,7 @@ public class SyncthingService extends Service {
|
|||
PendingIntent pi = PendingIntent.getActivity(
|
||||
this, 0, new Intent(this, WebGuiActivity.class),
|
||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
Notification n = new Notification.Builder(this)
|
||||
Notification n = new NotificationCompat.Builder(this)
|
||||
.setContentTitle(getString(R.string.app_name))
|
||||
.setSmallIcon(R.drawable.ic_launcher)
|
||||
.setContentIntent(pi)
|
||||
|
|
Loading…
Reference in a new issue