Questions tagged [huawei-mobile-services]

Use this tag for programming questions relating to HMS Core. HMS Core is an assortment of open device and cloud capabilities provided by Huawei Mobile Services (HMS). Noteworthy capabilities include: Account Kit, In-App Purchases (IAP), Push Kit, Game Service, Location Kit, Map Kit, Ads Kit, and ML Kit.

Filter by
Sorted by
Tagged with
178 votes
9 answers
90k views

Huawei, logcat not showing the log for my app?

OK, logcat is showing system logs but it is not showing application log on my Huawei Ascend. If I switch to another device such as my Galaxy Nexus or Nexus 7 then for the same app (same APK even) log ...
William's user avatar
  • 20.2k
142 votes
7 answers
79k views

"Protected Apps" setting on Huawei phones, and how to handle it

I have a Huawei P8 with Android 5.0 that I'm using for testing an app. The app needs to be running in the background, as it tracks BLE regions. I've discovered that Huawei has built in a "feature" ...
jaseelder's user avatar
  • 3,403
72 votes
6 answers
24k views

Have both GMS and HMS in the project

How does one go about having both Google Mobile Services and Huawei Mobile Services in the app? Being that Huawei have lost the license over GMS, it seems we need to replace all the GMS services used ...
AndreiBogdan's user avatar
  • 10.9k
47 votes
4 answers
71k views

How to create Huawei Android Emulator

I'm developing an Android app using Huawei's Push service. I have installed DevEco IDE plugin within Android Studio. But I don't have any Huawei device to test. So my question is that there is any ...
Android Geek's user avatar
42 votes
4 answers
8k views

FileProvider getUriForFile() error on Huawei devices

I have an exception that happens only on Huawei devices in my app when using FileProvider.getUriForFile: Exception: java.lang.IllegalArgumentException: Failed to find configured root that contains /...
guillaume-tgl's user avatar
41 votes
5 answers
12k views

Could not get unknown property 'manifestOutputDirectory'

I'm trying to "make project" with Android Studio, and I'm getting this error: Execution failed for task ':myApp:processGoogleDebugManifest'. Could not get unknown property '...
Sergio Viudes's user avatar
38 votes
4 answers
11k views

onTaskRemoved() not getting called in HUAWEI and XIAOMI devices

I've been using onTaskRemoved() method in a Service to detect when an app was removed from device RECENT list by swiping it away. I preform some logging and some other operations that need to take ...
Alon Minski's user avatar
  • 1,571
36 votes
6 answers
11k views

Huawei Mobile Services SDK violation Device and Network Abuse policy

Your app contains content that doesn’t comply with the Device and Network Abuse policy. We found your app is using a non-compliant version of Huawei Mobile Services SDK which contains code to download ...
VIISHRUT MAVANII's user avatar
35 votes
11 answers
15k views

How to open the Huawei AppGallery directly?

I know that is possible to open my app (based on package name) in Google Play Store, but how to do same in Huawei AppGallery?
Michalsx's user avatar
  • 3,466
33 votes
6 answers
7k views

System.currentTimeMillis() returns incorrect timestamp on Huawei

The issue is that System.currentTimeMillis() returns the wrong milliseconds with different ranges of time mainly within the future sometimes up to 6 months, but it varies from a few seconds to months. ...
Arlind Hajredinaj's user avatar
31 votes
9 answers
7k views

Huawei device killing my foreground service, even with dontkillmyapp.com's solution

I'm developing an app which is basically a location tracking software. When you start it, it saves locations and sending them to a server. The code is working for like 5 years now without any ...
Adam Varhegyi's user avatar
30 votes
4 answers
8k views

Google denied update due Remediation for Implicit PendingIntent Vulnerability

When i'm trying to update my app - i got error during review process. Remediation for Implicit PendingIntent Vulnerability - https://support.google.com/faqs/answer/10437428. In my app there is on ...
Евгений Кравцов's user avatar
22 votes
4 answers
18k views

Can a Flutter app be proposed on the Huawei AppGallery?

Some Huawei mobile devices don't have the Google Play Store and have the Huawei AppGallery instead. Since Flutter is for cross-platform development (iOS and Android), it may be desirable to propose ...
luvzfootball's user avatar
22 votes
1 answer
6k views

java.lang.IllegalArgumentException: register too many Broadcast Receivers

I'm getting an java.lang.IllegalArgumentException with the following message regist too many Broadcast Receivers (yes, the message says regist and not register) when trying to get the latest ...
Muzikant's user avatar
  • 8,070
20 votes
3 answers
11k views

Will react native work without Google Services on Huawei phone?

Soon new Huawei phones will stop supporting Google Play and Google Mobile Services. Huawei is preparing its own ecosystem called HMS https://developer.huawei.com/consumer/en/service/hms/developer....
Maciej Sawicki's user avatar
19 votes
4 answers
12k views

Firebase Remote Config/Realtime database on Huawei devices

Are all of the Firebase services for Android unable to work on Huawei or is it just the cloud messaging service that does not work? Do all of the firebase services rely on Google Play Services?
dephinera's user avatar
  • 3,703
19 votes
2 answers
4k views

"Source code does not match the bytecode" for system files on Huawei

We are debugging an issue with one of our apps which affects only Huawei devices. To debug it, we purchased P20 Lite ANE-LX1. We've placed some breakpoints in our code and are investigating the full ...
Andriy Gordiychuk's user avatar
17 votes
3 answers
9k views

Is it possible to read data from TOF (time-of-flight) sensor on Android?

Recent models of Android phones (Honor View 20, Huawei P30 Pro, Samsung Galaxy 10 5g) have TOF (time-of-flight) sensor. Is it possible to read it through some API or manufacturer SDK?
Alexander Ponomarev's user avatar
14 votes
4 answers
21k views

MemoryLeakMonitor.jar is not exist! | Huawei Phone

It maybe cause by the ARM GPUs in Huawei Phones, according to this article ARM GPUs in Huawei phone. And it doesn't happen when i try to run the app in another phone (Pixel API 27 in Android Studio)....
MinRam's user avatar
  • 153
13 votes
1 answer
359 views

Prevent jquery-mobile popup repositions for Huawei phones after text is entered to an input element

in our project we are utilizing the jquery-mobile popup dialog Once the dialog is shown, the first time I attempt to fill in the text on my phone (Huawei P9 lite, Android 6.0.0, Chrome 55.0.2883.91), ...
Igor L.'s user avatar
  • 3,189
13 votes
3 answers
467 views

Android withText option does not work for action bar buttons on Huawei MediaPad (T1-A21L)

The buttons on the action bar on this tablet, if shown with text, suffer from text warping as in the screenshot below: I tried many possible settings combinations (ifRoom, always, withText,...). Even ...
mido's user avatar
  • 583
11 votes
4 answers
12k views

I can't get Firebase token from Huawei p40 series device

I usually get the token with this method, but with the arrival of the huawei p40 series I can't get the token with those FirebaseInstanceId.getInstance().getInstanceId().addOnSuccessListener( this, ...
Axel López's user avatar
11 votes
3 answers
5k views

Is there any effective way to test an app for the Huawei Store using Android Studio emulator?

I would like to know if there is any effective way to test an app for Huawei Store using an Android Studio emulator. I tried disabling the Google Play Services, but for some reason Retrofit requests ...
Augusto Carmo's user avatar
11 votes
6 answers
8k views

How to access payload of HMS push notifications?

I have published an Android app on Huawei AppGallery and am able to send push notifications from my app backend server via HMS Push Service to the mobile phone as described below. However, I wonder ...
Alexander Farber's user avatar
11 votes
1 answer
6k views

How to deal with Huawei's and Xiaomi's "battery optimizations"

I have an app that listens for notifications via NotificationListenerService. My app survives both the Doze mode and app stand by on almost any phone (if properly set-up e.g. exception or a foreground ...
shelll's user avatar
  • 3,244
11 votes
1 answer
456 views

How to keep playback active after the screen is turned off

I have an app with audio playback, but on some devices (mainly Huawei, Samsung, Sony) playback is stopped when the screen goes off. Note: playback does not stop for some other apps like Spotify, Play ...
majov's user avatar
  • 545
11 votes
3 answers
4k views

Foreground Service killed on Huawei (GRA-UL00) - Protected Apps Enabled

My foreground sticky service is killed after a few hours without being restarted. I know this has been asked a couple of times, and I have read and verified all the checks on my device. Its important ...
Qin Zhengquan's user avatar
10 votes
8 answers
28k views

Android Studio 3.0 doesn't want to show my connected Huawei P10

I've been trying since hours to connect my Huawei P10, Android 8.0.0 with my Android Studio 3.0. But it doesn't work. It won't get shown either in adb devices -l and not in the Android Studio Select ...
smaxxx's user avatar
  • 139
10 votes
2 answers
2k views

Huawei AppGallery Connect API - 403 client token authorization fail

I am trying to automate the app publishing process to the Huawei store using the REST APIs as mentioned in the link. https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/...
Ponsuyambu's user avatar
  • 7,906
10 votes
5 answers
11k views

Why can't I get pushToken by using Huawei Push Kit?

I am using following code snippet, however I still can't get the pushToken. private void obtainToken() { // get token new Thread() { @Override public void run() { ...
Irene Li's user avatar
  • 101
10 votes
3 answers
3k views

Can same application use for Huawei AppGallery without any changes?

We received news from Google, that play store will no longer sho win Huawei. Huawei has come up with another store called AppGallery . The question is, can same apk upload to Huawei AppGallery and ...
HelmiB's user avatar
  • 12.3k
10 votes
1 answer
1k views

Huawei P9 lite fingerprint support

Do you know if Huawei P9 lite does support Fingerprint? Is it possible to use Android 6.0 Fingerprint API or is it supported through some custom proprietary API (Huawei SDK)? We are evaluating to buy ...
systempuntoout's user avatar
9 votes
2 answers
2k views

Conflict with Huawei HMS plugin in android with gradle 7.0.0

I'm getting this error with Gradle 7.0 while it was working fine for 6.8.3 agcp-gradle-7-error AGCPlugin FAILURE: Build failed with an exception. What went wrong: A problem was found with the ...
Moataz Mohamed's user avatar
9 votes
2 answers
4k views

Which hybrid apps does Huawei Mobile Services support?

Is anyone aware if there exists/are plans to enable deployment for JavaScript/hybrid apps on Huawei Mobile Services (HMS)? Similarly as we can do it using Cordova/Capacitor with Ionic/NativeScript/...
Daniel Danielecki's user avatar
9 votes
2 answers
1k views

Huawei EMUI 8 Oreo - Notification Channel - Tone

Some users are reporting on Huawei EMUI 8.0 Oreo that the Notification Channel does not have the option to change tone "Sound" / "Notification Tone" from the app! As of the official docs the ...
chrisonline's user avatar
  • 6,969
9 votes
2 answers
3k views

Huawei push kit: Token returns empty on Huawei phone

I recently tried my app on a Huawei phone. The problem is PushKit does not return a token and getToken result is empty. In the log I get GetTokenTask receive a empty token, please check ...
Mahdi-Malv's user avatar
  • 16.8k
8 votes
4 answers
27k views

Sending and receiving SMS by command line with Huawei E3131 and HiLink on a debian system

I long time searched the internet for a guide how to send sms by command line with Huawei E3131 and HiLink on a debian based linux system. All of them not worked. It seems, that there was an update on ...
Peters's user avatar
  • 381
8 votes
2 answers
5k views

Battery optimizations (wakelocks) on Huawei EMUI 4.0+

Good day, situation: I'm developing Android application that serve as sport tracker/navigation app - so it require permanent connection to GPS and also permanent awake device. Recording is done every ...
Menion Asamm's user avatar
8 votes
1 answer
6k views

Huawei Push Kit - com.huawei.hms.common.ApiException: 6003: certificate fingerprint error

I received a "push token failed, com.huawei.hms.common.ApiException: 6003: certificate fingerprint error." I don't know what's going on here.
Zinna's user avatar
  • 1,967
8 votes
3 answers
7k views

Could not find com.huawei.agconnect:agcp:1.0.0.300

Could not find com.huawei.agconnect:agcp:1.0.0.300. Searched in the following locations: - https://jcenter.bintray.com/com/huawei/agconnect/agcp/1.0.0.300/agcp-1.0.0.300.pom - https://jcenter....
Lokesh Tiwari's user avatar
8 votes
3 answers
2k views

HmsMessageService onMessageReceived not called

I implemented Huawei Push Kit. onNewToken is called after app started. I want to use onMessageReceived. When I send push notification to client, push notification appears on android but ...
adenizc's user avatar
  • 421
8 votes
5 answers
4k views

Unable to start android app due to LogCollectManager.getUserType() error

When I try to run my application on Huawei P9 I’m getting the error Attempt to invoke virtual method 'int com.huawei.lcagent.client.LogCollectManager.getUserType()' on a null object reference ...
harazination's user avatar
8 votes
2 answers
3k views

Is Huawei HMS tolerated on Google Play Store?

I have an app with the usual Google ad and in-app-payment stuff. It's accepted into the Play Store all right. Now I'd like to make it support both GMS and HMS at the same time (based on the ...
Gábor's user avatar
  • 9,496
8 votes
5 answers
4k views

Huawei HMS Maps Android Codelab not working

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 ...
Javier Delgado's user avatar
7 votes
5 answers
7k views

com.huawei.agconnect plugin not found

So I'm trying to add AppGallery connect gradle plugin to my android project using new Kotlin DSL syntax. But I'm getting error like this: org.gradle.internal.exceptions.LocationAwareException: Build ...
Jimly Asshiddiqy's user avatar
7 votes
2 answers
4k views

Programmatically check if android device has Google Play?

Currently there are some devices that doesn't have Google Play (Huawei Devices), is there a way for me to check programmatically if the device doesn't have one? I wanted to use the in-app-update ...
Mike's user avatar
  • 1,323
7 votes
3 answers
3k views

How to detect huawei device models from other android models in flutter?

As my application is cross platform, there is not any problem to encounter, but when it comes to android, some issues appear such that Huawei mobile devices don't have ability to access google play ...
Muhamad Haydar Jawad's user avatar
7 votes
2 answers
15k views

How do I set up udev rules for debugging a physical android device with Android Studio?

In the past I've never had to set this up, but I updated Android Studio to version 2.3.1 today and got this error when clicking debug: 05/03 17:19:19: Launching app $ adb push app-debug.apk {path on ...
PoisonRain's user avatar
7 votes
1 answer
2k views

Different module file by flavor

I'm trying to implement play services and huawei services in the same app, but want to be able to configure which one to use by flavor. Each flavor uses it's own applicationIdSuffix. So for each ...
SMGhost's user avatar
  • 3,885
7 votes
3 answers
4k views

Is it possible to identify from the user-agent if a Huawei device is NOT supporting google services?

I would like to check in my Google Analytics how big a proportion of my user base is using Huawei devices which are no longer using google services but instead using App Gallery etc. I was wondering ...
Niels Kristian's user avatar

1
2 3 4 5
28