Partnering with HMS: A Guide for App Developers is the first book to introduce readers to the Huawei Mobile Services (HMS) ecosystem. It gives developers a fundamental understanding of the ecosystem and how to leverage kit and tool capabilities to make their apps better.
This book is also a quick start guide for kit integration and practical environment setup, detailing the functions and principles behind each kit. By demonstrating how to integrate kits, the authors teach these kits by action: Account Kit, IAP, Push Kit, Location Kit, Map Kit, Site Kit, Safety Detect, and FIDO.
Readers are fully introduced to how they can use HMS open capabilities to develop quality apps, acquire users, and monetize their hard work. In addition, the ecosystem background – the business model and value chain that underpin the entire ecosystem as well as its privacy compliance framework – is crucial to operations and illustrated in this book.
Author(s): Xihai Wang, Yue Wang, Hailiang Wu
Publisher: CRC Press
Year: 2021
Language: English
Pages: 498
City: Boca Raton
Cover
Half Title
Title Page
Copyright Page
Table of Contents
Foreword I
Foreword II
Foreword III
Preface
Acknowledgments
Authors
Chapter 1 Overview of the HMS Ecosystem
1.1 THE RISE OF MOBILE APP ECOSYSTEMS
1.1.1 Development of the Mobile Internet
1.1.2 History of Mobile App Ecosystems
1.1.3 Value Distribution of Mobile App Ecosystems
1.2 THE HISTORY OF THE HMS ECOSYSTEM
1.2.1 Huawei’s Device Business and Cloud Services
1.2.2 Emergence of an HMS Ecosystem
1.2.3 The HMS Ecosystem Today
1.3 HMS ECOSYSTEM ARCHITECTURE
1.3.1 Architecture Behind HMS Open Capabilities
1.3.2 HMS Privacy Compliance Framework
1.4 SUMMARY
NOTES
Chapter 2 HMS Core
2.1 WHAT DOES HMS CORE OFFER?
2.1.1 Develop: Creating Premium Apps Quickly and Cost-Effectively
2.1.1.1 Account Kit
2.1.1.2 FIDO
2.1.1.3 Map Kit, Site Kit, and Location Kit
2.1.1.4 Safety Detect
2.1.2 Grow: Targeting and Engaging with More Users
2.1.3 Monetize: Expanding Your Global Reach with Multiple Channels
2.2 HOW ARE HMS CORE OPEN CAPABILITIES PROVIDED?
2.2.1 HMS Core SDK
2.2.2 RESTful APIs
2.3 HOW ARE INTEGRATIONS AUTHORIZED?
2.3.1 API Key
2.3.1.1 How to Obtain
2.3.1.2 How to Use
2.3.1.3 How to Interact
2.3.2 OAuth Client ID
2.3.2.1 How to Obtain
2.3.2.2 How to Interact
2.3.3 Service Account
2.3.3.1 How to Obtain
2.3.3.2 How to Use
2.3.3.3 How to Interact
NOTE
Chapter 3 Quick Start
3.1 REGISTRATION AND IDENTITY VERIFICATION
3.1.1 Registering an Account
3.1.2 Verifying Your Identity
3.2 SETTING UP A DEVELOPMENT ENVIRONMENT
3.3 CREATING AN APP PROJECT
3.3.1 App Functions
3.3.2 Creating an Android Project
3.3.3 Creating a Keystore File
3.3.4 Configuring Signing in Gradle
3.4 BUILDING THE PET STORE APP
3.4.1 Adding the Home Screen
3.4.2 Adding the Video Playback Function
3.4.3 Adding the Sign-in Function
3.4.4 Adding the Registration Function
3.4.5 Adding the Personal Center
3.4.6 Adding the Settings Function
3.5 SUMMARY
Chapter 4 Account Kit
4.1 ABOUT THE SERVICE
4.2 PREPARATIONS
4.2.1 Becoming a Veriefid Huawei Developer
4.2.2 Creating an App
4.2.3 Generating a Signing Certificate Finger print
4.2.4 Configuring the Signing Certificate Fingerprint
4.2.5 Enabling Account Kit
4.2.6 Integrating the Account SDK
4.3 SIGNING IN WITH A HUAWEI ID
4.3.1 Designing a HUAWEI ID Sign-In Button
4.3.2 Signing In with a HUAWEI ID in ID Token Mode
4.3.2.1 Service Process
4.3.2.2 Coding Practice
4.3.3 Signing In with a HUAWEI ID in Authorization Code Mode
4.3.3.1 Service Process
4.3.3.2 Coding Practice
4.3.4 Silently Signing In with a HUAWEI ID
4.3.4.1 Service Process
4.3.4.2 Coding Practice
4.4 SIGNING OUT FROM A HUAWEI ID
4.4.1 Service Process
4.4.2 Coding Practice
4.5 REVOKING AUTHORIZATION
4.5.1 Service Process
4.5.2 Coding Practice
4.6 AUTOMATICALLY READING AN SMS VERIFICATION CODE
4.6.1 Service Process
4.6.2 Coding Practice
4.7 SUMMARY
NOTES
Chapter 5 In-App Purchases
5.1 ABOUT THE SERVICE
5.2 PREPARATIONS
5.2.1 Enabling IAP
5.2.2 Integrating the IAP SDK
5.3 PRODUCT CREATION IN PMS
5.3.1 Principles Behind PMS
5.3.2 Configuring Products
5.3.2.1 Planning Products
5.3.2.2 Configuring a Consumable
5.3.2.3 Configuring a Non-consumable
5.3.2.4 Configuring a Subscription
5.4 PRODUCT PURCHASE
5.4.1 Checking Whether IAP Is Supported
5.4.2 Obtaining the Product Information
5.4.3 Initiating a Payment
5.4.4 Confirming the Transaction
5.4.5 Redelivering a Product
5.4.5.1 Service Process
5.4.5.2 Coding Practice
5.4.6 Querying Purchased Products and Orders
5.5 PRODUCT USAGE
5.5.1 Subscriptions
5.5.2 Service Provisioning
5.5.3 Subscription Management
5.6 SANDBOX TESTING
5.6.1 Principles Behind Sandbox Testing
5.6.2 Coding Practice
5.7 IAP SERVER CAPABILITY OPENNESS
5.7.1 Service Process
5.7.2 Coding Practice
5.8 SUMMARY
NOTES
Chapter 6 Push Kit
6.1 ABOUT THE SERVICE
6.2 PREPARATIONS
6.2.1 Enabling Push Kit
6.2.2 Integrating the Push SDK
6.3 OBTAINING A PUSH TOKEN
6.3.1 Requesting a Push Token
6.3.2 Receiving the Push Token
6.3.3 Coding Practice
6.3.4 Quick Testing
6.4 SUBSCRIBING TO A TOPIC
6.4.1 Service Process
6.4.2 Coding Practice
6.5 PUSHING MESSAGES IN APPGALLERY CONNECT
6.5.1 Pushing Notification Messages
6.5.2 Pushing Data Messages
6.6 PUSHING MESSAGES VIA THE APP SERVER
6.6.1 Service Process
6.6.2 Coding Practice
6.7 RECEIVING MESSAGE RECEIPTS
6.7.1 Service Process
6.7.2 Coding Practice
6.8 SUMMARY
Chapter 7 Location Kit
7.1 ABOUT THE SERVICE
7.1.1 Fused Location
7.1.2 Activity Identification
7.1.3 Geofence
7.1.4 Geocoding
7.2 PREPARATIONS
7.2.1 Enabling Location Kit
7.2.2 Integrating the Location SDK
7.3 DEVELOPING THE FUSED LOCATION FUNCTION
7.3.1 Configuring Location Permissions
7.3.2 Coding Practice
7.4 DEVELOPING THE MOCK LOCATION FUNCTION
7.4.1 Selecting an App to Use for the Mock Location
7.4.2 Coding Practice
7.5 DEVELOPING THE ACTIVITY IDENTIFICATION FUNCTION
7.5.1 Configuring the Activity Identification Permissions
7.5.2 Coding Practice
7.6 DEVELOPING THE GEOFENCE FUNCTION
7.6.1 Creating a Geofence
7.6.2 Coding Practice
7.7 SUMMARY
NOTE
Chapter 8 Site Kit
8.1 ABOUT THE SERVICE
8.2 PREPARATIONS
8.3 PLACE SEARCH
8.3.1 Keyword Search
8.3.2 Place Search Suggestion
8.3.3 Place Detail Search
8.3.4 Nearby Place Search
8.4 GEOCODING
8.4.1 Forward Geocoding
8.4.2 Reverse Geocoding
8.5 TIME ZONE SEARCH
8.6 SUMMARY
Chapter 9 Map Kit
9.1 ABOUT THE SERVICE
9.2 PREPARATIONS
9.3 CREATING A MAP
9.3.1 Creating a Map Instance
9.3.2 Setting the Map Type
9.3.3 Setting the Padding
9.3.4 Coding Practice
9.4 INTERACTING WITH THE MAP
9.4.1 Map Camera
9.4.2 UI Controls and Gestures
9.4.3 Map Events
9.5 DRAWING ON THE MAP
9.5.1 Markers
9.5.2 Ground Overlay
9.5.3 Shapes
9.5.4 Tile Overlay
9.6 CUSTOMIZING THE MAP STYLE
9.6.1 Use Example
9.6.2 Style Reference
9.6.3 Coding Practice
9.7 PLANNING ROUTES
9.7.1 Overview
9.7.2 Coding Practice
9.8 SUMMARY
Chapter 10 Safety Detect
10.1 ABOUT THE SERVICE
10.2 PREPARATIONS
10.2.1 Enabling Safety Detect
10.2.2 Integrating the Safety Detect SDK
10.3 SYSINTEGRITY
10.3.1 Service Process
10.3.2 Coding Practice
10.4 APPSCHECK
10.4.1 Service Process
10.4.2 Coding Practice
10.5 URLCHECK
10.5.1 Service Process
10.5.2 Coding Practice
10.6 USERCHECK
10.6.1 Service Process
10.6.2 Coding Practice
10.7 SUMMARY
Chapter 11 FIDO
11.1 ABOUT THE SERVICE
11.1.1 Principles Behind FIDO2
11.1.2 Principles Behind BioAuthn
11.2 PREPARATIONS
11.3 FIDO2
11.3.1 Initializing the FIDO2 Client
11.3.2 Initiating the Registration Process
11.3.3 Obtaining the Registration Result
11.3.4 Initiating the Authentication Process
11.3.5 Obtaining the Authentication Result
11.4 BIOAUTHN
11.4.1 Fingerprint Authentication
11.4.2 3D Facial Authentication
11.5 SUMMARY
NOTE
Chapter 12 Testing and Release
12.1 DIGIX LAB TEST SERVICES
12.1.1 Cloud Testing
12.1.1.1 Compatibility Testing
12.1.1.2 Stability Testing
12.1.1.3 Performance Testing
12.1.1.4 Power Consumption Testing
12.1.2 Cloud Debugging
12.1.2.1 Performing Remote Debugging in Real Time
12.1.2.2 Remotely Viewing System Logs
12.1.2.3 Rotating the Screen
12.1.2.4 Viewing Device Details
12.2 APP RELEASE
12.2.1 Signing In and Creating an App
12.2.2 Configuring Basic App Information
12.2.3 Configuring Distribution Information
12.2.4 Submitting the App for Release
12.3 SUMMARY
APPENDIX: HMS ECOSYSTEM CONCEPTS,