Unable to release Android Bundle - location request false positive error - android

I am developing on React Native and using react-native-geolocation-service library to access foreground location only (App is for office and other location checkin purposes)
I recently faced this issue, last week I was still able to upload and release my aab just fine, but this week I can't anymore although I only changed a few UI based on user's feedback.
So basically permission and logic wise there's no change to my app.
I even compared both app's permission list and both are exactly the same:
But then I'm getting this error
even though I have specifically declared here that I'm not accessing background location
This app targetSdkVersion is 28, if that's important, because I heard starting API 28 there are alot of new restrictions on play console.
Have anyone ever encountered this issue?
If this is a problem with the library I'm using could anyone give me any pointers?
Thanks

Okay got it,
I looked into it and found this
https://developer.android.com/training/location/permissions#foreground
so I just added service tag like so
<service
android:name=".ForegroundLocation"
android:foregroundServiceType="location">
</service>
and updated targetSdkVersion to 29 and it worked!
Although still not sure which causes it to work lol
Can anyone explain this to me? Thanks!

Related

Android LocationManager: unexpected behavior in Android 12

Users in the field are reporting random problems with GPS location in an app.
The app has been using LocationManager for about 12 years with little modification.
I was able to see some unpredictable behavior by testing on Pixel 3 with Android 12.
The behavior includes location being off by half a mile, and not updating regularly unless some other app uses GPS.
Are there some things that are different about location manager in Android 11/12?
If so where are they documented?
The code I have has worked fine since Android 1.5.
I am using it through a library, but decompiling gave me this call:
mLocationManager.requestLocationUpdates("gps", 250, 1, listener);
I changed it to
mLocationManager.requestLocationUpdates("gps", 100, 0, listener);
It worked for a bit and then stopped working again.
The updates don't come in.
Does it need background location even though the documentation says I SHOULDN'T need background location to use location in an activity or foreground service?
If not, what the heck is going on?
Weve seen the same problem #nathanMDT which we logged initially with the SDK we thought was at fault, link below. The problem is Android 12 specifically and a change they made about a month ago to some google map permissions, all the relevant articles can be found in the below post. The devs dropped an update about 3 days ago in this tracker which im hoping will help. First response was "wait till Android 13". As a side note downgrading to Android 11 instantly fixes the frequency updates - not that this helps much.
https://issuetracker.google.com/issues/215186921?pli=1
https://github.com/mapbox/mapbox-unity-sdk/issues/1850
Foreground services still require background location permissions to access location. That's because its non obvious to the user that just because there's a notification there that it's still using GPS. And yes, this was added in Android 11: https://developer.android.com/guide/components/foreground-services#bg-access-restrictions

"Call requires permissions that may be rejected by user" requires implementation except in imported code

I am programming in Android using LocationManager. I build a simple app that just shows the current location. And I got the error of the title.
Now, this question has been posted several times but before someone tags this question as a duplicate, please acknowledge that it is not, and I will explain why
All other questions explain that this problems is because Android 6 now require to explicitly ask for permission at runtime. So I did that and I solved my problem. (well it is almost working)
Why did I take so much time in solving it? It is because I had another version of the program that run without problems without any explicit request for permissions
This other version was yes, built before Android 23 I think, it was built in eclipse and I just downloaded the project, and imported it to Android Studio changing the platform in build.gradle to make it run successfully. So I thought that it was converted to Android 6 already.
So the imported program worked without any explicit request for permission but my program had to have this. Why is this so?
My second question is, the editor did clearly underlined in red the LocationManager functions declaring that they need explicit request for permission. (In the other imported program this did not happen) However even after I did ask for permission, and even after the program run successfully, it still underlined them in red. Why?

App not installed Firebase FCM

After making a Firebase app and implementing everything I needed, including the .json, gradle, etc. It all compiles fine.
The first time, it said either move to minSdk 23 or use multidex, I chose minSdk 23 for I don't know if that was it. But I am getting app not installed, even though there is no package interference.
It is being built and installed from the mobile IDE "AIDE". If you need any of my code or clarification, please ask. As I haven't had this type of error and I'm assuming I may be missing something. Thank You.
My problem ended up being I accidentally changed the action and category of .MainActivity so it wasn't "MAIN" and "LAUNCHER". Sadly, I did not end up getting the app itself working :(

Strange issue with Google Maps display

I am facing a strange issue with my app - if I specify a wrong API Key, I get an authentication error as expected but when I specify the right key, I don't get any error message but just a blank screen. What is even more strange is that when I use the same Google Play Services project in a test project, the map loads and is displayed properly.
I have set the Build Target as 21 for both my app as well as the Test project. Please let me know if you might know the reason. Appreciate your help.
Check you've put the API key into the correct google_maps_api.xml. It me a couple of hours to notice there are two. One for Debug and one for Release.
Finally figured out the reason - all the processing was done on the UI thread, and my phone being slower, was dropping the UI processing. Moved most of the logic to a separate thread and the map started to get displayed.

Android - GoogleApiClient ActivityRecognitionIntentService is never called

I need to detect user dynamics in my application. I started by using GooglePlayServicesClient which till three months ago worked perfectly, Then it stopped working on my HTC one device (although it was still working on three different devices I've checked). I know it is now replaced by GoogleApiClient, so I thought this was my problem, but it keeps not working even after changing to the new API.
The problem is that the intent given to ActivityRecognition.ActivityRecognitionApi.requestActivityUpdates is never called. I used the same implementation as : https://blacode.wordpress.com/2014/12/26/user-activity-recognition-through-new-activityrecognitionapi-in-android-activityrecognitionclient-deprecated/
(And again, this implementation works on three other devices but not on HTC one).
I did some reading online and I saw some similar issues that were solved by updating google play or activating google play location services or disable mock location on the android developers settings. Non worked for me.
Has anyone encountered the same problem or maybe has some idea what can be the cause?
If your onHandleIntent is not being triggered, make sure you have a receiver tag in your manifest (inside the application tag, but outside the activity) :
<service
android:name=".ActivityRecognitionIntentService"
android:exported="false" />
I struggled with this for several hours before finally realizing this was missing. As soon as I added it, everything worked.
Also, if you add an IntentService class through the AndroidStudio submenu for IntentService instead of just adding a plain Java class and setting it up yourself, it will automatically be registered in the manifest. New...->Service->IntentService
Eventually what solved it was resetting the device to manufacturer settings, meaning that the problem was some setting in the device , which I still have no clue to what caused it. If anyone finds an answer I'll be glad to hear about it.

Categories

Resources