File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,12 @@ import {
15
15
initLanguages ,
16
16
ContainerProvider ,
17
17
MainContainer ,
18
+ TOKENS ,
18
19
} from '@hyperledger/aries-bifold-core'
19
20
import { useNavigation } from '@react-navigation/native'
20
21
import React , { useEffect , useState , useMemo } from 'react'
21
22
import { useTranslation } from 'react-i18next'
22
- import { StatusBar } from 'react-native'
23
+ import { Linking , StatusBar } from 'react-native'
23
24
import { isTablet } from 'react-native-device-info'
24
25
import Orientation from 'react-native-orientation-locker'
25
26
import SplashScreen from 'react-native-splash-screen'
@@ -55,6 +56,19 @@ const App = () => {
55
56
}
56
57
57
58
useEffect ( ( ) => {
59
+ // this block fixes an issue when deep-link doesn't work
60
+ // when the app is fully terminated on Android.
61
+ // TODO: review and look for a fix
62
+ async function getInitialURL ( ) {
63
+ const url = await Linking . getInitialURL ( )
64
+ const logger = bcwContainer . resolve ( TOKENS . UTIL_LOGGER )
65
+ if ( url ) {
66
+ logger . info ( `App launched with URL: ${ url } ` )
67
+ } else {
68
+ logger . info ( 'App launched without URL' )
69
+ }
70
+ }
71
+ getInitialURL ( )
58
72
// Hide the native splash / loading screen so that our
59
73
// RN version can be displayed.
60
74
SplashScreen . hide ( )
You can’t perform that action at this time.
0 commit comments