Skip to content

Commit

Permalink
#208 Handle push notifications
Browse files Browse the repository at this point in the history
Added dummy activity

Signed-off-by: Stefan Niedermann <info@niedermann.it>
  • Loading branch information
stefan-niedermann committed Apr 7, 2020
1 parent e4071cd commit a0b37f0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,12 @@
android:parentActivityName="it.niedermann.nextcloud.deck.ui.MainActivity"
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" />
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
}

0 comments on commit a0b37f0

Please sign in to comment.