-
Notifications
You must be signed in to change notification settings - Fork 4
Handle External Links
Kristiyan Petrov edited this page Apr 1, 2021
·
16 revisions
After on_call_incoming hook has been registered on your backend it is possible to parse the received payload and obtain http urls that can be used typically to send an incoming call email notification to your users.
These urls can be used at anytime to connect to an existing call or re-create it.
- Add the following code in the
AndroidManifest.xml
under the activity that you want to be able to handle the link. You will be able to get the link from the intent during onCreate or newIntent of the activity. See our demo_app example or refer to android official guide for a more details on how to listen and handle an external link.
<intent-filter android:autoVerify="true" tools:targetApi="m">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="sandbox.bandyer.com"
android:pathPrefix="/connect/rest-call-handler/"
android:scheme="https" />
</intent-filter>
- To handle the url the BandyerSDKClient must be initialized and running!
- Be sure also to call it only when the callModule of the BandyerSDKClient is ready.
Once you have the preconditions you may start the activity with the Bandyer Intent.
Intent intent = new BandyerIntent.Builder()
.startFromJoinCallUrl(this, joinUrl)
.withConfiguration(new SimpleCallConfiguration()) // optional
.build();
startActivity(intent);