Skip to content

Instantly share code, notes, and snippets.

@codeinvain
Last active December 18, 2015 14:09
Show Gist options
  • Save codeinvain/5795562 to your computer and use it in GitHub Desktop.
Save codeinvain/5795562 to your computer and use it in GitHub Desktop.
call register API for pingjam SDK (phonegap)
var app = {
..
..
onDeviceReady: function() {
app.receivedEvent('deviceready');
pingjam = new Pingjam();
pingjam.register({type:Pingjam.TYPE_ACTIVITY});
// available options are
// customButtonStyle (boolean / default true ): use gray buttons or green for ok and red for cancel
// nag (boolean / default false ): continue to display the registration dialog if user press cancel
// showImage (boolean / default true): display an example service image in the opt-in dialog
// theme (number / fefault Pingjam.THEME_LIGHT): display a dark or light themed dialog
// type (number / default Pingjam.TYPE_MODAL ): open the opt-in dialog as a modal window (popup) or activity (full screen)
// example json options {nag:true,type:Pingjam.TYPE_ACTIVITY,theme:Pingjam.THEME_DARK}
},
..
..
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment