Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 22 Next »

Acknowledgments 

  • iOS: Appoxee plugin support iOS7 and above

Prerequisites

  • Node and PhoneGap CLI installed on your mac.
  • Cordova 5.0.0 and above
  • Appoxee Cordova plugin 1.0.

Integration - Phase 1

  • Download the plugin
  • Add the plugin with the following command:

     

Cordova CLI
cd Path/To/My/MyPhonegapProject
cordova plugin add /path/to/location/of/plugin

Integration - Phase 2

Initialize the plugin in your Javascript application, as soon as possible, by calling the following:

Initialize plugin
function engage() {

	AppoxeePlugin.engage("sdk.id",
    	                "app.secret",
        	            function (json) {
            	        alert(JSON.stringify(json));
                	    },
                    	function (json) {
                    	alert(JSON.stringify(json));
                    	});
}

 

  • iOS (versions 1.3.1 and above)

Add to your application plist file the "appoxee_sdk_key" with a string value of your application SDK key.

No need to explicitly call the AppoxeePlugin.engage() method.

application.plist
<key>appoxee_sdk_key</key>
<string>the_sdk_key</string>

 

 

Note that iOS/Android applications will not share the same SDK key & secret, so you'll need to supply the right key for each platform, if you are compiling the same code for both platforms.

Content Security Policy & inline functions

In order to run the engage() method in your HTML code , make sure your meta tag of Content-Security-Policy contains the following definition (allowing inline function and code execution :

HTML Code
  <meta http-equiv="Content-Security-Policy" content="script-src * 'self' 'unsafe-inline'"> 

Android small icon 

In order to override the small icon in the notification bar, you'll have to create a drawable named "apx_small_icon" - place an image file with that name in the project's drawable folder(s) (eg: <project>/platforms/android/res/drawable-xhdpi )

 

  • No labels