skip to Main Content

We have build our mobile application android and ios using flutter. Now is it possible to build Huawei application using that same codebase ? if not then what we have to learn to create Huawei application?

We are searching Huawei documentations but did not found any solution.

2

Answers


  1. It’s the same code as the Android application the one that you need to upload to AppGallery. Just need to create a Huawei account and use the keys agServices provided there

    Login or Signup to reply.
  2. You should also note that if you use play services in your app, then you will either need to disable these features if the device does not support play, or use the equivalent hms libraries.

    fun isGooglePlayServicesAvailable(context: Context): Boolean {
        val googleApiAvailability = GoogleApiAvailability.getInstance()
        val resultCode = googleApiAvailability.isGooglePlayServicesAvailable(context)
        return resultCode == ConnectionResult.SUCCESS
    }
    

    and for huawei

    fun isHuaweiMobileServicesAvailable(context: Context): Boolean {
        val huaweiApiAvailability = HuaweiApiAvailability.getInstance()
        val resultCode = huaweiApiAvailability.isHuaweiMobileServicesAvailable(context)
        return resultCode == com.huawei.hms.api.ConnectionResult.SUCCESS
    }
    

    is basic android kotlin code to determine which of the libraries are available. (once you have the dependencies installed)

    There’s more information about flutter specifically on the Huawei developers site here.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search