react-native-google-places ERROR making places detection api call: ERROR - android

this is the code that the docs in the googleplace but this is happend
ERROR making places detection api call: ERROR
RNGooglePlaces.getCurrentPlace()
.then((results) => alert(results))
.catch((error) => alert(error.message));

According to this GitHub issue, assuming you're using tolu360's react-native-google-places library, you should check the following:
Ensure device's GPS location is on.
Ensure you have asked for (and received) ACCESS_FINE_LOCATION permission.
Ensure you are using a real device, not an emulator.
Since you need a specific place, you need a real device with the ability to report it's location, and permission to access that information!
On line 363 of RNGooglePlacesModule.java inside the library, you can add a breakpoint to see the actual error returned by likelyPlaces.getStatus(). I suggest you do this and add any extra information into your question.

Related

Github actions with Google playstore Api Error: The caller does not have permission

I'm trying to configure github actions to upload my .aab file to the PlayStore but been stuck on a permission issue which doesn't get fixed event though I've tried all the suggestions online:
I get:
I've been looking at the following issue which seems to be identical https://github.com/r0adkll/upload-google-play/issues/11
Was able to create an account and generate the json along with adding permissions. The google cloud api has an owner permission also the API Manager Permission but still I get this error. Any ideas what else I could try?
After much digging I found out that the problem wasn't with permissions, what was happening was that I had incorrect packageName in the script, after fixing the package name I had incorrect custom track name, so any typo in those fields will show permission error.
After fixing those the upload completed smoothly. Make sure you have correct values in the below fields since the permission error is misleading.
...
packageName: com.yourapp
releaseFiles: app/build/outputs/bundle/release/app-release.aab
track: alpha
status: completed
...

Why does the API that obtains the archive image size for the saved game function report an error?

I developed a game app and integrated HUAWEI Game Service. However, when I called the API for obtaining the archive image size following instructions in the documentation, the result code 7002 was returned. I cannot locate the fault. What can I do?
The relevant log information is as follows:
Line 560: 2020-03-17 21:12:48.436 7644-17452/? I/ServerConstant: [I/HwJOS/ServerConstant 7644:25555 :108] get DRIVE serverUrl cost:4,isEmpty:false,isChina:false, Url:https://drive-drru.cloud.hicloud.com
Line 3567: 2020-03-17 21:12:48.600 7644-17452/? I/HMSGameArchiveRequest: [W/HwJOS/HMSGameArchiveRequest 7644:25558 :172] response not GetArchiveMetadataResponse.code: 7002
Line 3568: 2020-03-17 21:12:48.601 7644-17452/? I/HMSGameHelper: [I/HwJOS/HMSGameHelper 7644:25558 :92] reportInterfaceAccessStartBIEvent interfaceName: HMSGetArchiveMaxSizeRequest.getArchiveMaxSize duration: 0 result: 7002
Further question: Are there any precautions for calling other APIs of HUAWEI Game Service? I also plan to use the events and achievements features of HUAWEI Game Service.
Error code 7002 indicates that the server is abnormal. You need to ensure that your service location is the same as the location where your HUAWEI ID was registered.
Only devices whose service location is the same as the location where the currently signed-in HUAWEI ID was registered can call this API. To check the registration location, go to Account center > Settings > About. To check your service location, go to AppGallery > Me > Settings > Country/Region.
Huawei provides a full set of APIs for you to quickly implement multiple game functions. For details, please refer to the following documents:
Events, Achievements, Leaderboards, Saved games, Player status.
Here you can find the list of error codes for Game service. 7002 is network error, meaning there was a problem communicating with Huawei server. Check your network and proxy settings.

React native queries GPS coordinates and gives timeout

We have the next problem:
We are consulting the gps location in order to get a list that contains only those that are close in a radius, but when consulting the GPS it gives us timeout after at leat 40 seconds of waiting.
The problem especially occurs in Android with a Xiaomi Redmi 8 in industrial environments, with less connection than usual or on the move, they don´t have access to LTE all the time.
We use the library # react-native-community / geolocation or navigation.position
Can you help us with any other library or strategy to obtain GPS position that does not consists in the gps wacthing changes on its position all the time? something like getting it on the background..
Code
Geolocation.getCurrentPosition(
position => {
// process the position
},
error => {
console.log(error);
}, {
timeout: 40000,
maximumAge: 0
}
);
As cited from library's github page:
Currently, on Android, this uses the android.location API. This API is not recommended by Google because it is less accurate and slower than the recommended Google Location Services API. This is something that we want to change in the near future https://github.com/react-native-community/react-native-geolocation/issues/6.
There also are some library suggestions in the readme, that actually use Google Location Services API. I've used react-native-location, but this package isn't actively maintained anymore, so I switched to react-native-geolocation-service, which has a very similar API to what you're already using, more specifically the getCurrentPosition.
Perhaps you should give it a try.
react-native-community/geolocation does not utilize the more accurate Google Location Services API, as stated in readme
The recommended library for GPS location (and the one I used) for RN Android is react-native-geolocation-service. Its Readme also mentions a timeout issue which makes me wonder if it is the same as yours:
This library is created in an attempt to fix the location timeout
issue on android with the react-native's current implementation of
Geolocation API. This library tries to solve the issue by using Google
Play Service's new FusedLocationProviderClient API, which Google
strongly recommends over android's default framework location API. It
automatically decides which provider to use based on your request
configuration and also prompts you to change the location mode if it
doesn't satisfy your current request configuration.
So if I were you I would give it a go. The API is meant to be a drop-in replacement for the library you used so migrating should be just a matter of changing packages.

can't authorise moves through app link

We are developing an app that should get data from the Moves app API.
When authorising our app on the mobile phone, we manage to do so successfully in the case in which we submit the PIN provided by the desktop link into the moves app:
https://api.moves-app.com/oauth/v1/authorize?response_type=code&client_id=<client_id>&scope=<scope>&state=<state>
In the case where I use the Mobile website / app link instead, this won't work:
moves://app/authorize?client_id=<client_id>&scope=activity%20location&state=<state>&redirect_uri=<redirect_uri>
Note: <redirect_uri>==encodeURIComponent("mymovesconnector:8081/callback").
The response we get from the Moves API is 400: {"error":"invalid_grant"}.
From the docs, it says that invalid_grant can happen if either:
the code in the request is not valid or
the code has expired (it’s valid for 5 minutes currently) or
the code has been revoked, because it was already used in an access token request (both successful and unsuccessful requests will revoke the code) or
you are missing the redirect_uri parameter when it’s required.
My checklist:
I guess this could have happened, but how/why should this code, provided over moves://, be different than the one provided through the https:// request? What control do I have over this?
not my case, since I'm using the code right away within less then a few seconds
if this might have happened, where could it happen other than through the redirect url?
I'm providing it always. It's always the same - also in the app settings on moves.
Can't figure out what I'm missing. Went through the docs many times, step by step. No success.
While writing down my question, I managed to figure out a solution to this problem.
The docs don't point out that response_type=code might also be used for the moves:// link. I tried to add this parameter, and it worked!
Note: this has been tested on a virtual android device only (Genymotion).

Android Licensing Error 561 (0x231)

I have some applications that were transferred from another company to ours. We have had google move them to our Publisher Account. However I am trying to verify the Licensing and can only get Don't Allow with an error of 561.
I have done a lot of licensed apps and have checked permissions, PUBLIC_KEY, Test Accounts, to whole thing. I have checked versions, and tried testing the app signed and unsigned. No luck it always gives an error 561.
I cannot find anything about an error 561, does anyone know what this code means?
I assume you are referring to the Method void processServerResponse(int response, ResponseData rawData); in the interface com.google.android.vending.licensing.Policy
561 is the same as 0x231 which is definde in the interafce as NOT_LICENSED.
So there is an error with your license and you should check in the rawData to see why.
I was getting the same error, I spent a whole day to get rid of it. In my case, the problem was due to network security. I tried it with the different network (Personal hotspot network). It worked well.
This answer is maybe for anyone because it's late.
Make sure that you add the CHECK_LICENCE permission in the Manifest:
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
and make sure you upload the app to the store for testing.

Categories

Resources