Implementing ads with both Marmalade and Cocos2d-x - android

I've been working for a month and a bit on a game, using cocos2d-x on the marmalade platform. Finding information about on the internet has been a frustrating experience due to its rarity, but that issue is amplified tenfold when cocos2d-x is thrown in the mix -- few people seem to use the combination, or at least ask and answer questions about it. But I digress. Currently I'm working on getting the Android side working before dealing with iOS.
I want to get ads into my game. I have found sdks for marmalade and for cocos2dx, but not both at the same time. This raises issues.
IwGameAds: iw2D and iwgl don't play nicely because they change both change gl states. Cocos2d-x uses gl. The solution to that problem is to wrap iw2D with save and restore, as mentioned here, but iwgameads requires this to be placed in the main loop:
// Update the ads view
IW_GAME_ADS_VIEW->Update(1.0f);
// draw the ads view
IW_GAME_ADS_VIEW->Draw();
The problem here being that the cocos2d-x main loop implementation is hidden to me. I could hook in the update easily enough, but the draw is more difficult -- where do I put it? Do I override my game layer's draw(), call super and do the gl state saving stuff before calling iwgamead's draw?
RevMob: neither revmob sdk (marmalade or cocos2d-x) allows for banner positioning (the default banner stretches to take up 1/4 of a landscape screen) or callbacks. I managed to get banners and fullscreens showing using their marmalade sdk easily, but the game continues to run behind the full-screen interstitial whenever it deigns to appear after being called... which often results in cocos2d-x crashing.
Their cocos2d-x sdk is much harder to integrate with marmalade and I've been unable to progress past "jni.h not found" errors. I presume that if I got that working the crash/running in background would resolve itself, but I'd be left with the more-than-problematic design flaws.
InMobi: marmalade's s3eInMobiAds subproject is nice and all, but won't allow me to test anything without a published app. This one is more promising than RevMob because banner positioning and event callbacks appear to be possible, but due to marmalade and cocos2d-x's gl conflicts, this might turn out to be just as bad a solution as iwgameads. I've emailed them about the possibility of being able to test+integrate during my app's development.
s3eFlurryAppSpot: The test project supplied with marmalade works (there's a bug where the first ad doesn't display), but I guess it doesn't play nicely with cocos2d-x as nothing displays despite the logs saying otherwise. Full-screen ads work, but appear to be portrait only.
As with revmob, these don't pause the game, but there are at least callbacks to fully control the flow of things.
AdMob and others: other ad providers I've found for cocos2d-x tap into the underlying java. It increasingly seems to me that this might be the direction I need to go in to implement ads. However I can find scant resources on how to do this sort of thing or even if it's possible under marmalade.
Has anybody had success with ads using marmalade+cocos2d-x and could point me in the right direction?

Sohan from the InMobi team here.
I really can't speak for the other ad networks, but you asked if you could "...test+integrate during my app's development."
To parapshrase President Obama, Yes you can!
The diagnostics mode can be used to test the InMobi integration before the App release. You will need to enter a device ID to see the test ads. Check this link

Related

My Augmented Reality app has insufficient warning about parental supervision according to Google Play's policy

My app has been rejected by Google Play twice over this issue:
If your app uses Augmented Reality, you must include a safety warning upon launch of the app that contains the following:
An appropriate message about the importance of parental supervision.
A reminder to be aware of physical hazards in the real world (e.g., be aware of your surroundings).
I added a message which pops up when AR section is loaded "While using this app please be aware of your surroundings. It is recommended that younger children have supervision when using Augmented Reality." Apparently, it was insufficient. I downloaded a bunch of AR apps and none of them have a message like that. Any ideas what this message should be? Should it pop-up every time the app is loaded or just once when installed? I reached out to Google Policy's team and I'm waiting for their reply as well.
Whilst this is unusually a non-code based question, I was able to resolve the problem and get our app approved by Google with the following text.
Always ask a grown-up before using the DinoSaw app. Watch out out for
other people when using DinoSaw and be aware of your surroundings.
Parents and guardians please note: whilst using Augmented Reality
there is a tendency for users to step backwards to view dinosaurs.
I think the trick is simply to consider your app in context of the appropriate environment and add more than just their token text. - Our app is for augmented reality dinosaurs designed specifically for kids. They will accidentally bump/back into other people whilst they are absorbed by the content.
Dinosaurs seem to have that affect on little people it seems.
I also added an amusing graphic to humour the situation - Looks like it worked :)
I got this message on an app update too.
In addition to making sure the message was crystal clear and including a warning icon/image as #Ghoul Fool suggested in another answer, I also make sure the message was triggered in the OnResume function for the AR activity.
My update was accepted wiht this change - it's not possible to know what exactly was the trigger for the acceptance but sharing here in case the 'OnResume' change makes the difference for others also.
override fun onResume() {
super.onResume()
//Do your other OnResume work here
//Display an AR warning for kids as required by Google Play store guidelines
warningARDialog()
}

What if I create iOS App User interface just like Android App?

I have created one android app which I am going to port to iOS. Not actually port but I am going to create same app for iOS too. I want to user custom views in iOS and make it look just like Android App User Interface.
Will there be issue while submitting that iOS App to Apple Store?
github.com/dekatotoro/SlideMenuControllerSwift
I am using this library and another thing i am using is
https://s27.postimg.org/etqjld0fn/Screen_Shot_2017_01_02_at_19_18_46.png
Top Bar custom design
Are these two things going to give me problem?
You may encounter problems. While there is a chance you might be able to go through with publishing, there is still a high chance of rejection and a lack of user adoption that would not be conducive to success in the long-run.
Your best bet is to recreate the UI for those views following iOS Human Interface Design Guidelines. These are well-outlined and pretty intuitive.
If you're re-coding it natively as well and following documentation this should actually be easier than trying to make the Android style fit and risking going through re-approval after getting rejected. Better to do it right the first time, so to speak.
You can still technically have a custom design, but keep in mind that 1) Apple is strict with their aesthetic compatibility and 2) iOS users will not want an Android experience, and likely vice versa.
If you are not re-coding in native iOS i.e. Swift/Obj-C, etc., there are other workarounds you can look into for getting the functionality cross-compatible, however those UI incompatibilities will still need to be tweaked across the board to meet Human Interface Guidelines/standards.

Performance benchmark of native android map vs webview map, what parameters can be included in the benchmark

I am trying to compare native google maps (v2) vs the embeddable HTML version encapsulated in a webview on android. While it's pretty evident that the native maps are smoother and faster, I must prove that somehow. I have been searching on the internet for quite some time and did not seem to find any existing benchmarks. Does anybody know someone who actually done something similar? I am already thinking of creating such benchmark of my own, but how can the performance actually be measured? My ideas so far are:
Measure rendering of different number of markers, polylines, etc...
Measure map tile loading (maybe not possible at all)
Somehow measure the lag when dragging the map. This must be somehow based on the map events, but the native GoogleMap class does not seem to have something like onDragListener.
If you have any ideas or know some existing resource, please help me!
-----------------EDITED 03.01.2014----------------
I already started creating my benchmark but now I am struggling with some strange issues - see this question for more details.
The source code of the first version of my benchmark can be found here. It currently does not include automated testing. Nevertheless when experimenting with adding different number of markers and lines you can get an idea of how slower html maps are. I have also uploaded a simple demo on youtube, to view it click here
So Your topic is pretty interesting, but remember if you are going for google maps on mobile vs web, there is mobile v2 and javascript v3. Javascript google maps has some added functionalities that mobile does not offer, you can refer the docs to find out. AND You can perform on various parameters like.
1. Time it takes to load (display) the map on the screen.
2. As you mentioned rendering on the map.
3. Performance issues on low bandwidth.
4. UI and UX.
5. Reliability
6. User Satisfaction
7. Implementation (Complete off topic but since you are doing a thesis I will recommend that)
8. Features
9. At last pricing. (I think upto 20000 calls per day is free on one API key on javascript v3)
NOTE
Anyone feel free to edit and add some more parameters for benchmarking.

UI feel and look in Titanium, PhoneGap compared to native

I am about to decide which way to push our smartphone development.
I have read numerous articles about these technologies. I have also created test apps, but wanted to be 100% sure that I get this right.
I am not able to create EXACTLY the same look and feel like native app in PhoneGap because it runs in WebView Controler. And the webish look and feel is as far as I will get with this tech. correct?
(In the example app I have created with PG, the look might be similar, but there is a delay when i click on buttons and the animation is not so fluent as in native apps)
Latest Titanium seems to have changed its approach to WebView, to remedy that lack of look and feel of native apps. My question is (I havent tested this myself). Can I create EXACTLY the same look and feel of an native app with Titanium?
EXACTLY is the key word. I mean can a person tell a difference if app was created with Titanium? because I can definitely tell that app was created with PG.
Final goal is the UX, ppl sense this things, and on smartphones anything that is webish and is suppose to be appish is a bad UX i believe.
Thanks
Compared to PG Titanium is more Native like UI experience but it's kinda problematic for Android.Since it's originally intended for IOS.
Titanium for Android is pretty buggy and can mess you up and the thing that you have to come up with workarounds and if you cant find any then you are stuck.
But if you are okay with that and i can easily advise that Titanium is way to go though it's nearly native (not exactly) which close to exactly.I dont think an average user would understand Titanium .
2) yes, since titanium uses the original UI. your javascript code is wrapped to native Objective c code that creates native elements. only constraint is that your are not as flexible as with real native code written by yourself. but you can write native modules and add them to your projekt. so you're able to expand your project with custom UI too.

Adwhirl Layout issue

I am currently using admob for a couple of my apps. This seems to work well, except the fill rates can get down to as low as 78%. So I decided to signup for AdWhirl.
So, I followed the instructions, what they are, on the setup instructions page for AdWhirl, but can not get anything to work. I either wind up with code that throws no errors and does not work, or if I add <AdWhirlLayout> to my xml the app will not run at all.
Can someone please explain to me what I need to do to get this working?
It appears there are some steps that are assumed and not explained.
I found this very helpful in getting AdWhirl up and running. The emulator is still very fickle in displaying the adds... watch the LogCat to try and decipher what is happening with AdWhirl, but first go to this link and follow instructions.
https://stackoverflow.com/questions/4898838/howto-implement-adwhirl-in-an-android-project
Oh, and it takes some time before the ads actually display (for me I had to wait overnight after implementing) for my key to work and serve up ads.

Categories

Resources