Is there another good Ad Service than AdMob

Hi,

I have used AdMob in my app but at the moment it is not working for me. I can do what I want but when I start the app first time from the play store I have a black screen. If I install the app from my local network it works as intended. I tried many things I found in the web where people have the same problem but nothing helps. I found out that it works when I restart the whole device, but this is usability crap. I descided to move to another Ad Network to test it out.

If anyone had a recommendation that would be nice. :slight_smile:

Thanks.

Have you tried using adb logcat to look at your console log with the app installed from the store to see why it’s erroring out?

Rob

Not now. I just read the Debugging Guide and I am looking for a solution to use adb logcat from Visual Studio to not install it twice.

Ok, if you have Visual Studio installed with Android Development Tools or Xamarin just goto Tools/Android/Android Adb Command Prompt for Android device logging. :slight_smile:

That is the log if my app has a black screen. I think the log says everything but I don’t understand why the mp3 and the image was not found and when I restart the device the app find the resources.

Any idea?

Thanks Rob.

--------- beginning of system
--------- beginning of main
V/Corona  (18134): > Class.forName: network.LuaLoader
V/Corona  (18134): < Class.forName: network.LuaLoader
V/Corona  (18134): Loading via reflection: network.LuaLoader
I/Corona  (18134): Platform: GT-I9295 / ARM Neon / 5.0.1 / Adreno ™ 320 / OpenGL ES 3.0 V@84.0 AU@05.00.00.006.012 (CL@) / 2016.3012 / Deutsch | DE | de_DE | de
V/Corona  (18134): > Class.forName: shared.google.play.services.base.LuaLoader
V/Corona  (18134): < Class.forName: shared.google.play.services.base.LuaLoader
V/Corona  (18134): Loading via reflection: shared.google.play.services.base.LuaLoader
V/Corona  (18134): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (18134): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (18134): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
I/Corona  (18134): Create tables
I/Corona  (18134): WARNING: audio.loadSound() failed to create sound ‘audio/button_sound.mp3’
I/Corona  (18134): WARNING: Asset file “images/backgrounds/noise_bg.png” does not exist.
I/Corona  (18134): WARNING: Failed to find image ‘images/backgrounds/noise_bg.png’
I/Corona  (18134): ERROR: Runtime error
I/Corona  (18134): ?:0: attempt to index a nil value
I/Corona  (18134): stack traceback:
I/Corona  (18134):      ?: in function ‘?’
I/Corona  (18134):      ?: in function ‘method’
I/Corona  (18134):      /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:203: in function ‘dispatchEvent’
I/Corona  (18134):      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1468: in function ‘gotoScene’
I/Corona  (18134):      ?: in function <?:81>
I/Corona  (18134):      ?: in main chunk

When you test in the simulator, you’re running on Windows or macOS. Both of those operating systems do not check the case of letters in file names.  noise_bg.png, noise_bg.PNG, NoIsE_bG.pNg are all the same file. However on devices like iOS and Android, their operating systems are case sensitive. This is the #1 cause of those warnings, which later turn in to runtime errors when you try to actually manipulate an image or play the sound that never loaded.

The first error happens at line 81 in your main.lua which may very well be a “composer.gotoScene” call and the real error is in the scene you’re going to. If you can do a test build and install it to your device and run it. We strip out debugging symbols which is limiting your ability to see what’s going on when you do release builds.

Maybe also look for a function named “method” in the scene you’re going to.

Rob

Hi Rob,

the letters in the filenames have the correct case and there is no function method. On line 81 is a “composer.gotoScene” and in the following scene I use the noise_bg.png where the runtime error caused. The problem is when I install the app from my local server with AdMob on my device I don’t have the bug. That is my problem. I have the error only when I download the app from the store. If I remove AdMob from my app and install the app from the store I have no bug. The app works as intended.

I have some warnings if I install the app from my local server.

I/Corona  (14214): WARNING: Asset file “images/backgrounds/bg1@4x.jpg” does not exist.

Don’t know what this warnings have to do with Android. That’s iOS filenames.
That’s all very strange.

Thanks for your help Rob

I found the bug in this post.

https://coronalabs.com/blog/2013/04/17/expansion-file-support-for-android/

It was a missing permission “android.permission.WRITE_EXTERNAL_STORAGE”

But I don’t understand why the app starts without black screen after restarting the device.

Have you tried using adb logcat to look at your console log with the app installed from the store to see why it’s erroring out?

Rob

Not now. I just read the Debugging Guide and I am looking for a solution to use adb logcat from Visual Studio to not install it twice.

Ok, if you have Visual Studio installed with Android Development Tools or Xamarin just goto Tools/Android/Android Adb Command Prompt for Android device logging. :slight_smile:

That is the log if my app has a black screen. I think the log says everything but I don’t understand why the mp3 and the image was not found and when I restart the device the app find the resources.

Any idea?

Thanks Rob.

--------- beginning of system
--------- beginning of main
V/Corona  (18134): > Class.forName: network.LuaLoader
V/Corona  (18134): < Class.forName: network.LuaLoader
V/Corona  (18134): Loading via reflection: network.LuaLoader
I/Corona  (18134): Platform: GT-I9295 / ARM Neon / 5.0.1 / Adreno ™ 320 / OpenGL ES 3.0 V@84.0 AU@05.00.00.006.012 (CL@) / 2016.3012 / Deutsch | DE | de_DE | de
V/Corona  (18134): > Class.forName: shared.google.play.services.base.LuaLoader
V/Corona  (18134): < Class.forName: shared.google.play.services.base.LuaLoader
V/Corona  (18134): Loading via reflection: shared.google.play.services.base.LuaLoader
V/Corona  (18134): > Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (18134): < Class.forName: CoronaProvider.licensing.google.LuaLoader
V/Corona  (18134): Loading via reflection: CoronaProvider.licensing.google.LuaLoader
I/Corona  (18134): Create tables
I/Corona  (18134): WARNING: audio.loadSound() failed to create sound ‘audio/button_sound.mp3’
I/Corona  (18134): WARNING: Asset file “images/backgrounds/noise_bg.png” does not exist.
I/Corona  (18134): WARNING: Failed to find image ‘images/backgrounds/noise_bg.png’
I/Corona  (18134): ERROR: Runtime error
I/Corona  (18134): ?:0: attempt to index a nil value
I/Corona  (18134): stack traceback:
I/Corona  (18134):      ?: in function ‘?’
I/Corona  (18134):      ?: in function ‘method’
I/Corona  (18134):      /Users/jenkins/slaveroot/workspace/Templates/label/android/platform/resources/init.lua:203: in function ‘dispatchEvent’
I/Corona  (18134):      /Users/jenkins/slaveroot/workspace/Templates/label/android/subrepos/composer/composer.lua:1468: in function ‘gotoScene’
I/Corona  (18134):      ?: in function <?:81>
I/Corona  (18134):      ?: in main chunk

When you test in the simulator, you’re running on Windows or macOS. Both of those operating systems do not check the case of letters in file names.  noise_bg.png, noise_bg.PNG, NoIsE_bG.pNg are all the same file. However on devices like iOS and Android, their operating systems are case sensitive. This is the #1 cause of those warnings, which later turn in to runtime errors when you try to actually manipulate an image or play the sound that never loaded.

The first error happens at line 81 in your main.lua which may very well be a “composer.gotoScene” call and the real error is in the scene you’re going to. If you can do a test build and install it to your device and run it. We strip out debugging symbols which is limiting your ability to see what’s going on when you do release builds.

Maybe also look for a function named “method” in the scene you’re going to.

Rob

Hi Rob,

the letters in the filenames have the correct case and there is no function method. On line 81 is a “composer.gotoScene” and in the following scene I use the noise_bg.png where the runtime error caused. The problem is when I install the app from my local server with AdMob on my device I don’t have the bug. That is my problem. I have the error only when I download the app from the store. If I remove AdMob from my app and install the app from the store I have no bug. The app works as intended.

I have some warnings if I install the app from my local server.

I/Corona  (14214): WARNING: Asset file “images/backgrounds/bg1@4x.jpg” does not exist.

Don’t know what this warnings have to do with Android. That’s iOS filenames.
That’s all very strange.

Thanks for your help Rob

I found the bug in this post.

https://coronalabs.com/blog/2013/04/17/expansion-file-support-for-android/

It was a missing permission “android.permission.WRITE_EXTERNAL_STORAGE”

But I don’t understand why the app starts without black screen after restarting the device.