Commit eb188c8
Add deep linking support to IntentAndroid
Summary:
Add a method to handle URLs registered to the app,
```js
IntentAndroid.getInitialURL(url => {
if (url) {
// do stuff
}
});
```
Refer - http://developer.android.com/training/app-indexing/deep-linking.html#adding-filters
The API cannot be same as the iOS API (i.e. as a constant), as the activity is not availble at the time of module initialization. Moreover, multiple activties can share the same bridge instance, and the activity itself is not a constant. Hence the initialURL can change.
Closes #4320
Reviewed By: svcscm
Differential Revision: D2759667
Pulled By: foghina
fb-gh-sync-id: b725231ae1401fa5565d444eee5a30d303e263ae1 parent cf94a9e commit eb188c8
File tree
2 files changed
+78
-10
lines changed- Libraries/Components/Intent
- ReactAndroid/src/main/java/com/facebook/react/modules/intent
2 files changed
+78
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
19 | 39 | | |
20 | 40 | | |
21 | 41 | | |
| |||
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
78 | 112 | | |
79 | 113 | | |
80 | 114 | | |
| |||
Lines changed: 44 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
36 | 64 | | |
37 | 65 | | |
38 | 66 | | |
39 | 67 | | |
40 | 68 | | |
41 | 69 | | |
42 | | - | |
| 70 | + | |
43 | 71 | | |
44 | 72 | | |
45 | 73 | | |
46 | 74 | | |
47 | 75 | | |
48 | 76 | | |
| 77 | + | |
49 | 78 | | |
| 79 | + | |
50 | 80 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
55 | 88 | | |
56 | 89 | | |
57 | 90 | | |
| |||
61 | 94 | | |
62 | 95 | | |
63 | 96 | | |
64 | | - | |
65 | | - | |
| 97 | + | |
| 98 | + | |
66 | 99 | | |
67 | 100 | | |
68 | 101 | | |
69 | 102 | | |
70 | 103 | | |
71 | 104 | | |
| 105 | + | |
72 | 106 | | |
73 | 107 | | |
74 | 108 | | |
75 | 109 | | |
76 | 110 | | |
77 | 111 | | |
78 | | - | |
| 112 | + | |
79 | 113 | | |
80 | 114 | | |
81 | 115 | | |
| |||
0 commit comments