We have an Android SDK and a Sample SDK app which uses the SDK for testing purposes. The SDK uses Google Play Services API's for location, activities detection, geofence etc. New Huawei devices are no longer able to make use of Google Play Services and should use HMS Core instead. We've completed the conversion process using the Huawei toolkit ([login to view URL]) using the methods as per this resource: [login to view URL]
The conversion process was a success. Minor enhancements/code adjustment might however be required on the SDK code based on real world tests. Please note that testing involves me driving around with the device in a car to determine if trip detection starts correctly (eg geofence exit) and if a trip ends correctly eg geofence is set again correctly etc. We already have detailed logs for the respective events - we have to investigate these logs based on real world results and make minor adjustments if required to ensure it's running perfectly on HMS Core on as well.
We've already performed some tests and have identified the following items to investigate:
Set Geofence on Trip Stop:
The geofence is not always correctly set when a trip ends. We've identified the code to investigate in the OnDestroy method of the service.
We have to check which method to use to check if the device has a step detector sensor on Huawei eg on my device it says on dashboard Step Detector: false. When a trip starts, the our toast test message does indicate ‘step sensor registered’, but not sure if the Huawei device really has a step sensor?
On a Huawei device, I think we might have to ask specifically for permission to Detect Motion status? I think we do this for GMS: com.google.android.gms.permission.ACTIVITY_RECOGNITION – so maybe we have to do something similar for HMS to ensure permission is granted correctly in the Sample App and/or SDK for Motion Status?
The ideal would be to use this coming Saturday & Sunday to perform testing and make adjustments. The testing process we currently use works as follows:
Review code & make changes
Send APK (Diawi) to me
Install on Device
Do a trip and review log
It would be best if you have a Huawei device to also run local tests on your debugger - preferably with EMUI > 10 as these devices don't support Google Play Services eg has to use HMS Core instead.