mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-26 06:11:19 +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'
|
||||||
apply plugin: 'android_sign'
|
apply plugin: 'android_sign'
|
||||||
|
|
||||||
|
repositories {
|
||||||
|
mavenCentral()
|
||||||
|
maven {
|
||||||
|
url "http://4thline.org/m2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
compile 'com.android.support:support-v4:13.0.+'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
android {
|
android {
|
||||||
compileSdkVersion 19
|
compileSdkVersion 19
|
||||||
buildToolsVersion "19.0.3"
|
buildToolsVersion "19.0.3"
|
||||||
|
|
|
@ -6,6 +6,7 @@ import android.app.Service;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
|
import android.support.v4.app.NotificationCompat;
|
||||||
|
|
||||||
public class SyncthingService extends Service {
|
public class SyncthingService extends Service {
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ public class SyncthingService extends Service {
|
||||||
PendingIntent pi = PendingIntent.getActivity(
|
PendingIntent pi = PendingIntent.getActivity(
|
||||||
this, 0, new Intent(this, WebGuiActivity.class),
|
this, 0, new Intent(this, WebGuiActivity.class),
|
||||||
PendingIntent.FLAG_UPDATE_CURRENT);
|
PendingIntent.FLAG_UPDATE_CURRENT);
|
||||||
Notification n = new Notification.Builder(this)
|
Notification n = new NotificationCompat.Builder(this)
|
||||||
.setContentTitle(getString(R.string.app_name))
|
.setContentTitle(getString(R.string.app_name))
|
||||||
.setSmallIcon(R.drawable.ic_launcher)
|
.setSmallIcon(R.drawable.ic_launcher)
|
||||||
.setContentIntent(pi)
|
.setContentIntent(pi)
|
||||||
|
|
Loading…
Reference in a new issue