Skip to content

Handle External Links

Kristiyan Petrov edited this page Jan 23, 2019 · 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.

Preconditions

  • 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.

Handle link

Once you have the preconditions you may start the activity with the Bandyer Intent.

Intent intent = new BandyerIntent.Builder()
               		.startFromJoinCallUrl(this, joinUrl)
                    	//let's also add chat capability
                    	.withChatCapability();

startActivityForResult(intent, START_CALL_CODE);
Clone this wiki locally