Created
November 1, 2012 13:43
-
-
Save revmob-sdk/3993698 to your computer and use it in GitHub Desktop.
RevMob Titanium
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revmob.addEventListener('adDidReceived', function(e) { | |
Titanium.API.log('> Ad did received.'); | |
}); | |
revmob.addEventListener('adDidFail', function(e) { | |
Titanium.API.log('> Ad did Fail.'); | |
}); | |
revmob.addEventListener('userClickedInTheAd', function(e) { | |
Titanium.API.log('> click!'); | |
}); | |
revmob.addEventListener('userClosedTheAd', function(e) { | |
Titanium.API.log('> close!'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function RevMob(appIds) { | |
var moduleNames = { 'iPhone OS': 'com.revmob.titanium', 'android': 'com.revmob.ti.android' } | |
var revmobModule = require(moduleNames[Ti.Platform.name]); | |
revmobModule.startSession(appIds[Ti.Platform.name]); | |
return revmobModule; | |
} | |
// Just replace the ID below with your appID. | |
var revmob = new RevMob({ 'iPhone OS': '4fd619388d314b0008000213', 'android': '4f56aa6e3dc441000e005a20' }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revmob.showFullscreen(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revmob.setTestingMode(revmob.testingMode.withAds); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
revmob.setTestingMode(revmob.testingMode.withoutAds); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<modules> | |
<module platform="iphone" version="0.1.1">com.revmob.titanium</module> | |
<module platform="android" version="0.1.1">com.revmob.ti.android</module> | |
</modules> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment