Admob and API version 8 - android-emulator

I develop on an.. let's say: not ultramodern computer, and were doing fine so far developing with the emulator for API version 8. Now I try to use Admob (after meddling with "Adsense for Mobile Apps" which never displayed any ads for some reason), but it turns out that I need an API target of 13 to use it.
Is there any way to get it to run with 8?
In my Manifest file, I have defined
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
already. After my investigations and the tips I have read so far, I tried the 'reduced' set for the Android Manifest,
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation" />
but running it on the v8 emulator produces a number of exceptions basically complaining that the required configChanges are not set.
I have read about a 'trick' of using an older Admob SDK, but also the warning of Google that from end of 2011, they won't display ads anymore and the new version must be used.
The worst thing is that I can't even run my own app on my connected mobile phone (HTC Legend, v2.3.7 / API 10) if I want to use Admob?!
Or maybe I am missing something, am quite frustrated right now.

There is a way. Check out this blog post, which applies to AdMob SDK 6.0 as well.
The TL;DR:
Set target in project.properties to android-13 or higher. You need the full set of configurations:
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
As long as minSdkVersion is 8, you can still run on Android 2.2.

Related

Agora Device manager creation failure in Unity mobile version

Hellow
I tried to get device information from mobile build version with Unity framework.
Calling the CreateAVideoDeviceManager(), CreateAAudioRecordingDeviceManager(), CreateAAudioPlaybackDeviceManager() apis always results in false. So the device information cannot be displayed.
However, in the standalone version, it works normally.
Do you have any solution for the above issue?
VideoDeviceManager and AudioDeviceManager are designed for standalone desktop environment only. It is in the documentation.

Cannot Build .APK in Unity 2019.2.4f1 with ARcore : Manifest Merger failed

I want to build a simple ARcore app with Unity. So I followed the ARCore quickstart documentation for Unity, but when I tried to build the APK, this error appeared:
"Manifest Merger Failed with multiple errors, see logs. See the Console for details."
So the logs reported the following issues
I have searched the internet and can't seem to find a definitive answer. What am I missing? Thanks in advance.
See the Known limitations section of About ARCore XR Plugin unity docs.
Due to changes made in Google's ARCore clent libraries which are redistribute in ARCore XR Plugin, projects built with Unity 2019.4 must be updated to use Gradle 5.6.4 or later. Please refer to these instructions for updating your project's Gradle version.
Then you can follow these steps Build for Android 11 with Unity. Even if you are targeting less than Android 11 you need to follow these steps.
Your AndroidManifest.xml file is malformed. In particular, you are missing a package name.
First thing is to make sure that you have set a package name in the project player settings. Go to File -> Build Settings, hit the Player Settings button, then find the "Package name" field, and make sure it is filled out. It should be of the form com.YourOrganization.YourGameName
Next, if you have one or more AndroidManifest.xml files in your Assets folder somewhere, one of them should have this line:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.YourOrganization.YourGameName" android:versionCode="1" android:versionName="1.0">
Note the package="..." part. The error is complaining that this is missing. Fill in the same name as you put in the player settings.
Caution: Targeting Android 11 (API level 30) with versions of Unity 2020.1 or earlier requires special Gradle configuration. See Building for Android 11 with Unity for more details.
In case that your build target API level is set to 30 (Android 11), the link above could very likely help you.
In case that you does not help though, I would recommend adding a picture of your Build Settings to your post for additional detail.
I hope this was helpful!

Ionic HTTPS requests failing on Android 9

Disclaimer: this looks incredibly the same as Ionic Native HTTP does not work for Anroid 9 (Pie) and up? but it isn't!
We are facing an incredibly strange and hard problem after updating our app today.
We are mantaining an Ionic v1 app for Android. It uses Cordova-Android 7. Today when we were uploading a new update to the play store we found a restriction forcing us to target SDK starting from 28. We added <preference name="android-targetSdkVersion" value="28" /> to the config.xml file, re-built the app, tested on some smartphones and uploaded it. After distribution, we found that all network communication is failing on Android 9 devices. We were sure that this would be the popular cleartext error, so we changed all URLs to HTTPS. But the problem persisted. Then we build the app again but with the debuggable attribute on the manifest so we could inspect the app and see the errors, and we discovered that if we switch the debuggable feature on, the error doesn't happen - we are just adding it to the manifest, we are still building with the --release flag.
So, the final scenario is:
http requests fail only after targeting SDK 28, only on Android 9 devices, and only if the app is built with --release flag and we don't put the debuggable attribute on the manifest
if we change any point above error disappears so no way to debug
app is using https on all requests
when the app fails, requests don't reach the server, we already watched at that
So what the hell may be failing here?
Finally it seemed to be a somewhat kind of cleartext error teorically out of any specification. Our discovery was that adding
<edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
to the android platform tag on the config.xml file solved the problem. So we can assure that on our Ionic 1 + Cordova-Android 7 + Cordova CLI 8 + Ionic CLI 4 + HTTPS + non debuggable production build scenario, HTTPS requests were interpreted as cleartext requests and thus blocked until we statedly allowed them.

Android Kitkat compatibility issue

I'm using ionic v1 for a project and I have some compatibility issues.
I must deliver on Android KitKat OS (on a tablet) an application and many things don't work on KK but work on browsers on my PC.
For example https://awe.media/static/drawimage/minimal.html I've simply tried to use this code to do some tests (it works on my PC's browsers).
- I adapted the code to ionic v1 to make it work on my PC's browser
- Once it works I build the APK and install the APK on my emulator KK + KK real device and it doesn't work anymore.
PS: I've tried with and without Crosswalk
I come to think that maybe it's a build issue.
Any idea?
Thanks for reading.
I think you need to check in yourprojectname\platforms\android\AndroidManifest.xml
First check your android:minSdkVersion and android:targetSdkVersion:
You can replace it with this line if its diffrent from this:
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />

FIREBASE_AUTH_API is not available on this device

I have followed the new Google Firebase guide for Facebook sign-in on Android but I am consistently getting the following error on a particular device.
FirebaseAuth:signInWithCredential failed
com.google.firebase.FirebaseApiNotAvailableException: API: InternalFirebaseAuth.FIREBASE_AUTH_API is not available on this device.
On other devices it seems to work fine. The device is Moto X Play running Android 6.0.1. It also has Google Play Services 9.0.83. I tried a complete uninstall and reinstall with no luck.
This was a bug affecting the 9.0.0 and 9.0.1 versions of the SDK. It has been fixed as of SDK version 9.0.2.
Update the Google repository via the Android SDK manager and then change your gradle dependency to:
compile 'com.google.firebase:firebase-auth:9.0.2'
See incident details here.
As Alfonso says in the comments, there is an issue we are seeing where some users don't have the Firebase Auth API available even though they have Google Play services 9.0.83.
That's a bug - sorry about that - and is being investigated at the moment. If you're seeing it, please raise an issue in the troubleshooting page with any further details of the device where you had the problem.