ShowTable of Contents
Your environment is setup with Worklight 6.0 and Web Experience Factory(WEF) 188.8.131.52 prior to using these samples. Refer to Getting Started and Enabling Worklight Support
for more details about configuring your environment. The references section at the end of this article provides additional links to Worklight and WEF documentation.
For more details about the feature pack and download links, check Multichannel Feature Pack for IBM Web Experience Factory 184.108.40.206
Setting up the samples
The WLEnable.zip file attached to this article includes two samples. You must create a Hybrid app with IBM Worklight and install it on your device. The steps to create a hybrid worklight project that references the WEF samples is in the 'Getting Started and Enabling Worklight Support' article.
The setup for the Camera builder samples, as mentioned in 'Getting Started and Enabling Worklight Support' article, and the Worklight Enable builder samples is different. Updates to the setup instructions are provided here. The section and step numbers below are referenced from the 'Getting Started and Enabling Worklight Support' article.
1. Section  Creating a WEF project --> Step d -->
changes are needed to WEF_project \ WebContent \ WEB-INF \ config \ override.properties
file because we are not uploading any image files.
2. Section  Creating a hybrid shell that points to your WEF server application --> Step a -->
You only need to add the following user permissions to Worklight_project \ apps \ Your_App \ android \ native \ AndroidManifest.xml
<!--For Device API -->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!--For Notification API -->
<uses-permission android:name="android.permission.VIBRATE" />
<!--For Media API -->
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
3. Section  Creating a hybrid shell that points to your WEF server application --> Step b -->
No changes are needed to Worklight_project \ apps \ Your_App \ android \ native \ src \ com \ Your_App \ Your_App.java file.
Instead you must modify Worklight_project \ apps \ Your_App \ application-descriptor.xml file by changing the tag to refer to your WEF model URL.
Button names are self explanatory. The Get Device Info button displays device model, platform, version, and cordova version. The Vibrate Notification, Beep Notification, Alert Notification and Confirm Notification buttons make use of Notification API to provide the respective visual or tactile notifications.
The playing and recording is limited to 10 sec, but you can stop it anytime using the stop buttons.
Worklight Enable builder Doc
IBM Worklight v6.0 Getting Started
Cordova API Reference Doc