- Home /
AdMob - Cannot move Ad around the screen...
I have two issues with my AdMob plugin that I acquired from this link. It is simple, yet effective, and works perfectly with my AdMob account; However, there are two issues that I am facing. The first, is that I cannot move my ad around, or change the location, or only have it on one scene. The second issue is, when I build the app and run it on my Android device, and touch the ad, it does not open the web browser or any other application it should link to. Is this perhaps something that only works after publishing to Google Play?
Thank you so much for your help so far, if it weren't for this community then I wouldn't have progressed this far :D
I did answer below, but you can always write your own, its not hard, and there are plenty of tutorials specifically for admob and android.
Answer by Dblfstr · Feb 26, 2014 at 08:25 PM
For the touchscreen issue. In you android manifest, set "Forward native events to dalvik" to true. It is false by default.
ForwardNativeEventsToDalvik = true
As for the plugin, propably wont be able to change that. Most likely, the location on screen was created in java, in eclipse, and is using a SMART_BANNER to fit the screen size. You are stuck with the location I am afraid.
Well, that is not a huge problem, it may work out fine on the bottom... However, I only want the ad to display in my main menu scene, and not when the game scene is loaded. Is that possible? I checked the script for any DontDestroyOnLoad
parameters and I found one, which, when removed, did nothing. How can I only have it work on one scene?
Oh and my Android $$anonymous$$anifest has the line already set to true:
Perhaps it needs to be connected to Google Play in order for it to work?
Nah, I could click my ads before I uploaded to the Play Store. So I don't know why you cant click them. But, that plugin is OLD. And the guy that made it even said to use a different one... Another one that is free. I am still trying to figure out how to keep it within a scene. It seems that when I create a java object in Unity (which is what the plugin you use does) I cannot get rid of it... ever! I have even destroyed the gameobject that has the script. But the java object is still there, and I cannot access it.
Yeah, I switched to the new, better one, and now I am getting another annoying error. Everything works fine, my android SD$$anonymous$$ is installed correctly, but after I did something, somehow unity is malfunctioning. The error says I have no android SD$$anonymous$$ installed. I have it here:
Error building Player: CommandInvokationFailure: Unable to retrieve device properties. Please make sure the Android SD$$anonymous$$ is installed and is properly configured in the Editor. See the Console for more details.
C:/adt-bundle-windows-x86_64-20131030/sdk\platform-tools\adb.exe -s ZH8000LP0B shell getprop
stderr[
error: device offline
]
stdout[
]
Never$$anonymous$$d, my bad, unity was acting weird :P
After a fresh boot and restart it started functioning normally again.
Thanks again! :D
Your answer
Follow this Question
Related Questions
How can I implement AdMob ads into a specific Unity Scene in XCode? 3 Answers
How to enable ads in your games. 1 Answer
iAds fallback to admob 0 Answers
A node in a childnode? 1 Answer