Skip to main content

Twilio Video Adobe Native Extension - Build your extension - Part 3

By now, you will be having your interface and android library. If you missed how to build interface, look here. If you missed android library building, check our here.

Now let us integrate both code to have our extension.

Create extension directory

Create a directory named extension which will hold both wrapper and android libraries and will generate the extension.
Create a sub directory named android.

Copy wrapper library

Copy our wrapper library TwilioVideo.swc to extension directory. Also copy library.swf to android folder.

Copy android library

Next copy android library(jar type file found in build/classes/artifacts/{artifact name} of your android project) to android directory.

Copy android resource files

Our extension need JNI files used by Twilio video to be added as a resource. So download your approriate twilio video version aar file from

Now unzip the downloaded aar file and create a directory named libs inside android directory in extension folder. You will find a jni folder inside unzipped aar file. Copy all directories inside jni folder to newly created libs folder.

Next, we need to add our video activity layout file because adobe cannot access android library resource files directly. Create a directory name res in android folder. Next, create another directory inside layout inside res folder.
Copy your activity_view.xml file from android project to newly created layout file. Rename copied file to name specified as layoutId(exclude layout. word) in call method in in android library. Keep file type as xml.

Create extension configuration file

Create a xml file named extensions.xml. Add below code to create xml file

<?xml version="1.0"?>

<extension xmlns="">




    <platform name="Android-ARM">








Text inside id tag will be used to include extension in your adobe air app. nativeLibrary text will have jar file name inside android directory which will be the generated artifact.
initializer will be the FREExtension class that will be called to get extension context. In our case, it will be

Build your extension

Execute below command to generate final extension

adt -package -target ane TwilioVideo.ane extension.xml -swc TwilioVideo.swc -platform Android-ARM -C android .

This will generate TwilioVideo.ane file which can be integrated to your Adobe AIR app project.

Check ijasnahamed > Twilio Video > extension to get an example extension.


  1. Il nostro team si occupa della realizzazione di siti web, anche e-commerce, predisposti per la vendita online dei tuoi prodotti, dello sviluppo di app per i principali sistemi operativi, progetti legati alla realtà aumentata e virtuale, web marketing e social media communication.I servizi che offriamo, sono orientati agli obiettivi e alle esigenze del cliente app Android.

  2. Great Article
    Cloud Computing Projects

    Networking Projects

    Final Year Projects for CSE

    JavaScript Training in Chennai

    JavaScript Training in Chennai

    The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training


Post a Comment

Popular posts from this blog

Start an android activity from cordova plugin

We all need to start an android activity from a cordova plugin. Here is a small and complete code to start an activity from cordova plugin
1. Install plugman to create cordova plugin npm install -g plugman2. Create cordova plugin using plugman plugman create --name PluginName --plugin_id com.example.sample.plugin --plugin_version 0.0.1
N.B : plugin id never start with Uppercase Now PluginName directory will be created. Plugin structure will be
> PluginName/

> |- plugin.xml

> |- src/

> |- www/PluginName.js

3. Add android platform to plugin
plugman platform add --platform_name android
Now plugin structure will be

> PluginName/

> |- plugin.xml

> |- src/android/

> |- www/PluginName.js

4. Now create a java file named in src/android diretory
This activity will be shown using our plugin. Write sample activity in
package com.example.sample.plugin; import; import android.os.Bundle;…

Setup Asterisk 13 with FreePBX 13 in CentOS 7

Launch CentOS 7 AWS Ec2 InstanceLog in to your aws consoleGo to ec2 management page and click Launch Instance on Instance pageIn Choose AMI step, go to AWS MarketPlace tab and search CentOS 7 on search field. List of centos 7 ami's will be available.Select CentOS 7 (x86_64) ami which is free tier eligible. Select your instance type and click configure instance. Keep default values from Configure Instance to Add Tags stepsIn configure security group, create a security group which allow minimum ports openSSH : port 22HTTP : port 80Custom UDP Rule : 10000-20000 (if you are giving RTP ports 10000-20000)Custom UDP Rule : 5060 (ChanSIP port)Custom TCP Rule : 5060 (ChanSIP Port)Click Launch Instance. Select your key file and accept terms to launch instance.
Setup CentOS Server SSH into newly created CentOS server with username centos and your key file.Update all existing packagessudo yum update -yNow start http service(you can access your server via browser by going to your server ip addres…

Implementing Client Side WebRTC using Sipml5 javascript

Step 1:

Download and require Sipml5 library function.

Step 2:

Initialize sipml5 Engine in your web page :

var readyCallback = function(e) {
// function called when sipml is successfully initialised.
createSipStack(); // calling this function to create sip stack(see below)

var errorCallback = function(e) {
// function called when error occured during sipml initialisation.

SIPml.init(readyCallback, errorCallback);

Step 3:

Create Sip Stack :-
Sip Stack is an object that must be created before making/receiving call and sms. Creating Sip stack is an asynchronous process, so you need to create an event listener function to get state change notification.

var sipStack;

function EventListener(e) {

* e.type ;type of event listener
* e.session ; current event session
* e.getSipResponseCode() ; event response code
* e.description ; event description

if(e.type == 'started'){
// successfully started the stack.
} else if(e.type == 'i_new_call'){
// when new incoming call comes.