Skip to content

Instantly share code, notes, and snippets.

@juangesino
Last active August 29, 2015 14:15
Show Gist options
  • Save juangesino/8923a9e19fca3afc147c to your computer and use it in GitHub Desktop.
Save juangesino/8923a9e19fca3afc147c to your computer and use it in GitHub Desktop.
AdBuddiz
$(window).load(function(){
adbuddiz.isReadyToShowAd(
function() { alert('SDK Loaded'); },
function() { alert('SDK Not Loaded') }
);
adbuddiz.showAd();
});
<?xml version='1.0' encoding='utf-8'?>
<widget id="..." version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<gap:plugin name="com.purplebrain.adbuddiz.sdk" source="plugins.cordova.io" />
...
...
...
</widget>
function init(){
document.addEventListener("deviceready", onDeviceReady, false);
}
function onDeviceReady(){
adbuddiz.setAndroidPublisherKey("eb6d0751-9cd4-4b29-85eb-6470313c3ffc");
adbuddiz.setTestModeActive();
adbuddiz.cacheAds();
}
<html>
<head>
<!-- My Head -->
...
</head>
<body>
<!-- My index file -->
...
<!-- Import JS -->
...
<script src="js/custom.js"></script>
<script src="js/adbuddiz.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment