This guide is out of date.
We are no longer supporting this mobile guide. It is still here strictly for informational purposes. We do not expect this guide to still work.
Android Native Apps
SIP.js web apps can be ported to Android using Crosswalk, which provides a WebRTC-capable WebView to display the web app without the conventional browser interface surrounding it. This guide will show you how to use Crosswalk to generate an Android app for the SIP.js Demo Phone on Mac OS X. Linux and Windows users should be able to follow along, as well.
- Create and go to a working directory:
mkdir /tmp/xwalk && cd /tmp/xwalk
- Install Crosswalk (instructions for OS X, Linux, Windows)
- Ensure your Android device can connect to your computer: Android Target Setup
Clone the sipjs-examples repository:
git clone https://github.com/onsip/sipjs-examples
Add an icon.png and a manifest.json to the demo-phone directory of the checked-out repository. This tells Crosswalk how the app should appear on the phone and which page to load when it opens. More detail can be found in the Crosswalk docs:
cd sipjs-examples/demo-phone curl -o icon.png https://raw.githubusercontent.com/onsip/sipjs-examples/crosswalk/demo-phone/icon.png curl -o manifest.json https://raw.githubusercontent.com/onsip/sipjs-examples/crosswalk/demo-phone/manifest.json # (or just `git checkout crosswalk`)
Native App Generation
Follow these steps from the Crosswalk docs, substituting the project’s paths/filenames in as needed:
- Go to the unpacked Crosswalk Android directory:
- Run the make_apk.py script with Python as follows:
python make_apk.py --manifest=../sipjs-examples/demo-phone/manifest.json
- Install the application on the target device:
adb install -r DemoPhone_0.0.0.1_arm.apk
- If the installation is successful, your application should now be on the Android target. Find its icon in the application list and open it.