Redirect to another screen
See original GitHub issueI want to push another page when the user touch notification
in another problem if i push an notification with actions like: actions: '["Accept", "Reject"]'
it doesnt show the action selected if app is foreground.
please, help me i try this so hard without results
import React from 'react';
import AppNavigator from './AppNavigator';
//PUSH NOTIFICATION
var PushNotification = require('react-native-push-notification');
PushNotification.configure({
// (optional) Called when Token is generated (iOS and Android)
onRegister: function(token) {
console.log( 'TOKEN:', token );
//console.warn('TOKEN:', token.token);
},
// (required) Called when a remote or local notification is opened or received
onNotification: function(notification) {
console.log( 'NOTIFICATION:', notification );
this.props.navigation.navigate('Details');
// process the notification
// required on iOS only (see fetchCompletionHandler docs: https://facebook.github.io/react-native/docs/pushnotificationios.html)
//notification.finish(PushNotificationIOS.FetchResult.NoData);
},
// ANDROID ONLY: GCM or FCM Sender ID (product_number) (optional - not required for local notifications, but is need to receive remote push notifications)
senderID: "MYSENDERID",
// IOS ONLY (optional): default: all - Permissions to register.
permissions: {
alert: true,
badge: true,
sound: true
},
// Should the initial notification be popped automatically
// default: true
popInitialNotification: true,
/**
* (optional) default: true
* - Specified if permissions (ios) and token (android and ios) will requested or not,
* - if not, you must call PushNotificationsHandler.requestPermissions() later
*/
requestPermissions: true,
});
//END
export default class App extends React.Component {
render() {
return (
<AppNavigator/>
);
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:12
Top Results From Across the Web
How to redirect from Screen 1 to another Screen 2...
Hello, On the first screen i have a button with OnSelecte (Navigate(Screen2,ScreenTransition.
Read more >How to redirect to other Screen without pressing button/link in ...
1 Answer 1 ... You have to use a state to know what screen to render, when that state change you must change...
Read more >Redirect to different screen in other module - OutSystems
Hi All,. I want to redirect to a screen in different module moduleBa from module Ain reactive web,I have linked to redirect url ......
Read more >Moving between screens - React Navigation
In this case, we know that we want to go back to Home so we can use navigate('Home') (not push ! try that...
Read more >Navigate to a new screen and back - Flutter documentation
Navigate to a new screen and back · 1. Create two routes · 2. Navigate to the second route using Navigator.push() · 3....
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 FreeTop 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
Top GitHub Comments
@saadmutahar take this as an example:
Sure, take this example