Hi,
I am configurating the admob to show an interstitial.
It popups in the screen normally, but when the user close it and the jm3 app gets back the control, it fires this unknow error Default.fnt not found and crash the app … :
W/dalvikvm(21523): threadid=36: thread exiting with uncaught exception (group=0x41745e48)
E/com.jme3.app.AndroidHarness(21523): SEVERE Exception thrown in Thread[GLThread 88713,5,main]
E/com.jme3.app.AndroidHarness(21523): com.jme3.asset.AssetNotFoundException: Interface/Fonts/Default.fnt
E/com.jme3.app.AndroidHarness(21523): at com.jme3.asset.DesktopAssetManager.loadAsset(DesktopAssetManager.java:283)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.asset.DesktopAssetManager.loadFont(DesktopAssetManager.java:370)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.app.SimpleApplication.loadGuiFont(SimpleApplication.java:179)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.app.SimpleApplication.initialize(SimpleApplication.java:187)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.app.AndroidHarness.initialize(AndroidHarness.java:455)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.system.android.OGLESContext.initInThread(OGLESContext.java:229)
E/com.jme3.app.AndroidHarness(21523): at com.jme3.system.android.OGLESContext.onSurfaceCreated(OGLESContext.java:205)
E/com.jme3.app.AndroidHarness(21523): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1501)
E/com.jme3.app.AndroidHarness(21523): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
E/com.jme3.app.AndroidHarness(21523):
I saw a few threads here with the same error that may be related but with no fix for it.
Do anyone know how to fix it ?
That is strange. Are you closing the app before showing the ad? that error usually happens when we close the android app and it goes to the background and then reopens
No, I am just closing the interstitial…
But I think its the same problem, I mean, it runs in another thread right, it pauses the jm3 thread runs the interstatial and when it backs it resumes the jm3 thread…
I’ve definitely seen this error before. This has to do with the application not closing properly and trying to reopen.
Personally I’ve never been able to properly get interstitials working but it does have something to do with the activity trying to reopen after not properly closing.
I use interfaces to communicate the Android code to the Game code, makes things easier when I move from one platform to the next.
To tell the game that the add has ended you have two choices: use the onResume method or have a listener that Admob has. Then from the android code tell the game via interface that the add is gone.
This is my interface, I guess I need to add some resumeFromAdmobIntertitial() suff ??
package mygame;
public interface AndroidInterface {
//Initialize Admob
public void initAdmob();
// Show the full screen Intertitial
public void showAdmobIntertitial();
}
Also, what did you do to pause the jm3 ? appstate.setenable( false ) ?
You can disable/enable app states but I prefer to have a flag that I can control better.
Your AndroidInterface is for the game to talk to Android code. Create another interface like GameInterface so that the android code can talk to your game. your Android interface would look like this
public interface AndroidInterface {
//Initialize Admob
public void initAdmob();
// Show the full screen Intertitial
public void showAdmobIntertitial();
// Sets the GameInterface for android to talk to
public void setGameInterface(GameInterface gameInterface);
}
your GameInterface will look like this
public interface GameInterface{
public void onPause(boolean pause);
//any other code you want to talk from android to game
}
I dont know, I did some tests, implement this call back to pause the app, same results.
It seens I am getting the issue of android getting not shutdown completely, but if I add the ondestroy solution, the interstatial is destroyed before it shows up for some reason…
Did you have to use this ondestroy clenup in your app ?
I had a look on this, it looks much better, even the pay is better.
I tried to test it, but it didnt shows any screen…
Did you use it already ? If so, did you call it that way or using thread ?
Code:
public void initAdBuddiz() {
AdBuddiz.setPublisherKey("code");
AdBuddiz.cacheAds(this); // this = current Activity
AdBuddiz.setTestModeActive();
AdBuddiz.setLogLevel(AdBuddizLogLevel.Info); // or Error, Silent
}
public void showAdBuddizIntertitial() {
if (AdBuddiz.isReadyToShowAd(this)) AdBuddiz.showAd(this);
}
There platform seems to pays per installation, in there site they says something between $1 to $3 per installation, not bad, but I dont know how much true its in it, did you get this results when you use it ?
But I dont know, I will use it until we fix this error on admob x jm3, since admob pays per impressions, I guess it pays more, but it depends of the game, I guess …
The admob support is terrible as well, just google discussions groups it seems, very bad for such type of business, I saw in the site a lot of peaple complain about crash, so we need to care about the software quality as well, if an player install your game and get crashed in an advertisement screen, its very bad for your game …
The problem I am having with admob is that it seens something is not beeing clean up somewhere when it closes, I dont know if the problem is on Jm3 or on admob, but I found out that the architecture of it is too much complicated in compassion with AdBuddiz for example.
I dont have any experience with this yet, I am just starting, so maybe others can help more.
What they mean is they pay per installation your ads generate. Also Admob pays per click on the ad regardless of whether the application advertised is downloaded, not based on impressions at all.
AdBuddiz will only pay if they click on the advertisement and download the game.
In my experience this is much lower than AdMob as you can go days without getting a single download but multiple clicks.
Admob on average pays about 5 cents per click so unless you generate a download once every 20-60 ad clicks then it is a losing deal.
I would also bet that it’s on the lower end of 1-3$ and you would have to get a download at least every 20 clicks.
Even further with interstitials you are limit the amount of impressions you generate as well. A banner can show a new ad by being refreshed every 45 seconds and constantly remains visible.
Interstitials can only appear at breaks in your logic.
AdBuddiz will only pay if they click on the advertisement and download the game.
Thats too bad, they dont say this to you, scammers ! I will check this out with they and post here.
There are people talking about an new tecnology of videos ads of vungle company that pays very well, I guess the integration will need some kind of caching and threads, but it seens to be something to look at.
I am noticing this error as well when you minimize the application and try to back to reopen the window.
I tried the setPauseOnLostFocus(true); but it seens to have no effect on android…
Do anyone knows how to fix it ?