I already integrate HUAWEI Location Kit successfully. But now got error permission denied - huawei-mobile-services

Recently the Location Kit stop working and throw 10102: PERMISSION_DENIED exception.
I already have location permission for app AND HMS Core. Sim card is use as well.
Location Kit version: 4.0.4.300

The error code 10102 PERMISSION_DENIED is caused by insufficient permission, see Location Kit-Result Codes (huawei.com). Please verify that the location permission has been assigned to HMS Core (APK).
The following is the FAQ provided detailed instruction answer for the error code solution:
What should I do if the API is called successfully but the device location cannot be obtained?
Ensure that you have installed HMS Core (APK) 3.0.0.300 or later.
Ensure that the location permission has been assigned to HMS Core (APK). To do so, go to Settings > Apps > Apps and find HMS Core. (The menu path may vary depending on the operating system version. If HMS Core is not found, tap the menu icon in the upper right corner of Apps and tap Show system processes.) Then, tap the HMS Core (APK) icon, go to App info > Permissions > Location, and verify that the location permission is assigned to HMS Core. On a device running EMUI 10.0 or later, Location must be set to Always for HMS Core.
Ensure that Location is enabled for the app to be tested.
Ensure that Location is enabled on the notification panel.
Verify that the GPS or network signal is strong. In regions where the GPS or network signal is weak, the location may not be obtained.
Verify that a SIM card is inserted into the device and works properly so that Location Kit can provide more precise locations.

Please try clearing the HMS core data and try again.

Related

After application uses the same package name in AppGallery and GooglePlaystore, it is removed due to Google Play protection

Application is removed playstore by Google Protect.
Every release the version code from Huawei App Gallery is always higher than the version code in Play Store.
The new release version code in the Play Store will higher than the previous release version code in both Play Store and App Gallery.
But the rolling out percentage between the two stores is different. Not sure it would affect
Please help with another quick question. What will happen to App Gallery auto-update if we release the app in Huawei App Store with a different Keystore than the release in Google Play Store?
For the overwriting of each other from AppGallery and Google Play store problem, the root cause is the apps are using the same package name and the same signing key in conjunction with auto-update from both stores. When there is a higher version available from either store, the Android system would recognize it, download and update the app, which would cause overwrite.
The answer is actually in the second question. Using a new keystore for AppGallery would make the app different from the app from GPS from Android system point of view. Please use a new keystore for AG release, there will not be any overwritten problem once this update. Remember to update the SHA256 signature in AG for the new release.
This is a message displayed on Google Protect. We could not restrict the play protect. You can disable Google Protect on your phone manually.
In addition, Google Protect is a black-box detection, which is claimed to be an intelligent detection and may display a message for all apps that are not downloaded by Google Play.
Based on the warning message, this message comes in "Backdoor" category(refer below link).
https://developers.google.com/android/play-protect/warning-strings
Also you can refer the below link
https://developers.google.com/android/play-protect/client-protections#developer-appeal
So you can contact google support team regarding this.

Why Device list won’t show up in the App GUI after integrated with HMS DeviceVirtualization engine?

I followed HMS developer guide for Device virtualization (DV) engine development here - https://developer.huawei.com/consumer/en/doc/development/connectivity-Guides/devicevirtualization-preparation, I integrated DV SDK into my app, compile and build all finished fine. But after deployed my DV app to my cell phone, the hardware device list won’t show up in the app GUI. What could be the reason for this?
Please check to see if you have already done the following:
First of all, you need send Permission applications for the usage of DV Engine to : devConnect#huawei.com
Once your application is approved, make sure you also include all the required permissions and your app id as meta data in AndroidManifest.xml. Virtual device permission of DV Engine, which is mandatory for using the distributed virtual devices.
com.huawei.permission.DISTRIBUTED_VIRTUALDEVICE
<meta-data
android:name="com.huawei.hms.client.appid"
android:value="appid=xxxxxxxxx"/>
Make sure the DV SDK version in your code is same as the one in your cell phone. Below is a sample code to show how to check the DV version: CURRENT_KIT_VERSION is the HUAWEI DV Engine version that the app is compatible with. Your app needs to record the version, and check whether the DV Engine version on your mobile phone is the same as the DV Engine version that the app is compatible with.
boolean isSupport = true;
try {
// Obtain the running version of DV Kit.
String version = DvKit.getVersion();
if (version.compareTo(CURRENT_KIT_VERSION) < 0) {
// The current DV Kit version does not meet the app running requirements.
isSupport = false;
}
} catch (NoClassDefFoundError e) {
// The current running environment does not support the DV Kit.
isSupport = false;
Log.e(TAG, "DvKit not exist", e);
}
if (isSupport) {
// The current DV Kit version meets the app running requirements.
Intent intent = new Intent(MainActivity.this, DvKitDemoActivity.class);
startActivity(intent);
}
1. Please check Device Compatibility:
Currently, DeviceVirtualization Engine supports only Huawei mobile phones. When an app invokes the APIs in DV Engine in an unsupported running environment, or on a Huawei phone running an unsupported EMUI version, the system throws NoClassDefFoundError. Therefore, apps should check compatibility between the running environment and DV Engine version. For details, see docs.
2. Check whether the callback method connect is called successfully:
If so, your configuration is correct;
If not, check whether you have the permission to access related APIs. For security purposes, you need to apply for permissions from Huawei to use open APIs of DeviceVirtualization Engine. As #Zinna put it, applying for API permissions requires the app ID generated after you created your app on AppGallery Connect, and that the fingerprint has been configured. For permission application, please send an email to devConnect#huawei.com, and specify the topic "DeviceVirtualization Engine permission application." For details, please see docs.
3. Network connection is required when you start your app for the first time.
Check whether the callback method startDiscovery is called successfully. If so, and device parameters are not empty, you can send data to the UI thread through threads. For details, please refer to the demo provided on the official website.

Required Background Mode for location not re opening app after reboot

We are trying to develop an application similar to an existing app currently in the app store.
This app is sending location data in the background to a web service, and the app will continue to run following a reboot of the device. I will also note, that following the app being installed and registered, the location services indictor remains constantly on the status bar. I am assuming this is necessary to allow the app to continue to run following a the device being restarted.
We have tried using the "UIBackgroundModes/required background modes for location", and have been unsuccessful in having the app continue to run following a reboot of the device.
Can someone please point us in the right direction as to how to have the app continue to send location data following a device reboot.
Thank you very much!
No app will run following a device reboot. It is not possible to build a file daemon under Apple's SDKs. You'd have to jailbreak the phone and run unauthorized stuff to do so, then you wouldn't be accepted into Apple's app store.
Yes your app will be restarted if your are monitoring significant location changes or monitoring a region and that region is entered/exited.
In iOS 7 Apple made an important change that will disable these mechanisms if a user force quits your app. They will remain disabled until the user starts your app again.

Location services control from iphone app

I installed an application from app store that uses gps. I have only put the app on install and it itself was added to the location services with button turned on. Whereas my r&d regarding turning location services on from my iphone app results that i cannot do it directly from my code. Can anybody explain this situation and answer me that whether the app can set location services at install time or is it something else
you cannot change the location services settings from your code.
when you first install/launch the app, it is the OS who ask for the usage of location services from User - not your application when your app just start code to find location.
User is given privilege to enable/disable location services usage for the app - as per apple policy.

iphone Location Services code that works on OS 4.1 in appstore

There's a bug in OS 4.1 that has broken location services for some iPhone apps ( https://devforums.apple.com/message/306250 ). Basically location services fails to turn on, and doesn't even ask the user for permission to get their location. The worst thing about the bug is that it doesn't occur when you're installing the app to a device from XCode, it occurs you when you're downloading from the App Store! This makes it almost impossible to test for a fix.
Not everyone's app has been affected, so I'm trying to find out what causes it.
Does anyone have any location services code that's NOT affected by this problem? In other words, who has code for an app that has location services working fine on OS 4.1 devices, when installed from the AppStore?
Thanks!
Tristan
I have found a workaround-Solution: Reset the location warning. (Settings > General > Reset > Reset Location Warnings)
I have seen this occur with apps I have developed when the device has installed a testing version provisioned under a distribution profile and then installs the final version submitted to the app store. The symptom is that Location Services never seems to initialize or ask for permissions and you wind up never being called back with a location or an error to handle.
We have verified that rebooting the device does NOT fix it, but that resetting the location warnings does. In our testing, this only affects devices that ran developer provisioned builds and not 'pristine' devices that only install the App Store build.
I worked through this with the apple help people. Resetting location warning didn't work. Resetting the network didn't work.
Basically, I reset the phone in itunes and set it up as a new phone. The location now works.