You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
HMSLocation.getFusedLocationProviderClient() result in Cannot read properties of undefined (reading 'getFusedLocationProviderClient') issue
Expected behavior
HMSLocation.getFusedLocationProviderClient() should return FusedLocationService Object
Current behavior
when I run below codes below result in above issue. Below is the code snippets:
import HMSLocation from "@hmscore/ionic-native-hms-location";
Added classpath 'com.huawei.agconnect:agcp:1.6.1.300' to buildscript dependencies in build.gradle
I'm calling HMSLocation.getFusedLocationProviderClient().... (and so on) and get the error: TypeError: uC.getFusedLocationProviderClient is not a function. I'm testing on a real device, not the emulator. Location is enabled.
I'm using import { HMSLocation } from '@hmscore/ionic-native-hms-location/ngx';
Description
HMSLocation.getFusedLocationProviderClient() result in Cannot read properties of undefined (reading 'getFusedLocationProviderClient') issue
Expected behavior
HMSLocation.getFusedLocationProviderClient() should return FusedLocationService Object
Current behavior
when I run below codes below result in above issue. Below is the code snippets:
import HMSLocation from "@hmscore/ionic-native-hms-location";
...
const fusedClient = HMSLocation.getFusedLocationProviderClient();
if(fusedClient != null){
fusedClient.getLastLocation({
needAddress : true,
language : "cn",
countryCode : "CN"
}).then((res) =>{
debugger;
console.log(res)
}).catch((err) => {
debugger;
console.log(err)
});
}
Screenshots
Logs
Post logs here or paste them to Ghostbin and insert the link here.
Environment
Other
Add any other context about the problem here
The text was updated successfully, but these errors were encountered: