Android - Launch Floating Activity from Cordova JS [ Supported Phonegap <3.0.0 ]
MIT/X11
-
Create
src/com/phonegap/plugins/floatingactivityplugin
directory. -
Copy
FloatingActivityPlugin.java
tosrc/com/phonegap/plugins/floatingactivityplugin
directory. -
Add
FloatingActivityPlugin.js
to your web application. -
Add
<plugin name="FloatingActivityPlugin" value="com.phonegap.plugins.floatingactivityplugin.FloatingActivityPlugin"/>
to your
res/xml/config.xml
inside<plugins></plugins>
. -
Use
window.FloatingActivityPlugin.launchplugin( {"activity": "ChatHeadService"}, success, failed );
whenever required.