I am trying to integrate HMS kits i.e. location, ads, etc. into my app so that I can launch app into appGallery as well.
However, I also use react-native-firebase for other services. Now, I get alert/dialog saying:
"No google services available in this device...."ยด
How to fix this issue? Is there any way to avoid this message?
That's true that GMS is not supported on Huawei phones released after the Google ban. However, if you just want to suppress this dialog complaining "No google services available in this device...." in RN that could be achieved by Turning off Google Play Services availability errors:
firebase.utils().errorOnMissingPlayServices = false;
firebase.utils().promptOnMissingPlayServices = false;
for more information please visit this link.
GMS is not supported on Huawei phones released after the Google ban. Here I provide two options for you:
Option 1: Release your app both on HUAWEI AppGallery and Google Play, with different packages. The app you release on AppGallery contains only Huawei's logic code. For details about multi-channel packaging, please refer to docs.
Option 2: Release the same app on HUAWEI AppGallery and Google Play. Add the following code to determine whether GMS APIs or HMS APIs are available and call the available APIs:
public boolean isGMS(){
return GoogleApiAvailability.getInstance().isGooglePlayServicesAvailable(this) == com.google.android.gms.common.ConnectionResult.SUCCESS;
}
public boolean isHMS(){
return HuaweiApiAvailability.getInstance().isHuaweiMobileServicesAvailable(this) == com.huawei.hms.api.ConnectionResult.SUCCESS;
}
You can add the code manually, or use HMS ToolKit to realize G+H logic judgment.
Related
Unfortunately, some of the users could not access the app when they search about it and if they use the app link to reach it the app appears but the install button is disabled
Please can you check what are devices the application is not available.
If the application unavailable for HMS devices, that means there is a Strong dependency on GMS (Google mobile services). So it will be available for download only GMS supporting devices. If you want to make it available on all devices, please integrate HMS services by implementing G+H approach so that it will be available on GMS and HMS devices.
Please follow the below link to integrate hms services with G+H approach:
https://forums.developer.huawei.com/forumPortal/en/topic/0201200435859940059
If only integration of HMS is needed, please refer to: https://developer.huawei.com/consumer/en/doc/development/HMSCore-Library/android-sdk-download-0000001064112371
This is the first time I'm uploading an app to the App Gallery and I've read about things like HMS and other related things there are to know however I'm still not sure about the two things I'm using in my app. I'm going to submit the app I've built to Huawei AppGallery. I have only used two things:
Google SignIn (Not with Firebase, it's done with OAuth 2.0 on Google Cloud)
Firestore (From the firebase stack only Firestore is used)
My question is will both of these services work on Huawei phones which is without GMS? As I don't think any of these are related to GMS and I Understand that some services like Push notifications if implemented from firebase will not work etc, but at the moment I'm only interested in these two services.
If not then, I'm using react native so is there a way to check if the user is from a Huawei phone that doesn't have GMS?
Your app can be released to Huawei AppGallery normally.
My question is will both of these services work on Huawei phones which is without GMS? As I don't think any of these are related to GMS and I Understand that some services like Push notifications if implemented from firebase will not work etc, but at the moment I'm only interested in these two services.
Huawei do provide an Android Virtual Device called Cloud Debugging of AppGallery Connect to test your app for Huawei Devices.You can run your app on the latest and most popular Huawei devices to test app functions.
For details, you can see this answer.
I've build an app using Ionic 5 (Angular) and Capacitor. I'm using the Capacitor plugin for Push Notifications. All is working fine on both iOS and Android. However on Huawai phones (P30 and later) things don't work properly.
No device id is obtained and Push Notifications don't work, even the PushNotifications.addListener('registration', async (token: PushNotificationToken) => {}) is not triggered.
Any ideas on what I need to do so that I can maintain one codebase and make it work on both Android "worlds" (Google & Huawei) ?
Thanks in advance,
Chris
Probably the Ionic plug-ins you used are provided for GMS and Firebase so that their capabilities can be directly called in Ionic. Therefore, apps developed by Ionic must directly call HMS capabilities when Google Play services are unavailable.
You are advised to use HMS Ionic plugin to integrate HMS Push Kit in Ionic App. You can get the Push Plugin from here. Please use 5.0.0 version.
Or you can get it from npmjs here.
Update:
If you look for a way which allows you to use both push notifications in the same application by detecting the device type and acting accordingly, you can use G+H solution. Using the G+H approach, you are able to maintain one codebase and decide whether to use GMS or HMS based on the availability of either one.
From: https://stackoverflow.com/a/63337530/13329100
I've found a lot of guidelines on how to integrate HMS in my apps. But majority of them are different or using android studio. May I know which one is the latest guidelines to integrate HMS in my apps for Unity.
Also, I want to enable In-App-Purchase (subscription) for my apps as well.
Thanks in advance.
UPDATED
Currently I'm trying to implement In-App-Purchase for huawei. Huawei tech said that users need to signIn first before they can use IAP. But I received this error while testing signIn
How to obtain product info ? here
AFAIK you have two main options:
UDP SDK from Unity, which is the Unity official solution to HMS in Unity. However has been under maintenance for some days now.
Unity HMS Plugin from EvilMinds, an open source alternative that is already functional and includes supports to more HMS kits. Looks pretty promising for the future.
In any case you can still manually access HMS Android SDK directly using Unity SDK Android API.
Unity provides the HMS Plugin here: Unity Asset Store > Huawei HMS Core App Services
The README file contains information about development guides, API references. For more technical questions, please submit a ticket with Unity Customer Service.
Currently Unity does not support the In-App-Purchase (subscription) function. It will be planned in the future.
Update:
For the IAP error:
It is a null pointer. Please check for unassigned objects. If you cannot find anything, please delete project and install again cause sometimes these kind of things happening.
After creating private API.AI agent, I can test it using the simulator. But is it possible to test it in Android phones ?
Not yet. But you can use the "Agent Page" under Integration in API.AI to give you a web view you can use from the phone. Easy to share too!
As given in https://docs.api.ai/docs/sdks API.AI has provided support for many platforms and using it we can access our private agent.
i.e as given in https://github.com/api-ai/api-ai-android-sdk#getting_started , I created android app by providing access_token detail of my agent and now I can pass the request via my android phone; similarly i used node.js and can make request to my API.AI agent from Linux PC
You can do this now that Google has pushed the Assistant to the Google Pixel, Nexus 6p, and Nexus 5x. No other phone currently can use the assistant.
Edit 4/17/17: Upon successfully deploying my own agent I was expecting to be able to use it on my phone after being able to test and preview it on my phone. However it was not working so I contacted their support and got the following answer:
Sorry for the inconvenience, but Actions on Google are not currently
supported on any device other than Google home. The functionality you
are referring to was the result of a bug that allowed access across
multiple devices to a subset of users, that bug was patched and that
is why you lost the functionality. Google is planning to make Actions
on Google available across multiple devices, but as per policy, we
don't comment on timelines for releases in support.