Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NotificationActionReceiverDownloadWebPage.java')
-rw-r--r--News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NotificationActionReceiverDownloadWebPage.java27
1 files changed, 27 insertions, 0 deletions
diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NotificationActionReceiverDownloadWebPage.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NotificationActionReceiverDownloadWebPage.java
new file mode 100644
index 00000000..3a6ad407
--- /dev/null
+++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/NotificationActionReceiverDownloadWebPage.java
@@ -0,0 +1,27 @@
+package de.luhmer.owncloudnewsreader.helper;
+
+import android.content.BroadcastReceiver;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+
+import org.greenrobot.eventbus.EventBus;
+
+import de.luhmer.owncloudnewsreader.services.events.StopWebArchiveDownloadEvent;
+
+import static de.luhmer.owncloudnewsreader.Constants.NOTIFICATION_ACTION_STOP_STRING;
+
+public class NotificationActionReceiverDownloadWebPage extends BroadcastReceiver {
+ private static final String TAG = NotificationActionReceiver.class.getCanonicalName();
+
+ @Override
+ public void onReceive(Context context, Intent intent) {
+ String action = intent.getAction();
+ if (NOTIFICATION_ACTION_STOP_STRING.equals(action)) {
+ Log.d(TAG, "NOTIFICATION_ACTION_STOP_STRING");
+ EventBus.getDefault().post(new StopWebArchiveDownloadEvent());
+ } else {
+ Log.d(TAG, action);
+ }
+ }
+}