diff options
author | Stefan Niedermann <info@niedermann.it> | 2020-04-07 16:46:31 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-07 21:14:41 +0300 |
commit | 121d2818a9fb8ff9ba312cd9bb822b680733e857 (patch) | |
tree | 74731a464a7efa9ea81e1a093e45c97ffe09497c /app/src | |
parent | 91f28997ffe97158db26d046df7d84f394091379 (diff) |
#208 Handle push notifications
Added dummy activity
Signed-off-by: Stefan Niedermann <info@niedermann.it>
Diffstat (limited to 'app/src')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java | 28 |
2 files changed, 34 insertions, 0 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 2fd1423b1..17350fda9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -85,6 +85,12 @@ android:theme="@style/AppTheme" /> <activity + android:name=".ui.PushNotificationActivity" + android:label="@string/app_name" + android:parentActivityName="it.niedermann.nextcloud.deck.ui.PushNotificationActivity" + android:theme="@style/AppTheme" /> + + <activity android:name=".ui.exception.ExceptionActivity" android:process=":error_activity" /> diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java b/app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java new file mode 100644 index 000000000..cbccb4f6a --- /dev/null +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java @@ -0,0 +1,28 @@ +package it.niedermann.nextcloud.deck.ui; + +import android.content.Intent; +import android.os.Bundle; +import android.os.PersistableBundle; + +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + +import it.niedermann.nextcloud.deck.DeckLog; + +public class PushNotificationActivity extends AppCompatActivity { + + @Override + public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { + super.onCreate(savedInstanceState, persistentState); + + Intent receivedIntent = getIntent(); + String receivedAction; + String receivedType; + receivedAction = receivedIntent.getAction(); + receivedType = receivedIntent.getType(); + DeckLog.info(receivedAction); + DeckLog.info(receivedType); + + // TODO simply open the given URL until proper handling has been implemented + } +} |