Mobile Feedback SDK compliance guide (Harmony)
Laws and regulations, such as the Personal Information Protection Law, the Data Security Law, and the Network Security Law, require app developers to respect and protect the personal information of end users. Developers must not illegally collect or use personal information. This guide helps you meet these requirements and protect the rights of end users when you use the Mobile Feedback software development kit (SDK).
System permissions requested by the Mobile Feedback SDK
Permission | Required | Purpose |
ohos.permission.INTERNET | Yes | Allows the SDK to connect to the internet to provide the feedback service. |
ohos.permission.GET_NETWORK_INFO | Yes | Detects the network status to show the user's network condition in SDK statistics. |
ohos.permission.MICROPHONE | No | Lets users submit feedback. |
ohos.permission.CAMERA | No | Lets users submit feedback. |
Mobile Feedback SDK features and related personal information
Feature | Personal information collected | Purpose of collection | Configuration and example |
Feedback feature (Basic) | Device identification information (phone brand, model, OS version, resolution, manufacturer), and carrier | Provides basic device information for the user who submits feedback. | Basic feature, required information. |
Configuration for optional personal information
Optional personal information field | Purpose of collection | Configuration and example |
Not applicable | Not applicable | Not applicable |
Compliant SDK initialization
// SDK configuration method
public static init(context: Context, config: InitConfig)
// Open the user feedback page
// Ensure the user agrees to the Privacy Policy before you call FeedbackAPI.openFeedback(...).
public static openFeedback(success?: () => void, fail?: (info: string, code?: number) => void)The FeedbackAPI.init(...) method can be called before the user agrees to the Privacy Policy.
Ensure the user agrees to the Privacy Policy before you call the FeedbackAPI.openFeedback(...) method.
Code example
const config: InitConfig = new InitConfig({
appkey: '', // Enter your own appKey
appSecret: '', // Enter your own appSecret
backIconResource: $r('app.media.app_logo'), // Back icon
loadProgressColor: '#0dd0ff', // Progress bar color
isOpenLog: true, // Specifies whether to enable logging
rightButtonFontSize: 16 // Font size for historical feedback
})
FeedbackAPI.init(getContext(), config)
// Ensure the user reads your Privacy Policy and grants authorization before you call the FeedbackAPI.openFeedback(...) method.
FeedbackAPI.openFeedback(() => {
// Callback for successfully opening Mobile Feedback
}, (info, code) => {
// Callback for failing to open Mobile Feedback
})