You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+52-36Lines changed: 52 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,23 +117,6 @@ If your links are of the form `bnc.lt`, you must still use this domain in your c
117
117
```
118
118
`READ_FROM_DASHBOARD` is the four-character value in front of all your links. You can find it underneath the field labeled SHA256 Cert Fingerprints on the [dashboard](https://dashboard.branch.io/settings/link). It will look something like this: `/WSuf` (the initial `/` character should be included).
119
119
120
-
---------------
121
-
122
-
## Non-Branch Links
123
-
There are instances where non-branch links are detected by the plugin but not processed.
124
-
You can retrieve the url by implementing the method `NonBranchLinkHandler()` which will act as our callback to return the non-branch url.
125
-
126
-
To implement:
127
-
128
-
```js
129
-
functionNonBranchLinkHandler(data) {
130
-
if (data) {
131
-
alert('Non-Branch Link Detected: '+JSON.stringify(data));
132
-
}
133
-
}
134
-
```
135
-
---------------
136
-
137
120
## Promises
138
121
139
122
**Most methods are promisified**, therefore you can easily get its success and error callback by chaining the `.then()` method.
There are instances where non-branch links are detected by the plugin but not processed.
179
+
You can retrieve the url by calling the method `onNonBranchLink(hook)` which will register
180
+
a callback to receive the non-branch url.
193
181
194
182
##### Usage
195
-
The `initSession()` method automatically sets an internal deep link hander whose data can be accesed by implementing the **required**`DeepLinkHandler()` method. To implement this, first call the method `initSession`:
alert('Non-Branch Link Detected: '+JSON.stringify(data));
187
+
}
188
+
});
208
189
```
209
190
210
-
Then you should **EXPLICITLY** define a global method called `DeepLinkHandler()` which will act as our callback when the session beings. The deep link data will be included here:
Initializes the branch instance. **Note:**`setDebug()` should be called first before calling this method. Takes a listener that will be triggered on opening of a branch link.
194
+
195
+
##### Usage
211
196
212
197
```js
213
-
functionDeepLinkHandler(data) {
198
+
functiononBranchLinkHook(data) {
214
199
if (data) {
215
200
alert('Data from deep link: '+JSON.stringify(data));
Note, if you are unsure how to set a global function or you are getting a `Reference not defined` error with `DeepLinkHandler`, please review this [Github issue](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking/issues/128).
This method allows the Branch SDK to pass the user's Mixpanel distinct id to our servers. Branch will then pass that Distinct ID to Mixpanel when logging any event.
@@ -683,6 +676,29 @@ Go to your `build.gradle` file and find **dependencies** and add the following i
0 commit comments