New Feature in Account Kit: Common SMS Verification Code Reading - Huawei Developers

Currently, many apps in e-commerce, finance, social networking, and other fields, primarily use account + SMS verification codes to verify the user's identity. This is because SMS verification is easy to use, secure, and cost-effective, which makes it broadly applicable for user registration, login, and mobile number linking.
In general, the user needs to take at least five steps to complete SMS verification: exit the current app, access the received message, copy or remember the verification code, re-open the app, and then paste or enter the verification code.
Fortunately, there's Account Kit, which endows your app with the ability to automatically read an SMS verification code, dramatically streamlining the verification process for countless numbers of users. If your app requires the user to enter a mobile number, and have their identify verified via an SMS verification code, you can integrate the ReadSmsManager API of Account Kit to ensure that your app will automatically read any SMS verification code, and bring its users a better experience.
Account Kit provides two distinct SMS verification code reading capabilities.
In addition to the capability of automatically reading an SMS verification code without the user's authorization, Account Kit 5.0.5 enables an app to automatically read an SMS verification code after obtaining the user's authorization.
This new capability helps ensure that the automatic SMS verification code reading function is available, even if your app has strict requirements for the SMS template, which cannot be modified randomly. For example, for some finance apps, if the SMS template is fixed and unable to be modified, an additional identifier for automatically reading the SMS verification code cannot be added to the app. In this case, the new capability can be applied, to ensure that the app will automatically read an SMS verification code after obtaining the user's authorization.
In which scenarios can we apply these two capabilities?
1. Automatically reading an SMS verification code without the user's authorization.
Applicable scenarios
There are no relevant requirements for the SMS template, which can be modified and added with additional identifiers.
Steps (With user login as an example.)
Tap Get code on the screen > Receive the sent SMS message > Verification code will automatically fill in > Tap LOG IN.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Pro: Fewer operations are required for a better user experience.
Con: The SMS template needs to be modified.
2. Automatically reading an SMS verification code after obtaining the user's authorization.
Applicable scenarios
There are certain requirements for the SMS template, which prevents it from being modified.
Steps (With user login as an example.)
Tap Get code on the screen > A popup for user authorization will display > Tap ALLOW > Verification code will automatically fill in > Tap LOG IN.
Pro: The SMS template does not need to be modified.
Con: Users need to grant the app permission to read SMS verification codes.
How can I integrate these capabilities?
For details about the integration process, please visit our official website by clicking
Automatically Reading an SMS Verification Code Without User Authorization
Automatically Reading an SMS Verification Code After User Authorization
Other Highlights in Account Kit
Effortless login: One-click login and authorization for all usage scenarios, which helps reduce the user churn rate.
Global presence: Over 360 million monthly active users in more than 190 countries and regions, with support for 70+ different languages.
Privacy safeguards: Requires both the account information and verification code, which complies with the EU GDPR standards for user privacy and security.
For more information about Account Kit, please visit our official website.

Is there any way to detect country code while entering phone number for authentication?

This is interesting.

Freemind R said:
Currently, many apps in e-commerce, finance, social networking, and other fields, primarily use account + SMS verification codes to verify the user's identity. This is because SMS verification is easy to use, secure, and cost-effective, which makes it broadly applicable for user registration, login, and mobile number linking.
In general, the user needs to take at least five steps to complete SMS verification: exit the current app, access the received message, copy or remember the verification code, re-open the app, and then paste or enter the verification code.
Fortunately, there's Account Kit, which endows your app with the ability to automatically read an SMS verification code, dramatically streamlining the verification process for countless numbers of users. If your app requires the user to enter a mobile number, and have their identify verified via an SMS verification code, you can integrate the ReadSmsManager API of Account Kit to ensure that your app will automatically read any SMS verification code, and bring its users a better experience.
Account Kit provides two distinct SMS verification code reading capabilities.
In addition to the capability of automatically reading an SMS verification code without the user's authorization, Account Kit 5.0.5 enables an app to automatically read an SMS verification code after obtaining the user's authorization.
This new capability helps ensure that the automatic SMS verification code reading function is available, even if your app has strict requirements for the SMS template, which cannot be modified randomly. For example, for some finance apps, if the SMS template is fixed and unable to be modified, an additional identifier for automatically reading the SMS verification code cannot be added to the app. In this case, the new capability can be applied, to ensure that the app will automatically read an SMS verification code after obtaining the user's authorization.
In which scenarios can we apply these two capabilities?
1. Automatically reading an SMS verification code without the user's authorization.
Applicable scenarios
There are no relevant requirements for the SMS template, which can be modified and added with additional identifiers.
Steps (With user login as an example.)
Tap Get code on the screen > Receive the sent SMS message > Verification code will automatically fill in > Tap LOG IN.
Pro: Fewer operations are required for a better user experience.
Con: The SMS template needs to be modified.
2. Automatically reading an SMS verification code after obtaining the user's authorization.
Applicable scenarios
There are certain requirements for the SMS template, which prevents it from being modified.
Steps (With user login as an example.)
Tap Get code on the screen > A popup for user authorization will display > Tap ALLOW > Verification code will automatically fill in > Tap LOG IN.
Pro: The SMS template does not need to be modified.
Con: Users need to grant the app permission to read SMS verification codes.
How can I integrate these capabilities?
For details about the integration process, please visit our official website by clicking
Automatically Reading an SMS Verification Code Without User Authorization
Automatically Reading an SMS Verification Code After User Authorization
Other Highlights in Account Kit
Effortless login: One-click login and authorization for all usage scenarios, which helps reduce the user churn rate.
Global presence: Over 360 million monthly active users in more than 190 countries and regions, with support for 70+ different languages.
Privacy safeguards: Requires both the account information and verification code, which complies with the EU GDPR standards for user privacy and security.
For more information about Account Kit, please visit our official website.
Click to expand...
Click to collapse
Is there any why to detect phone number automatically

Does it support automatic Code detection?

does it charge for any subscription?

Thanks for sharing!!

Related

AppGallery Connect 10.5 | Build Apps with Ease, and Operate Them As You Please

This article is from HUAWEI Developer Forum which you can obtain latest news about Huawei products
Forum link: https://forums.developer.huawei.com/forumPortal/en/home
​
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
AppGallery Connect is a one-stop open service platform for the entire app lifecycle, designed to facilitate enhanced, and accelerated app building and running, giving you a leg up on the competition. AppGallery Connect 10.5, the platform's latest version, provides for a wholly optimized user experience, including a home page with futuristic visual effects, cross-platform app management capabilities, and access to a broad array of services, such as App Messaging, Cloud Storage, and Auth Service. These updates give you the tools to better build and operate your apps.
Brand-new home page
The home page has assumed a fresh new, user-friendly layout. The My projects entry enables you to manage apps of different platforms; Hot services provides a glimpse at trending services, and More services displays a brief overview of all available services. Service cards also provide direct access to corresponding services, sparing you the hassle of having to search for a desired service, and find it from a lengthy list.
Visit https://developer.huawei.com/consumer/cn/service/josp/agc/index.html to try out the new version now. You'll notice that AppGallery Connect has designed a unique icon for each service, making it easier than ever to identity them.
App Messaging
This service provides invaluable assistance for refined operations, by sending contextual messages to active users when specific events are triggered, boosting user engagement and stickiness. In-app messages can work in tandem with your app's activities. For instance, if you have a shopping app, it can display a message instructing the user to claim coupons upon repeated taps on an item by a user when authorized or after message subscription by the user. Or if you have a reading app, the app can automatically display messages to intensive users who have read for more than half an hour in a single session, offering a 20% discount off of subscriptions. These types of messages can successfully boost your app's conversion rate.
You have the option of using a pre-set style, or customizing the display of your in-app messages. Image messages are recommended if the content in the message is relatively simple.
Banner messages contain a thumbnail, with the message title and body, and are displayed at the top of the screen. Users only need to tap on the banner message to be directed to the corresponding page.
Pop-up messages are recommended for richer, and more complex content, as they consist of an image, title, and body, as well as up to two buttons. Examples of each message type are shown below:
Cloud Storage
Cloud Storage incorporates a treasure trove of premium storage, upload, and download functions for a wide range of different objects, including images, videos, and audio files. The Cloud Storage capability is bolstered by the following attributes:
1. Airtight protections, enabled by declarative security and automatic encryption mechanisms;
2. High degree of stability, thanks to the implementation of resumable transfer and intelligent network acceleration;
3. Autoscaling, to provide for automatic resource scheduling and enterprise-level storage.
These characteristics allow for you to focus single-mindedly on improving the quality and user experience within your app – reserving all of the hassles associated with developing, deploying, maintaining, and expanding capacity for storage servers, or monitoring server indicators to ensure availability, reliability, and durability – for AppGallery Connect.
Enhanced Auth Service
Building a user authentication system is both challenging and costly.
Auth Service makes the construction of a secure and reliable user authentication system, a hassle-free and cost-effective process. Authentication capabilities are provided as services, meaning that you can assemble all of the services you need in code for your app, with minimal O&M work.
The new and improved Auth Service supports a wider range of authentication modes, including mobile numbers, email accounts, and Apple IDs, and can be integrated into iOS apps. If you opt to integrate Auth Service before August 1st, 2020 , You will be eligible to receive the following benefits:
1. 30,000 free SMS verification messages every month
2. Dedicated technical support during service integration
3. An opportunity for broad-based exposure, as a successful case study
The free quota of SMS verification messages applies only to the mobile number + verification code authentication mode. If you are interested, please send your information in the following format to [email protected]: [Company name + App ID].
AppGallery Connect also comes with a version history management function, which allows you to query and download the app versions you had previously developed, as well as an interaction center that provides for direct communication with the platform. We think that you'll agree that AppGallery Connect 10.5 is chock-full of surprises. Just sign in to explore a pioneering new version for app development!
You can also click the link below, to learn more about Auth Service, Billing, Version history, Interaction center, and other services.
https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-introduction

[AppsUP] Frequently Asked Questions About Huawei Account Kit

Hi, everyone
The AppsUP contest has already been online, which involves developers from five regions. Believe many developers are eager to search some references. Here I select some excellent integration cases for Account Kit. Hope this can benefit you.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Q: In the SDK, I see it in the ReadSmsConstant class
READ_SMS_BROADCAST_ACTION value is "com. Huawei. HMS. Auth. API. Phone. SMS_RETRIEVED",
But the Client APIS, I see is the description of the READ_SMS_BROADCAST_ACTION value is ". com.huawei.hms.support.sms.com mon SMS_RETRIEVED"
These two are not the same,Which value do I need to set?
A: This is to be used in the SDK.
ReadSmsConstant.READ_SMS_BROADCAST_ACTION
Or com.huawei.hms.auth.api.phone.SMS_RETRIEVED”
Q: I can't get the gender information in the AccountKit,What shall I do?
A: Gender access is not yet supported
Q: Is there a line break between XXXXXX indicates the verification code and hash_value indicates
A: Yes, there must be a new line.
Q: If a user signs in to a game with a HUAWEI ID, will the game server save the HUAWEI ID data?
A: The game app will obtain and save information authorized by the user, such as the avatar and nickname, but cannot obtain other account information.
Q: If a user downloads and installs HMS Core on an OPPO phone, can the user use the HUAWEI ID to sign in to the game on the phone?
A: Yes. HUAWEI Account Kit can be used on a non-Huawei Android mobile phone. Also reference to the table of limitations
https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/emui_version_dependent_features
Q: When I run debug in 'yarn android' this login is run normally but when I build an Apk file this function is display like my video
A: The Keystore to upload is not matching with old Keystore in the Application
Q: What are the application scenarios of silent sign-in? Are there any non-Huawei apps that use silent sign-in?
A: Silent sign-in is provided to benchmark against the corresponding capability provided by GMS. Therefore, their application scenarios are the same, including but not limited to the following:
(1) In the case of authorized sign-in of a user, a developer can update the validity period of the authorization information a period later.
(2) A developer can check whether a user has signed in and been authorized.
Apps that use silent sign-in in Google Play include:
HK01, YouSee Musik, My Beeline v4.8.1, and RTA Smart Drive
Q: Can a HUAWEI ID and a Google account be used in the same APK?
A: Yes, they can be used. Huawei ID and Google ID can be used as login mechanisms in an apk. However, if account interoperation is required, the function of binding both accounts need to be implemented for the app.
Q: Integration Account Kit,Signin after successful signout, does not prompt for login credentials to be entered
A: This is not a issue. Action and Result of SignOut : The HUAWEI Account SDK deletes the HUAWEI ID sign-in information of the user and sends the sign-out result to the app.
Refer: https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/account-guide-v4#h1-3-signing-out-from-huawei-id
After SingOut is invoked, the Huawei ID on the device is still in the login state, as the App has been authorized, so it is a normal case that subsequent signin is not prompting for login credentials.
You can try below scenarios:
Log out Huawei ID on the device from Account Center (Setting ->Account Center -> LOG OUT)
Revoke Huawei ID Authorization (Settings -> Account Center -> Privacy Center -> Control account access -> Select your App and "Cancel Authorization")
Q: How can data of a HUAWEI ID be stored across areas? How can data privacy be protected?
A: HUAWEI ID data is stored in the user's home area selected during user registration. A dedicated privacy team has been set up to review the privacy protection status of each business.
Q: Can the developer replace the Google Play SDK package with HMS SDK package at one click as explained?
A: The function names are the same, but the class names may be different. After correcting the class names, the package can be replaced and imported at one click.
Q: How is HUAWEI Account Kit used on iOS? Does HUAWEI Account Kit support facial recognition?
A: Currently, the HUAWEI Account Kit solution for iOS is not provided externally. In addition, facial recognition is not supported.
Q: Does the Account Management Interface consider integrated subscription functionality?
A: Huawei Account Management Interface also has this function. See “Settings->Huawei Account->Payments and Bills->Subscriptions”. Users can view and cancel subscriptions.
Q: Can a developer with their own account management system use HUAWEI Account Kit?
A: Yes. Many apps allow sign-in through third-party accounts.
Q: Does the Account Management Interface consider integrated subscription functionality?
A: Huawei Account Management Interface also has this function. See “Settings->Huawei Account->Payments and Bills->Subscriptions”. Users can view and cancel subscriptions
About the new frequently asked questions by developers, I will update here regularly.
Or you can directly ask your question in HUAWEI Developer Forum.

Comprehensive Analysis | Application Scenarios and Business Values of Keyring

Nowadays, it's common for an app developer to develop multiple apps across different platforms. However, an issue that arises is that when signing in to different apps or the same app across different platforms on the same device, users usually needs to repeatedly enter their account name and password even if the same account is used, which has a negative impact on user experience. HMS Core Keyring can help developers solve this problem effectively.
Keyring Capabilities​Keyring provides developers with the ability to manage user credentials throughout the credential lifecycle, including obtaining, encrypting, storing, authorizing, sharing, querying, accessing, and deleting credentials. These capabilities help developers provide a smooth sign-in experience for their users.
Encrypted storage on user devices
Keyring encrypts user credentials using a randomly generated key in the Trusted Execution Environment (TEE). The key varies depending on the device and can only be used in the TEE. Huawei does not have access to the content of the key. All these measures ensure that user credentials are securely stored on user devices. When storing credentials, developers can also choose to require the user to provide biometric information or enter their lock screen password when an app tries to access the stored credentials.
Credential sharing
Keyring allows users to share their credentials across different Android apps, quick apps, and web apps made by the same developer. When a user signs in to an app, the app searches for available credentials in Keyring. The available credentials may be stored by the app or shared by other apps with the app.
Data security
To ensure data security, Keyring can verify the identity of an Android app by its APK name, verify the identity of a quick app by its package name and certificate hash value, and verify the identity of a web app by its URL, thus effectively preventing user credentials from being stolen by spoof apps and ensuring the security of credential sharing.
Credential deletion and update
Keyring provides developers with APIs for deleting and updating credentials. After the user signs out of an app account, the account credential will be deleted from Keyring.
Privacy Experience​As for privacy, Keyring complies with various privacy policies and ensures that user experience is not affected.
Firstly, Keyring only stores and shares users' credentials on their devices, and does not upload the credentials to the Huawei cloud server. Therefore, users are the sole data controller of their credentials. Huawei will not actively perform any actions that affect the security of user credentials, such as modifying or deleting them. Secondly, Keyring's privacy statement has been incorporated into the Statement About HMS Core and Privacy. Therefore, your app does not need to separately notify users about Keyring's privacy policies. You can visit our official website to view success stories from developers who have used Keyring to provide users with an excellent cross-app and cross-platform sign-in experience.
Application Scenarios​Cross-Platform Sign-In
Developers are increasingly releasing their apps on various different platforms. However, when users use an app on a different platform, they find themselves having to enter their sign-in information each time they want to sign in. Keyring provides apps on different platforms with corresponding APIs, including the Keyring SDK, quick app APIs, and web APIs, thus supporting credential sharing between apps across different platforms.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
​
Take a shopping app as an example. Sending promotional messages to users during special events and national holidays is one of the most common marketing strategies and is also popular with users. A user signs in to the Android version of the shopping app and then receives a promotional message for a particular product. The user then taps the link in the message to open the web version of the app in HUAWEI Browser. Keyring automatically signs the user in, after which the user is free to start shopping.
Cross-App Sign-In
As developers mature and grow, most will end up developing multiple apps. However, it's not easy to acquire users for a new app. Once a developer releases a new app, Keyring serves as a bridge that efficiently connects users of the developer's existing apps to the new app. Thanks to this, users can seamlessly sign in to the new app with a single tap, without having to re-enter their account names and passwords.
Put simply, when a user signs in to existing app A and then installs new app B made by the same developer, the user can directly sign in to app B using the credentials saved by app A, without needing to enter their account name and password again.
Account Change
Keyring can store multiple credentials from the same user in an app. The app can provide a confirmation screen so that users can choose which account to sign in with, facilitating account change. In addition, developers can ask users to provide their biometric information or enter their lock screen passwords before they sign in, which effectively prevents security risks such as account spoofing.
Business Values​Keyring's cross-app sign-in functionality allows multiple apps made by the same developer to share users with each other, helping developers quickly boost the user base of their app. In addition, Keyring also allows developers to share users between their Android apps, quick apps, and web apps. By creating a seamless sign-in experience across different apps and platforms, Keyring helps developers simplify the sign-in process to shorten the user conversion path and improve the user conversion rate. Put simply, Keyring is a powerful tool that can help developers achieve business success.
Keyring's core features of providing smooth sign-in, data security, and user sharing are ideal for every type of app, whether it be shopping, travel, social media, or reading. In the future, Keyring will continue to add new features to its repertoire as HMS Core expands its security-related capabilities, and provide even more cutting-edge services for developers.
To learn more, please visit:
>> HUAWEI Developers official website
>> Development Guide
>> Reddit to join developer discussions
>> GitHub to download the sample code
>> Stack Overflow to solve integration problems
Follow our official account for the latest HMS Core-related news and updates.

[FAQs] Why can't the HUAWEI IAP payment screen open?

HMS Core In-App Purchases can be easily integrated into apps to provide a high quality in-app payment experience for users. However, some developers may find that the payment screen of In-App Purchases cannot be opened normally. In this article, I will explain possible causes for this and provide solutions.
Scenario 1: In-App Purchases has been enabled on the Manage APIs page in AppGallery Connect, and the created product has taken effect. However, error code 60002 is recorded in logs.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Cause analysis
The payment public key is required for verifying the SHA256WithRSA signature of the In-App Purchases result. However, the developer has not configured a payment public key.
Solution
Check the following items:
(1) In-App Purchases has been enabled on the Manage APIs page. (The setting takes around half an hour to take effect.)
You can visit the official website to see how to enable the service.
(2) The public key switch is toggled on, and the public key is used correctly.
(3) The corresponding product category has been configured on PMS in AppGallery Connect, and has been activated successfully.
Scenario 2: Error 60051 is reported when the developer opens the subscription editing page in the member center.
According to the official website, error code 60051 indicates that a non-consumable product or subscription cannot be purchased repeatedly.
Cause analysis
After a subscription is completed, there is a refresh action when going back to the member center. An error will be reported if the subscription button is tapped again before the refresh occurs. The product can only be successfully subscribed to if the subscription button is tapped after the refresh. This is because if the refresh action is not triggered in time, cached data of the previous subscription will still exist. If another product is subscribed to immediately after a product is subscribed to, the ID of the previously subscribed product will be passed to the system instead of the newest product. As a result, an error is reported and the subscription editing page cannot be displayed due to product ID mismatch.
Solution:
Modify the timing for triggering the refresh action to prevent product subscription from occurring before the refresh.
Scenario 3: Error code 60003 is reported when a Huawei phone is used for payment debugging, but the product ID is correctly configured on PMS.
Cause analysis
Generally, error code 60003 indicates that the product information configured on PMS is incorrect. You can sign in to AppGallery Connect, click the desired app, go to Operate > Product Management > Products, and check that the corresponding product exists and mandatory information (such as the name, ID, price, type, and status of the product) is configured correctly.
In addition, you can check whether the product ID is correctly configured in the client code and consistent with that in AppGallery Connect. In particular, check that the field passed to the client code is correct.
Check whether the service region of the HUAWEI ID signed in on the Huawei phone supports In-App Purchases. To do this, call the Task<IsEnvReadyResult> isEnvReady() method.
Solution
After troubleshooting, the developer finds that the error is reported because the product ID passed to the client code is inconsistent with that in AppGallery Connect. After correcting the product ID in the client code, the issue is resolved.
Scenario 4: The payment screen is opened successfully when the checkout start API is called for the first time. However, after the payment is canceled, the payment screen fails to open when the API is called again.
Cause analysis
After a consumable product is purchased, the product can be purchased again only after the purchased product is consumed. Otherwise, error codes such as 60051 will be reported.
Solution
Redeliver the consumable product.
You need to trigger the redelivery process when:
The app launches.​
Result code -1 (OrderStatusCode.ORDER_STATE_FAILED) is returned for a purchase request.​
Result code 60051 (OrderStatusCode.ORDER_PRODUCT_OWNED) is returned for a purchase request.​
Result code 1 (OrderStatusCode.ORDER_STATE_DEFAULT_CODE) is returned for a purchase request.​
If the refund callback URL configured in the In-App Purchases configuration page is incorrect, reconfigure it correctly. You can click here for details.
In addition to the payment screen opening failure problem, another common problem is how to determine whether the sandbox environment is entered.
Scenario 5: A sandbox account is used for testing but no sandbox environment popup is displayed. How to check whether a sandbox environment is entered?
Cause analysis
Generally, a popup similar to the following will be displayed when the sandbox environment is entered.
The two mandatory conditions of the sandbox environment are met but still no sandbox environment popup is displayed. Does this mean that the sandbox environment is not entered?
The screenshot below shows relevant logs for the isSandboxActivated method.
According to the logs, the two mandatory conditions of the sandbox environment are met, which are:
The currently signed in HUAWEI ID is a sandbox account.
The version code is greater than that of the online version on AppGallery. (The APK has not been released to AppGallery. Therefore, the version code returned by AppGallery is 0.)
Theoretically, the sandbox environment has been entered. Are there other methods to check whether the sandbox environment is entered?
Solution
Check whether the sandbox environment is entered successfully using the following methods:
a) Check the returned purchase data, as shown in the screenshot below.
If the Huawei order ID specified in payOrderId begins with SandBox, the order is generated in the sandbox environment.
b) Check the payment report.
Check whether the payment report contains this order. If not, the order is generated in the sandbox environment. (Note: Data on the payment report is not updated in real time. If the order is placed on the current day, the developer can check the payment report on the next day to ensure accuracy.)
c) Clear the HMS Core (APK) cache.
You can try to clear the HMS Core (APK) cache. The system determines whether to display the sandbox environment popup based on relevant fields, which may not be updated in time due to the cache. You can go to Settings > Apps & services > Apps > HMS Core on the device to clear the cache.
References
In-App Purchases official website
In-App Purchases development guide

[FAQs] Applying for the Health Kit Service

HMS Core Health Kit provides app developers with access to atomic data. By calling its APIs, your app will be able to read and write users' health and activity data, after obtaining users' consent.
However, before your app is officially released, that is, in the development and test phases, a maximum of 100 users may use your app. This limit can be removed by applying for verification from Health Kit. Here I have listed some problems you may encounter during the application, as well as their solutions. I hope you find them helpful.
How long will it take for my application to be reviewed?​Answer: The review takes about 15 workdays, and you will be notified of the result via SMS and email. If your application is rejected, modify your materials according to the feedback, and then submit your application again. The second review will take another 15 workdays. Please make sure you submit the correct materials for the review, to avoid any delays.
I have passed verification, but I can only query the data of a limited number of users. Why?​Answer: Due to data caching, the approved scopes will take some time to take effect. Please wait for 24 hours after you have been verified, and then try again. Make sure that you reserve enough time for the approved scopes to take effect, so that your app can be released as scheduled.
If the problem persists, refer to this Error Code.
The proof that I submitted during the application was rejected. Why?​Answer: When submitting an application for verification, fill in the App Release Checklist, and make sure that the proof you provide meets the criteria specified in the checklist.
Let's look at some common reasons why some forms of proof may be rejected.
App introduction video
Make sure that the video starts when your app is opened, so that Huawei can check whether the app name matches the one provided in the application.
Make sure that the video demonstrates how to perform basic operations, like granting the app authorizations, and accessing user data.
Make sure that the video demonstrates the privacy policy, in which the developer name must be identical to the one provided in the application.
Video demonstrating the user authorization
Make sure that the app name and app icon on the authorization screen are consistent with those provided in the application.
Make sure that the read/write scopes displayed on the authorization screen are consistent with those provided in the application. Please do not apply for scopes you are not going to use in your app.
If you are developing a mobile app, make sure that the authorization screen is properly displayed, that is, the parameter display is set to touch. For details, please refer to Authentication.
Video integrity
Make sure that the video for each check item covers all of the content specified in the checklist's acceptance criteria. A common reason for rejection is that the video does not accurately cover the end-to-end operation process. For example, for check item 3.2 Canceling authorization, the video should begin by showing how the app can access user data properly before authorization is canceled, and then proceed to canceling the authorization. If your video only depicts how authorization is canceled, your application will be rejected.
Data accuracy
Make sure that you provide screenshots showing the data consistency between your app and the Huawei Health app, for each data type. If there is no screenshot provided for a certain data type, this data type will be considered not in use in your app, and will not be approved.
Data timeliness (for REST access only)
If your app accesses Health Kit via REST, make sure that your app allows users to flexibly synchronize data manually, and demonstrate this in the video. Data that is manually synchronized to your app should be consistent with the latest data in the Huawei Health app.
If your app uses the data subscription function of Health Kit, your app should obtain the latest data from Huawei Health in real time, and this process also needs to be shown in the video.
Other documents
Provide other documents as required, for example, countries/regions where your app is to be released, list of scopes (including scopes in the application and the already approved ones), and more.
These are only some of the most common problems that you may encounter during the verification stage. You can check the App Release Checklist after selecting the Health Kit card on HUAWEI Developers for more information.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What should I do if my application was rejected because the logo used was not acceptable?​Answer: Check the HUAWEI Health Guideline and ensure your app complies with these guidelines when using the Huawei Health logo.
Please stay tuned for the latest HUAWEI Developers news and download the latest resources.
As an individual developer, can I apply for formal scopes?​Answer: Individual developers cannot apply for formal scopes by applying for verification. A maximum of 100 users can be invited to use your app. This can only be removed by applying for a new HUAWEI ID, registering as an enterprise developer, and then applying for the Health Kit service.
Please note that advanced user data (such as heart rate, sleep, blood pressure, blood glucose, and SpO2 data) is not open to individual developers. To access advanced user data, create a HUAWEI ID and register as an enterprise developer before applying for access to Health Kit.
References​HMS Core Health Kit
Developer Guide
FAQs About Accessing Health Kit

Categories

Resources