App does not open on notification click (should "pressAction" be a default without needing to specify it?)
See original GitHub issueApparent bug
It seems like the app does not open when clicking the notification body.
Environment
react-native: 0.66.4
@notifee/react-native: 4.0.1
,
device/api: Pixel_5_API_31
Reproduction steps
npx react-native init repro
npm i @notifee/react-native
- add
android:exported="true"
toAnroidManifest.xml
- update
build.gradle
withcompileSdkVersion = 31 targetSdkVersion = 31
- add provided code of minimal example
- build app
- click button to display notification
- minimize app and click notification
- in my case, the notification disappears after a short moment but the app does not open
minimal example:
/**
* Sample React Native App
* https://github.com/facebook/react-native
*
* @format
* @flow strict-local
*/
import React from 'react';
import {View, Button} from 'react-native';
import notifee from '@notifee/react-native';
const App = () => {
async function onDisplayNotification() {
const channelId = await notifee.createChannel({
id: 'default',
name: 'Default Channel',
});
await notifee.displayNotification({
title: 'title',
body: 'body',
android: {
channelId,
pressAction: {
id: 'default',
},
},
});
}
return (
<View>
<Button
title="Display Notification"
onPress={() => onDisplayNotification()}
/>
</View>
);
};
export default App;
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:39 (13 by maintainers)
Top Results From Across the Web
Interaction | Notifee
Press Action. Notifee does not provide any default interaction behaviour when a user presses a notification. The Android guidelines suggest a notification ...
Read more >React-Native navigate after a notification press - Stack Overflow
We've been on this for a few hours now but I can't seem to get the deep linking working. Everything works just fine...
Read more >Change notification and quick settings in Windows
You can change your notification settings at any time from the Settings app. Customize notifications. Select Start > Settings > System > Notifications....
Read more >How to make PWAs re-engageable using Notifications and Push
Having the ability to cache the contents of an app to work offline ... Let's start with notifications — they can work without...
Read more >Guide to React Native Push Notifications: How To Create and ...
App Open Events. A/B tests can be done to determine the efficacy of various notifications. For that you need to know which notification...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This works for me with flavors / applicationIdSuffice:
Just updating here on status, the latest release v4.1.0 contains a fix for apps targeting API 31 and devices running Android 12.