1
0
Fork 0
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:
Felix Ableitner 2014-05-13 10:40:54 +02:00
parent d369cd3876
commit 7a5855fec5
2 changed files with 14 additions and 1 deletions

View file

@ -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"

View file

@ -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)