8

I am trying to use the Huawei Maps Kit for the new devices that don't include Google Play Services. Codelab demo is located at:

https://developer.huawei.com/consumer/en/codelab/HMSMapKit/index.html#7

I haven't changed any single line of code of the demo and the app has automacally downloaded Huawei Mobile Services version 3.0.3.300.

However, the map still does not appear.

Did you face the same problem?

I am getting this logs:

01-26 14:24:34.265 19265-19265/com.wz.android.mapdemo W/DynamicModule: Failed to load remote module.

01-26 14:24:34.256 19265-19265/com.wz.android.mapdemo D/HmsMapKit_MapView_183: onStart
01-26 14:24:34.257 19265-19265/com.wz.android.mapdemo I/HmsMapKit_MapCreator_48: Making Createor dynamically
01-26 14:24:34.257 19265-19265/com.wz.android.mapdemo I/DynamicModule: Local module huawei_module_maps:0
01-26 14:24:34.257 19265-19265/com.wz.android.mapdemo I/DynamicModule: Remote module huawei_module_maps:-100
01-26 14:24:34.259 19265-19265/com.wz.android.mapdemo W/DynamicModule: Failed to load remote module.
    com.huawei.hms.feature.dynamic.DynamicModule$LoadingException: f*i*e* *o*l*a* *o*u*e
        at com.huawei.hms.feature.dynamic.DynamicModule.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DynamicModule.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DynamicModule.load(Unknown Source)
        at com.huawei.hms.maps.internal.MapCreator.getRemoteContext(MapCreator.java:97)
        at com.huawei.hms.maps.internal.MapCreator.getRemoteMapContext(MapCreator.java:85)
        at com.huawei.hms.maps.internal.MapCreator.getCreator(MapCreator.java:50)
        at com.huawei.hms.maps.MapView$MapViewDeferredLifecycleHelper.createDelegate(MapView.java:241)
        at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.onStart(Unknown Source)
        at com.huawei.hms.maps.MapView.onStart(MapView.java:184)
        at com.wz.android.mapdemo.MainActivity.onStart(MainActivity.java:82)
        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1245)
        at android.app.Activity.performStart(Activity.java:6330)
        at android.app.Activity.performRestart(Activity.java:6376)
        at android.app.Activity.performResume(Activity.java:6381)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3310)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3356)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1543)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:207)
        at android.app.ActivityThread.main(ActivityThread.java:5765)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
01-26 14:24:34.259 19265-19265/com.wz.android.mapdemo E/HmsMapKit_MapCreator_99: getRemoteContext: DynamicModule load failedcom.huawei.hms.feature.dynamic.DynamicModule$LoadingException: failed to load Module
01-26 14:24:34.261 19265-19265/com.wz.android.mapdemo I/HmsMapKit_MapCreator_53: getRemoteMapContext failed
01-26 14:24:34.263 19265-19265/com.wz.android.mapdemo D/HmsMapKit_MapView_166: onResume
01-26 14:24:34.263 19265-19265/com.wz.android.mapdemo I/HmsMapKit_MapCreator_48: Making Createor dynamically
01-26 14:24:34.263 19265-19265/com.wz.android.mapdemo I/DynamicModule: Local module huawei_module_maps:0
01-26 14:24:34.264 19265-19265/com.wz.android.mapdemo I/DynamicModule: Remote module huawei_module_maps:-100
01-26 14:24:34.265 19265-19265/com.wz.android.mapdemo W/DynamicModule: Failed to load remote module.
    com.huawei.hms.feature.dynamic.DynamicModule$LoadingException: f*i*e* *o*l*a* *o*u*e
        at com.huawei.hms.feature.dynamic.DynamicModule.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DynamicModule.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DynamicModule.load(Unknown Source)
        at com.huawei.hms.maps.internal.MapCreator.getRemoteContext(MapCreator.java:97)
        at com.huawei.hms.maps.internal.MapCreator.getRemoteMapContext(MapCreator.java:85)
        at com.huawei.hms.maps.internal.MapCreator.getCreator(MapCreator.java:50)
        at com.huawei.hms.maps.MapView$MapViewDeferredLifecycleHelper.createDelegate(MapView.java:241)
        at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.a(Unknown Source)
        at com.huawei.hms.feature.dynamic.DeferredLifecycleHelper.onResume(Unknown Source)
        at com.huawei.hms.maps.MapView.onResume(MapView.java:167)
        at com.wz.android.mapdemo.MainActivity.onResume(MainActivity.java:133)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1268)
        at android.app.Activity.performResume(Activity.java:6389)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3310)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3356)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1543)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:207)
        at android.app.ActivityThread.main(ActivityThread.java:5765)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
01-26 14:24:34.265 19265-19265/com.wz.android.mapdemo E/HmsMapKit_MapCreator_99: getRemoteContext: DynamicModule load failedcom.huawei.hms.feature.dynamic.DynamicModule$LoadingException: failed to load Module
01-26 14:24:34.267 19265-19265/com.wz.android.mapdemo I/HmsMapKit_MapCreator_53: getRemoteMapContext failed
zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
Javier Delgado
  • 2,343
  • 2
  • 17
  • 31

5 Answers5

3

Javier, I have just checked information in Huawei Developer web site https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/hms-map-v4-abouttheservice. There is "Restrictions" section 3.1 and it is stated there that only for Huawei devices.

KiraSb
  • 46
  • 1
0

I tried the sample project for HMS Map from Codelab and it works fine for all devices ( with GMS and without GMS). Did you modify anything in the sample code ( gradle.build, json files etc.) or just downloaded the sample code and build it to run?
I mean that probably you followed the procedure in Codelab and used sample project as a reference and updated some files based on the instruction?

Please provide more information

KiraSb
  • 46
  • 1
  • I have just downloaded the project and compiled it. I have not changed any file. The app has automacally downloaded Huawei Mobile Services version 3.0.3.300. Still not working :S – Javier Delgado Jan 28 '20 at 20:18
  • In which country are you testing it? I am in Spain. Does it have anything to do with it ? – Javier Delgado Jan 28 '20 at 22:14
  • Hello Javier! the latest HMS version is 4.0.0.334 not 3.0.3.300. Could you try to update the HMS version? You can use Huawei AppGallery for that. – KiraSb Jan 29 '20 at 11:31
  • I am in Finland. But what kind of device are you using : "the new devices that don't include Google Play Services" ? Is it Huawei device ? – KiraSb Jan 29 '20 at 11:32
  • I have installed manually Huawei Services 4.0.0.334 and still not working. It is not a Huawei Device, but AFAIK it is only required to install these Huawei Services in order to test in other devices or in an emulator. – Javier Delgado Jan 29 '20 at 14:14
  • Javier, I have just checked information in Huawei Developer web site https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/hms-map-v4-abouttheservice. There is "Restrictions" section 3.1 and it is stated there that only for Huawei devices. – KiraSb Jan 29 '20 at 15:45
  • What version of the Map Kit are you using – Javier Delgado Feb 04 '20 at 21:36
0

Try the following steps:

  1. Phone→Setting→Apps→search: Huawei Services Framework, uninstall it*
  2. Phone→Setting→Apps→search: Huawei Mobile Service, uninstall it*
  3. Phone→AppGallery→search: Huawei Mobile Service, install it

*If it is not possible to uninstall the services then try to deactivate them and uninstall their updates if you are prompted.

user1185087
  • 4,468
  • 1
  • 30
  • 38
0

Currently, HUAWEI Map Kit can only run and be used on Huawei phones. We are focusing on the decoupling now so that more capabilities can run on non-Huawei phones. For HMS Core capabilities that can run on non-Huawei phones, please refer to EMUI Version-Dependent Features. If Not supported is displayed in the Required Android Version (Non-Huawei Phones) column, the corresponding capability can only run on Huawei phones; if specific Android versions are displayed in this column, the corresponding capability can run on non-Huawei phones running such versions of Android systems.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
  • 1
    Good day! The note says "Android 7.0 does not support apps that have a platform signature.". What do you guys mean by that? Thanks – Bitwise DEVS Aug 30 '21 at 18:07
  • hi@Bitwise DEVS, The link above is a previous document, and I have updated the latest document in my answer, you can refer that. The latest document does not contain "Android 7.0 does not support apps that have a platform signature." restriction now. – zhangxaochen Aug 31 '21 at 01:20
  • 1
    Great, thank you. Does this mean that we can now test HMS Map Kit in non Huawei device as well? – Bitwise DEVS Aug 31 '21 at 04:47
  • Also I cannot see the Map Kit in the table from the given link – Bitwise DEVS Aug 31 '21 at 04:55
  • 1
    Does this mean that we can now test HMS Map Kit in non Huawei device as well?--sure,pls kindly refer to [this](https://developer.huawei.com/consumer/en/doc/development/HMSCore-Guides/android-sdk-brief-introduction-0000001061991343#section1261123620147).It's the latest document for the map kit – zhangxaochen Aug 31 '21 at 05:56
  • 1
    Many thanks, lastly can we run it on emulator since it is never mentioned in the documentation? – Bitwise DEVS Aug 31 '21 at 08:12
  • 1
    Of course you can. And you can also use [huawei cloud debugging](https://developer.huawei.com/consumer/en/agconnect/cloud-adjust) to test it. – zhangxaochen Aug 31 '21 at 08:27
  • That's great! Thank you – Bitwise DEVS Aug 31 '21 at 08:55
  • You‘re welcome.Should you need help with anything else, please feel free to reach out back to us. – zhangxaochen Aug 31 '21 at 08:58
  • 1
    Yes we do have problem with HMS Core, please refer to this question thank you https://stackoverflow.com/q/69004914/12204620 – Bitwise DEVS Aug 31 '21 at 20:23
0

To download the demo, you need to create a project on AGC, add your own sha256, and download the JSON file to your app-level directory. The map can be properly displayed.

Sunshine
  • 61
  • 2