Closed doomtoo closed 4 years ago
This one is a bit old and I'll close but feel free to reopen. I think the issue may be on how AdMob has been implemented, check SO thread for reference https://stackoverflow.com/questions/26528977/detect-close-of-interstitial-ad-in-admob-using-ios-robovm-libgdx.
Issue details
If you are touching the screen and display an admob interstitial, when you close the interstitial, that touchpoint remains stuck down where it was (Gdx.app.getInput().isTouched(0) is now always down at the point you had been touching). If you touch on the screen again, it's now pointer 1, because 0 has been locked as always down.(and you can repeat it, locking all touchpoints)
Reproduction steps/code
Steps Overview: 1) Create a new LibGDX roboVM project 2) Get the project setup to display an Admob interstitial ad 3) Have an ad appear while touching the screen 4) (remove your finger) Close the ad, the input will still be counted as being held down- any new inputs will be the next pointer 5) repeat until all 10 fingers are counted as being down while not touching the screen
Steps More in depth: 1) Create a new LibGDX roboVM project 2) Add everything to be able to display admob ads from the updated robopods: a) In the build.gradle for the project, in the buildscript->dependiencies, change the mobidevelop class path to version '2.2.0-SNAPSHOT' b) In the allprojects->ect section, change the roboVMVersion to '2.2.0-SNAPSHOT', and add 'robopodsVersion' with the same version c) Add to the ios dependencies: compile "com.mobidevelop.robovm:robopods-google-mobile-ads-ios:$robopodsVersion" d) Download the Admob iOS library, and put the 'GoogleMobileAds.framework' into a new folder in the iOS project called 'libs' e) In robovm.xml in the iOS project add:
3) Create a new Interface in your core project to call the interstitial from:
4) Call the AdTest.Update function from your Game render loop:
5) Create your Ad interface in your iOS project
6) Pass your iOS interface to the Game when starting up the IOSLauncher:
7) Run the app on iOS. Press on the screen and wait for the Ad to appear. Let go when the ad appears, and close it. The console will show that it still thinks input[0] is locked down. Repeat, and input[1] will also be locked, and so on.
Version of LibGDX and/or relevant dependencies
gdxVersion = '1.9.3' roboVMVersion = '2.2.0-SNAPSHOT' robopodsVersion = '2.2.0-SNAPSHOT'
Stacktrace
Context
Someone is playing the game, they die, an ad pops in, they close it, and every finger that was used while playing is still down, and they can no longer control the game.
Please select the affected platforms