Android Google maps api not loading on my app - android

The error message is:
Network error. Please try again later.
Any idea why it's possibly not loading on my phone. Everything seems to be updated and good.

Assuming your device has a network connection, I would assume it's because you don't have the android.permission.INTERNET permission declared in your manifest.

Related

Nearby Connections API: Android 12 fails to advertise and discover devices with unknown status codes (8037, 8038, 8039)

I'm developing an app that uses Nearby Connections API with basic P2P strategy. Suddenly, weirdly enough I'm not able to advertise and discover devices on my Pixel 3a with newest Android 12 and Play Services. OnFailureListeners throw these exceptions:
for discovering: 8037: unknown status code: 8037
for advertising: 8038: unknown status code: 8038
Indeed they cannot be found in docs and source code.
I also checked Google's "Rock Papers Scissors" official sample and it throws the same error codes.
Of course I reinstalled the app and restarted & updated my phone. EDIT: I also did the factory reset and it didn't help. But after I downgraded to latest Android 11 using Android Flash Tool, it started working again. Moreover, everything still works fine on Android 11, 10 and 9 using different phones.
Any ideas what causes this issue? It just worked fine for last two weeks and stopped working today. I believe it needs some deep investigation in source code (Xlythe if I may ask for your help, that would be really great).
After a while I finally managed to find a solution. It looks like Nearby Connections (all Nearbys?) have a critical bug on Android 12 that happens non-deterministically (API can work fine for few weeks then suddenly will throw these errors for another few weeks).
This bug is related to Android 12's feature change related to Bluetooth. Quoting:
Android 12 introduces the BLUETOOTH_SCAN, BLUETOOTH_ADVERTISE, and BLUETOOTH_CONNECT permissions. These permissions make it easier for apps that target Android 12 to interact with Bluetooth devices, especially for apps that don't require access to device location.
In other words, some Bluetooth permissions are now legacy and there are some new permissions that are mandatory to make the API work. And you need to handle both scenarios in your code (before and after Android 12).
So here's a quick "mapper" from error codes to Manifest's permissions:
Error code 8037 while discovering - you haven't granted permission
for BLUETOOTH_SCAN
Error code 8038 while advertising - you haven't granted permission for BLUETOOTH_ADVERTISE
Error code 8039 (that's a new one as well) while onEndpointFound - you haven't granted permission for BLUETOOTH_CONNECT
More information how to implement new permissions properly can be found in documentation.
And I'm still waiting for Google to fix it in next Nearby API update as this is a little bit of workaround. Adding proper error messages to codes might be a little work to do but I would also revise if other permissions are still required after Android 12's update.

Android app can not connect to internet, but other apps are fine

I have an app for android created with kotlin.
In general, it works fine. But one user reports he can not login and error is like no internet connection.
However, he says connection is fine. He can open api endpoint with the browser on same device .
What can be the reason for this?
The app has manifest record for network permissions. For other users it works fine
As you don't have given much information, I can give you some points to check:
Network permission in manifest file (that is already done).
Run time permission for Android 6.0 and above.
check if you done something like this code.
try{
//network code
}
catch(Exception e){
DialogBOXSHOW("Network error");
}
because Exception here can catch any type of error even NullPointerException

What means: MediaPlayer - This is not a sprint project

While working with the MediaPlayer I recognized this log message and wondered about its meaning.
Does anyone have an idea? The player works fine but this message seems strange.
02-21 18:25:44.157: I/MediaPlayer(21538): This is not a sprint project
Probably you forgot to include permissions for internet in your manifest xml:
<uses-permission android:name="android.permission.INTERNET"
I am also trying to create a MediaPlayer app. And because I was missing the internet permission I got exactly the same message / error.
I feel that this print is coming from a phone caller application or a Youtube kind of application. I think this print has been put to identify that the network provider is not Sprint. There is a very similar log for HTC One as in this post. It looks like a customized version of the MediaPlayer to print the statistics of the connection setup.
My guess is that it is an internal error that got out.
Sprint Software Development

Does this Android permission prevent me from getting error reports?

In my application descriptor file there is this line:
<!--Removing the permission android.permission.INTERNET will have the side effect
of preventing you from debugging your application on your device-->
<uses-permission android:name="android.permission.INTERNET"/>
Does this mean I won't be able to debug my application with Flash Builder or does it mean that if my app crashes as a user is running it I won't get error reports in Google App developer center?
Nope and No! This is just a permission it wouldn't affect any of the above. It just allows your application to connect to Internet.
But maybe your application needs Internet just to work properly.
ANR and Crash reporting is integrated into OS, and handled via Play Store services. It has nothing to do with your App's permissions.

Android: Reverse Geocoding not working

Apparently, I can get the latitude and longitude but when I this part of code below for Reverse Geocoding it shows as "Service not available". What does it mean? I have added user permisions for INTERNET, FINE and COARSE location in the Android manifest file. Am I missing something ?
this comes when you are running your app on emulator, try running on actual device. I think it will work properly on device.

Categories

Resources