cordova-startapp
cordova-startapp copied to clipboard
Cordova (aka PhoneGap) plugin to start external activity (Android and iOS)
StartApp plugin for Cordova
License
MIT/X11
Usage
See Android and iOS folders for Android and iOS usage, respectivelly.
If you want to build for both platforms
-
Add
iOS/StartApp.mandiOS/StartApp.hfiles to your iOS project inPluginsdirectory. -
Add
iOS/startapp.jsto your web application asstartapp.ios.js. -
Add
<key>StartApp</key> <string>StartApp</string>to your
Cordova.plistinside<key>Plugins</key><dict>...</dict> -
Copy
Android/StartApp.javatosrc/com/phonegap/plugins/startappdirectory of your Android project. -
Add
Android/startapp.jsto your web application asstartapp.android.js. -
Add
<plugin name="StartApp" value="com.phonegap.plugins.startapp.StartApp"/>to your
res/xml/config.xmlinside<plugins></plugins>. -
Copy corresponding JS file to
startapp.jswhen building the project. -
Include
startapp.json your HTML pages. -
Use
window.startapp.start( { android: 'com.mycompany.myapp/com.mycompany.myapp.MyActivity', ios: 'myURL' }, successCallback, failureCallback );whenever required.