diff options
author | tobiasKaminsky <tobias@kaminsky.me> | 2020-04-07 17:46:07 +0300 |
---|---|---|
committer | Stefan Niedermann <info@niedermann.it> | 2020-04-07 21:14:41 +0300 |
commit | 3ac41961c624ee201b4a39a4ceb768b7e3215661 (patch) | |
tree | ad61a394803cff13191d42ef6e14f71af262edbb /app/src/main | |
parent | 9a9c423e9022cc4ed173979fdefca6562c580299 (diff) |
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
Diffstat (limited to 'app/src/main')
-rw-r--r-- | app/src/main/AndroidManifest.xml | 4 | ||||
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java | 23 |
2 files changed, 11 insertions, 16 deletions
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 667f44028..21ae51972 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -89,7 +89,7 @@ android:label="@string/app_name" android:theme="@style/AppTheme"> <intent-filter> - <action android:name="android.intent.action.VIEW"/> + <action android:name="android.intent.action.MAIN"/> </intent-filter> </activity> @@ -109,4 +109,4 @@ </service> </application> -</manifest>
\ No newline at end of file +</manifest> 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 index cbccb4f6a..1a87dd86e 100644 --- a/app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java +++ b/app/src/main/java/it/niedermann/nextcloud/deck/ui/PushNotificationActivity.java @@ -1,10 +1,5 @@ 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; @@ -12,16 +7,16 @@ 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); + protected void onResume() { + // when app is running in background or is starting after force reset + super.onResume(); + + // todo check if getIntent really exists + String account = getIntent().getStringExtra("account"); + DeckLog.info("push: " + account); - Intent receivedIntent = getIntent(); - String receivedAction; - String receivedType; - receivedAction = receivedIntent.getAction(); - receivedType = receivedIntent.getType(); - DeckLog.info(receivedAction); - DeckLog.info(receivedType); + int nid = getIntent().getIntExtra("nid", -1); + DeckLog.info("push: " + nid); // TODO simply open the given URL until proper handling has been implemented } |