MIT/X11
See Android and iOS folders for Android and iOS usage, respectivelly.
-
Add
iOS/StartApp.m
andiOS/StartApp.h
files to your iOS project inPlugins
directory. -
Add
iOS/startapp.js
to your web application asstartapp.ios.js
. -
Add
<key>StartApp</key> <string>StartApp</string>
to your
Cordova.plist
inside<key>Plugins</key><dict>...</dict>
-
Copy
Android/StartApp.java
tosrc/com/phonegap/plugins/startapp
directory of your Android project. -
Add
Android/startapp.js
to your web application asstartapp.android.js
. -
Add
<plugin name="StartApp" value="com.phonegap.plugins.startapp.StartApp"/>
to your
res/xml/config.xml
inside<plugins></plugins>
. -
Copy corresponding JS file to
startapp.js
when building the project. -
Include
startapp.js
on your HTML pages. -
Use
window.startapp.start( { android: 'com.mycompany.myapp/com.mycompany.myapp.MyActivity', ios: 'myURL' }, successCallback, failureCallback );
whenever required.