... | @@ -74,12 +74,18 @@ B4S can relate beacon interactions to individual customers. Supplying the custom |
... | @@ -74,12 +74,18 @@ B4S can relate beacon interactions to individual customers. Supplying the custom |
|
|
|
|
|
### Deep linking
|
|
### Deep linking
|
|
|
|
|
|
Notifications such as web links or simple messages are handled directly by the SDK. For deep linking, there are three options, which can be set using `NotificationService.registerDeepLinkStyle(NotificationService.DeepLinkStyle)`:
|
|
Notifications such as web links or simple messages are handled directly by the SDK. For deep linking, there are three options:
|
|
|
|
|
|
- `DeepLinkStyle.LaunchActivityClearTask` - (Default) Deep links are delivered to your launch Activity, and always in a new task (with an Activity restart)
|
|
- `DeepLinkStyle.LaunchActivityClearTask` - (Default) Deep links are delivered to your launch Activity, and always in a new task (with an Activity restart)
|
|
- `DeepLinkStyle.LaunchActivityDirect` - Deep links are delivered to your launch Activity; if this is already running the Intent is delivered directly to your `onNewIntent` lifecycle method
|
|
- `DeepLinkStyle.LaunchActivityDirect` - Deep links are delivered to your launch Activity; if this is already running the Intent is delivered directly to your `onNewIntent` lifecycle method
|
|
- `DeepLinkStyle.BroadcastReceiver` - Deep links are broadcasted with a `com.ezeeworld.b4s.android.sdk.notifications.DEEP_LINK` Intent action type
|
|
- `DeepLinkStyle.BroadcastReceiver` - Deep links are broadcasted with a `com.ezeeworld.b4s.android.sdk.notifications.DEEP_LINK` Intent action type
|
|
|
|
|
|
|
|
The strategy can be set by calling a static method, typically after you have initialized the SDK in your `Application` class:
|
|
|
|
|
|
|
|
```java
|
|
|
|
NotificationService.registerDeepLinkStyle(NotificationService.DeepLinkStyle deepLinkStyle);
|
|
|
|
```
|
|
|
|
|
|
When you configure to use `DeepLinkStyle.BroadcastReceiver` deep links, the application can and must register a `BroadcastReceiver` that handles the deep links, such as opening a specific Activity or starting a Service. In your `AndroidManifest.xml` you declare:
|
|
When you configure to use `DeepLinkStyle.BroadcastReceiver` deep links, the application can and must register a `BroadcastReceiver` that handles the deep links, such as opening a specific Activity or starting a Service. In your `AndroidManifest.xml` you declare:
|
|
|
|
|
|
```xml
|
|
```xml
|
... | | ... | |