-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Is there a way to add fullScreenIntent to a notification? #1482
Comments
Ok, I've almost got it and it uses the Telecom API (I think) which is great, but the notification will not dismiss on button click: RNPushNotificationHelper.java line 273: RNPushNotificationHelper.java line 278: AndroidManifest.xml add singleTask: <activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:launchMode="singleTask" Anyone have any idea how the button presses can be hooked in to? Using |
Ok I got it working! I used this method: PushNotification.configure({
onNotification: (notification) => {
//Code to print array into console
console.log(notification);
//Code to be executed according to the action selected by the user
if (notification.action === "Answer") {
console.log('%c notification.action === "ANSWER"', 'color: green;',);
PushNotification.clearLocalNotification(1);
}
else if (notification.action === "Decline") {
console.log('%c notification.action === "DECLINE"', 'color: green;',);
}
},
popInitialNotification: true,
requestPermissions: true,
}); This basically provides the same interface that Whatsapp or HouseParty provide on an incoming call, which is what I've been looking for almost a year. I'm no Java dev so can't make a pr, but is there a plan to 'officially' support anything this? |
@whenmoon I am trying to achieve the same functionality like this for my app. Do you have any more details on how you achieved this? Thanks |
Hi @twelvearrays, you can either follow the steps above or use this - I forked the current dev branch and published on npm: |
This is not working for me. I get notifs but not in full screen? Any special settings for that? |
Checkout this PR I think it might help: #2112 |
Question
Hi, I'm looking to move away from custom Java modules for notifications to a React Native package. Currently I am using
.setFullScreenIntent(action, true);
in my notification builder, but I can't find anything similar in this package. Is there a way to do it, hacky or non-hacky?The text was updated successfully, but these errors were encountered: