Commit 92393e6e by Sebastián Katzer

Merge branch 'master' of github.com:katzer/cordova-plugin-local-notifications

parents f33aaa00 df31c9b1
......@@ -76,7 +76,8 @@
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</config-file>
<!--libs/android/android-support-v4.jar-->
<lib-file src="libs/android/android-support-v4.jar" />
<source-file src="src/android/LocalNotification.java" target-dir="src/de/appplant/cordova/plugin/localnotification" />
<source-file src="src/android/Receiver.java" target-dir="src/de/appplant/cordova/plugin/localnotification" />
<source-file src="src/android/Options.java" target-dir="src/de/appplant/cordova/plugin/localnotification" />
......
......@@ -29,7 +29,8 @@ import org.json.JSONObject;
import android.annotation.SuppressLint;
import android.app.Notification;
import android.app.Notification.Builder;
import android.support.v4.app.*;
import android.support.v4.app.NotificationCompat.*;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
......@@ -121,7 +122,7 @@ public class Receiver extends BroadcastReceiver {
Bitmap icon = BitmapFactory.decodeResource(context.getResources(), options.getIcon());
Uri sound = options.getSound();
Builder notification = new Notification.Builder(context)
Builder notification = new NotificationCompat.Builder(context)
.setContentTitle(options.getTitle())
.setContentText(options.getMessage())
.setNumber(options.getBadge())
......@@ -136,7 +137,7 @@ public class Receiver extends BroadcastReceiver {
}
if (Build.VERSION.SDK_INT > 16) {
notification.setStyle(new Notification.BigTextStyle()
notification.setStyle(new NotificationCompat.BigTextStyle()
.bigText(options.getMessage()));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment