diff --git a/android/src/main/java/com/example/medianotification/MediaNotificationPlugin.java b/android/src/main/java/com/example/medianotification/MediaNotificationPlugin.java
index e7dd79f..869208b 100644
--- a/android/src/main/java/com/example/medianotification/MediaNotificationPlugin.java
+++ b/android/src/main/java/com/example/medianotification/MediaNotificationPlugin.java
@@ -42,7 +42,8 @@ public void onMethodCall(MethodCall call, Result result) {
final String title = call.argument("title");
final String author = call.argument("author");
final boolean play = call.argument("play");
- show(title, author, play);
+ final boolean beint = call.argument("beint");
+ show(title, author, play, beint);
result.success(null);
break;
@@ -88,7 +89,7 @@ public void notImplemented() { }
}
}
- public static void show(String title, String author, boolean play) {
+ public static void show(String title, String author, boolean play, boolean beint) {
Log.i(TAG, "show");
if (nPanel != null) {
nPanel.releaseLocks();
@@ -103,7 +104,7 @@ public static void show(String title, String author, boolean play) {
notificationManager.createNotificationChannel(channel);
}
}
- nPanel = new NotificationPanel(registrar.context(), title, author, play);
+ nPanel = new NotificationPanel(registrar.context(), title, author, play, beint);
}
private void hide() {
@@ -117,7 +118,7 @@ private void stopSound() {
if (nPanel != null) {
nPanel.stopSound();
} else {
- show("RÚV", "", false);
+ //show("RÚV", "", false);
nPanel.stopSound();
hide();
}
@@ -128,7 +129,7 @@ private void getWifiLock() {
if (nPanel != null) {
nPanel.getWifiLock();
} else {
- show("RÚV", "", false);
+ //show("RÚV", "", false);
nPanel.getWifiLock();
hide();
}
@@ -140,7 +141,7 @@ private void releaseLocks() {
if (nPanel != null) {
nPanel.releaseLocks();
} else {
- show("RÚV", "", false);
+ //show("RÚV", "", false);
nPanel.releaseLocks();
hide();
}
diff --git a/android/src/main/java/com/example/medianotification/NotificationPanel.java b/android/src/main/java/com/example/medianotification/NotificationPanel.java
index b0ecaa6..a0ab8c9 100644
--- a/android/src/main/java/com/example/medianotification/NotificationPanel.java
+++ b/android/src/main/java/com/example/medianotification/NotificationPanel.java
@@ -32,16 +32,18 @@ public class NotificationPanel extends Activity {
private String title;
private String author;
private boolean play;
+ private boolean beint;
private WifiManager.WifiLock wifiLock;
private PowerManager.WakeLock wakeLock;
private AudioManager audioManager;
PowerManager powerManager;
- public NotificationPanel(Context parent, String title, String author, boolean play) {
+ public NotificationPanel(Context parent, String title, String author, boolean play, boolean beint) {
this.parent = parent;
this.title = title;
this.author = author;
this.play = play;
+ this.beint = beint;
Intent dismissIntent = new Intent(parent, NotificationReturnSlot.class)
.setAction("dismiss");
@@ -73,6 +75,15 @@ public NotificationPanel(Context parent, String title, String author, boolean pl
remoteView.setImageViewResource(R.id.toggle, R.drawable.baseline_play_arrow_black_48);
}
+ if (this.beint) {
+ remoteView.setImageViewResource(R.id.prev, R.drawable.baseline_replay_30_black_36);
+ remoteView.setImageViewResource(R.id.next, R.drawable.baseline_skip_next_black_36);
+ } else {
+ remoteView.setImageViewResource(R.id.prev, R.drawable.baseline_replay_30_black_36);
+ remoteView.setImageViewResource(R.id.next, R.drawable.baseline_forward_30_black_36
+ );
+ }
+
setListeners(remoteView);
nBuilder.setContent(remoteView);
@@ -198,7 +209,9 @@ public void setListeners(RemoteViews view){
.setAction("toggle")
.putExtra("title", this.title)
.putExtra("author", this.author)
- .putExtra("action", !this.play ? "play" : "pause");
+ .putExtra("action", !this.play ? "play" : "pause")
+ .putExtra("beint", this.beint);
+
PendingIntent pendingIntent = PendingIntent.getBroadcast(parent, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);
view.setOnClickPendingIntent(R.id.toggle, pendingIntent);
diff --git a/android/src/main/java/com/example/medianotification/NotificationReturnSlot.java b/android/src/main/java/com/example/medianotification/NotificationReturnSlot.java
index 8bb4903..af95d37 100644
--- a/android/src/main/java/com/example/medianotification/NotificationReturnSlot.java
+++ b/android/src/main/java/com/example/medianotification/NotificationReturnSlot.java
@@ -32,8 +32,9 @@ public void onReceive(Context context, Intent intent) {
String title = intent.getStringExtra("title");
String author = intent.getStringExtra("author");
String action = intent.getStringExtra("action");
+ boolean beint = intent.getBooleanExtra("beint",false);
- MediaNotificationPlugin.show(title, author, action.equals("play"));
+ MediaNotificationPlugin.show(title, author, action.equals("play"), beint);
MediaNotificationPlugin.callEvent(action);
break;
diff --git a/android/src/main/res/drawable-hdpi/baseline_forward_30_black_18.png b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_18.png
new file mode 100755
index 0000000..183ac09
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_18.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_forward_30_black_24.png b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_24.png
new file mode 100755
index 0000000..0d6ba5c
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_24.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_forward_30_black_36.png b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_36.png
new file mode 100755
index 0000000..823acdb
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_36.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_forward_30_black_48.png b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_48.png
new file mode 100755
index 0000000..1c25388
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_forward_30_black_48.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_replay_30_black_18.png b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_18.png
new file mode 100755
index 0000000..169f622
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_18.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_replay_30_black_24.png b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_24.png
new file mode 100755
index 0000000..d26b177
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_24.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_replay_30_black_36.png b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_36.png
new file mode 100755
index 0000000..6008a43
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_36.png differ
diff --git a/android/src/main/res/drawable-hdpi/baseline_replay_30_black_48.png b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_48.png
new file mode 100755
index 0000000..63fad56
Binary files /dev/null and b/android/src/main/res/drawable-hdpi/baseline_replay_30_black_48.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_forward_30_black_18.png b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_18.png
new file mode 100755
index 0000000..a865ed1
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_18.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_forward_30_black_24.png b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_24.png
new file mode 100755
index 0000000..86cc491
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_24.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_forward_30_black_36.png b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_36.png
new file mode 100755
index 0000000..0d6ba5c
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_36.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_forward_30_black_48.png b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_48.png
new file mode 100755
index 0000000..b1ce8fd
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_forward_30_black_48.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_replay_30_black_18.png b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_18.png
new file mode 100755
index 0000000..ed7751f
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_18.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_replay_30_black_24.png b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_24.png
new file mode 100755
index 0000000..19378ef
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_24.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_replay_30_black_36.png b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_36.png
new file mode 100755
index 0000000..d26b177
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_36.png differ
diff --git a/android/src/main/res/drawable-mdpi/baseline_replay_30_black_48.png b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_48.png
new file mode 100755
index 0000000..f23e22c
Binary files /dev/null and b/android/src/main/res/drawable-mdpi/baseline_replay_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_18.png b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_18.png
new file mode 100755
index 0000000..0d6ba5c
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_24.png b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_24.png
new file mode 100755
index 0000000..b1ce8fd
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_36.png b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_36.png
new file mode 100755
index 0000000..1c25388
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_48.png b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_48.png
new file mode 100755
index 0000000..206108c
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_forward_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_18.png b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_18.png
new file mode 100755
index 0000000..d26b177
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_24.png b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_24.png
new file mode 100755
index 0000000..f23e22c
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_36.png b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_36.png
new file mode 100755
index 0000000..63fad56
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_48.png b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_48.png
new file mode 100755
index 0000000..307029d
Binary files /dev/null and b/android/src/main/res/drawable-xhdpi/baseline_replay_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_18.png b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_18.png
new file mode 100755
index 0000000..823acdb
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_24.png b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_24.png
new file mode 100755
index 0000000..1c25388
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_36.png b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_36.png
new file mode 100755
index 0000000..fa537cb
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_48.png b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_48.png
new file mode 100755
index 0000000..d11e8ce
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_forward_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_18.png b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_18.png
new file mode 100755
index 0000000..6008a43
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_24.png b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_24.png
new file mode 100755
index 0000000..63fad56
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_36.png b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_36.png
new file mode 100755
index 0000000..5fe0c1a
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_48.png b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_48.png
new file mode 100755
index 0000000..a482691
Binary files /dev/null and b/android/src/main/res/drawable-xxhdpi/baseline_replay_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_18.png b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_18.png
new file mode 100755
index 0000000..1c25388
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_24.png b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_24.png
new file mode 100755
index 0000000..206108c
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_36.png b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_36.png
new file mode 100755
index 0000000..d11e8ce
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_48.png b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_48.png
new file mode 100755
index 0000000..e953353
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_forward_30_black_48.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_18.png b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_18.png
new file mode 100755
index 0000000..63fad56
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_18.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_24.png b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_24.png
new file mode 100755
index 0000000..307029d
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_24.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_36.png b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_36.png
new file mode 100755
index 0000000..a482691
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_36.png differ
diff --git a/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_48.png b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_48.png
new file mode 100755
index 0000000..af9303b
Binary files /dev/null and b/android/src/main/res/drawable-xxxhdpi/baseline_replay_30_black_48.png differ
diff --git a/android/src/main/res/layout/notificationlayout.xml b/android/src/main/res/layout/notificationlayout.xml
index e0c1df2..ddee7c0 100644
--- a/android/src/main/res/layout/notificationlayout.xml
+++ b/android/src/main/res/layout/notificationlayout.xml
@@ -37,7 +37,6 @@
android:layout_toLeftOf="@id/toggle"
android:padding="4dp"
android:paddingRight="0dp"
- android:src="@drawable/baseline_skip_previous_black_36"
/>
\ No newline at end of file
diff --git a/lib/media_notification.dart b/lib/media_notification.dart
index 12df980..3dcfd3a 100644
--- a/lib/media_notification.dart
+++ b/lib/media_notification.dart
@@ -16,11 +16,12 @@ class MediaNotification {
});
}
- static Future show({@required title, @required author, play = true}) async {
+ static Future show({@required title, @required author, play = true, beint = false}) async {
final Map params = {
'title': title,
'author': author,
- 'play': play
+ 'play': play,
+ 'beint': beint
};
await _channel.invokeMethod('show', params);