HarmonyOS SDK Adds In-App Permission Re-Request Dialog for Seamless Re-Authorization
HarmonyOS SDK introduces requestPermissionOnSetting() API to display a half-modal permission settings dialog directly in-app after user denial, replacing 5–7 step system settings navigation with a one-tap flow that takes ~8 lines of code and boosts authorization conversion and retention.
Problem: Permission Re-authorization Friction
When a user denies a permission request (e.g., location, microphone, camera), the app cannot re-prompt via the same API. The user must manually navigate through system settings — a 5–7 step process — often failing to find the entry. This causes feature unavailability, user churn, and low authorization conversion.
Solution: Half-Modal Permission Settings Dialog via Ability Kit
HarmonyOS SDK's Ability Kit (程序框架服务) introduces requestPermissionOnSetting() to launch an in-app permission settings dialog directly. Previously, requestPermissionsFromUser() could not be called again after a denial.
Architecture
The entire authorization interaction is built on Ability Kit, the foundational framework for HarmonyOS app development. Beyond lifecycle management and component scheduling, Ability Kit carries full-process permission control.
Key Advantages
Eliminates the tedious permission modification chain – discards multi-level system settings jumps, replacing the traditional 5–7 step operation and solving hidden settings and missing guidance.
Convenient interaction without leaving the app – the permission settings dialog appears in-app, completes setup in one tap, requires no app exit or restart, letting users quickly resume feature use and helping developers improve in-app retention.
Lightweight code for rapid adaptation – taking location permission as an example, developers need only about 8 lines of code to integrate the enhanced experience.
Applicability
Applies to user_grant type permissions.
Development Guide
Reference:
https://developer.huawei.com/consumer/cn/doc/harmonyos-guides/one-time-authorizationSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
HarmonyOS Developer Technology
HarmonyOS developers provide key technology analysis, version updates, Codelabs practice, and event information for HarmonyOS. Welcome developers to join the HarmonyOS ecosystem and create infinite possibilities together!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
