Open finscn opened 10 years ago
Hello, I need adMob extension for Ejecta.
:+1:
thx for the link
I think Ejecta needs some sort of Plugin system. This could probably be as simple as some guidelines for adding new classes.
Maybe anything that's not provided by a normal browser (GameCenter, IAP and iAds...) should be put in plugins as well?!
Yes, I think so :)
+1 Plugin system. Although...
If you want to use feature X from Ejecta you could always use WizCanvas. This will allow you access to hundreds to easy to install plugins such as local notifications, Facebook SDK, vibration, keyboard etc..
Ejecta is purely about performance in my opinion. I don't want to bundle iAd.Framework and stuff if I don't need it, would like to see this baggage removed.
npm install cordova cordova create myApp cd myApp cordova platform add ios cordova plugin add https://github.com/Wizcorp/phonegap-plugin-wizCanvas
Create an Ejecta view from JavaScript and you are ready to go.
@aogilvie is there an Android version ? The Ejecta-X is nearly dead (it's not activity, no base-functionn e.g. Audio ) FastCanvas miss some features. @phoboslab is not interested in Android. So sad.
@finscn I took over Ejecta-X in December 2013. There is plenty of commits going in https://github.com/Wizcorp/Ejecta-X/pulse/monthly
Checkout out our roadmap: https://docs.google.com/a/wizcorp.jp/spreadsheet/ccc?key=0AlS-4HrSqgJodDduZE1TU2Zqa09jUW5GT19zZVhDdlE&usp=drive_web#gid=0
We will get to audio eventually :) but we play audio through Cordova for now (both iOS and Android).
nice!
@finscn wow nice work with those extensions only if there an example for how to use the admob extension i need it to add it to my game
@lr2bmail
var ad = new Ejecta.AdMobBanner("Your AppId of AdMob");
/* Type:
banner,
mediumrectangle,
fullbanner,
leaderboard,
skyscraper,
portrait,
landscape,
invalid
*/
ad.type = "banner";
ad.x = 100;
ad.y = 100;
ad.onload = function() {
console.log("loaded")
ad.show(); // display ad
// ad.hide() : hide ad
}
ad.onclose = function() {
console.log("closed")
}
ad.onclick = function() {
console.log("clicked")
}
ad.load();
// fullscreen ad
var adPage = new Ejecta.AdMobPage("Your AppId of AdMob");
adPage.onload = function() {
console.log("loaded")
adPage.show(); // can't hide it via code
}
adPage.onclose = function() {
console.log("closed")
}
adPage.onclick = function() {
console.log("clicked")
}
adPage.load();
@finscn thank u for the code
i am sorry i am not programmer i work with construct2
i add the banner code to the index.js
i use you index.js and xcodeproj https://github.com/finscn/Ejecta/tree/master/example
@finscn ok the full ad work nice and it is 10x faster that cocoonj but the banner ad i can not get it to work
2014-06-15 16:26:01.014 Ejecta[1087:60b] <Google> To get test ads on this device, call: request.testDevices = @[ GAD_SIMULATOR_ID ];
2014-06-15 16:26:01.016 Ejecta[1087:60b] <Google> Must set the rootViewController property of GADBannerView before calling loadRequest:
2014-06-15 16:26:01.026 Ejecta[1087:60b] Failed to receive ad with error: Request Error: Invalid ad request parameter(s). Check the Xcode console for details.
2014-06-15 16:26:01.048 Ejecta[1087:60b] Creating ScreenCanvas (2D): size: 480x320, style: 480x320, retina: yes = 960x640, msaa: no
2014-06-15 16:26:01.056 Ejecta[1087:60b] JS: ver, 1.0
2014-06-15 16:26:01.547 Ejecta[1087:60b] JS: udid, eda309c4ea0f9b6c69357d9bd0093702e0541ab5
2014-06-15 16:26:01.547 Ejecta[1087:60b] JS: uuid, C50844E3-0240-4E44-B661-BEE0EA3FAD41
2014-06-15 16:26:01.548 Ejecta[1087:60b] JS: systemLocal, en
2014-06-15 16:26:01.553 Ejecta[1087:60b] webview load local url : file:///Users/hytham/Library/Application%20Support/iPhone%20Simulator/7.1/Applications/79F09516-5D41-4366-B33F-80F56E6DC4F7/Ejecta.app/App/webview.html
I don't know why. Did you read https://developers.google.com/mobile-ads-sdk/docs/admob/intermediate#ios ?
I got that same error when initing the AdMobBanner immediately when the game scripts are executed. I guess the iOS UI isn't fully ready yet at that time. My solution was to add a setTimeout(initAdMob(), 100);
@bartvanheukelom initAdMob() = ?
i try setTimeout(function(){ad.load()},1000); get the same error
initAdMob
contains all the AdMob code, including new Ejecta.AdMobBanner();
@finscn @bartvanheukelom yes that finally work thank you for your help :+1: :
I downloaded admob plugin for Construct2 How I can start the project in xcode with support of admob and ios 8?
for ios8 just use cordova
How to turn off the test mode of display of announcements Admob?
I have a display of test announcements only, why?
AdMob ( http://www.admob.com ) is an Ad service of Google. Its fill rate is better than iAd. Does anybody need it?
@phoboslab , Could you like create a project about extension/plugin of Ejecta?
I found some requests was rejected because of closing for lack of Ejecta's interest. Maybe somebody need or has implemented them. If there is a extension/plugin-hub project , I think it can help Ejecta get better and better.