Guest User

Untitled

a guest
Oct 19th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. componentDidMount () {
  2. if (Platform.OS === 'android') {
  3. Linking.getInitialURL().then(url => {
  4. if (url) {
  5. this.myFunc(url)
  6. }
  7. })
  8. }
  9.  
  10. Linking.addEventListener('url', (event) => { this.myFunc(event.url) })
  11. }
  12.  
  13. myFunc = (url) => {
  14. Alert.alert(
  15. `Deep link: ${url}`
  16. )
  17. }
Add Comment
Please, Sign In to add comment