All Products
Search
Document Center

Mobile Platform as a Service:Using the privacy permission dialog

Last Updated:Jan 27, 2026

Regulations require that an app must not call sensitive APIs before a user clicks the Agree button in the privacy policy dialog. To meet this requirement, mPaaS for Android supports this feature in all versions of the 10.1.68 baseline, version 10.1.60.5 and later of the 10.1.60 baseline, and version 10.1.32.16 and later of the 10.1.32 baseline. If your project uses the Framework component, follow the instructions in this document to modify your project.

Usage instructions

Display a privacy permission dialog in your application. After the user agrees, call the framework API to send an Agree broadcast. When the framework receives the broadcast, it completes the initialization and records the user's consent in sharedpreference. After the initialization is complete, the framework notifies your application through a callback. You can use the features of mPaaS components only after you receive this callback.

Procedure

Important

The Activity that displays the privacy dialog must not inherit from the mPaaS BaseActivity. This is because the BaseActivity performs instrumentation for data collection, which would cause the app to collect private data before the user agrees to the privacy policy.

  1. In meta-data, configure the switch for the privacy permission dialog. This feature is disabled by default.

        <meta-data
                 android:name="privacy_switcher"
                 android:value="true"></meta-data>
  2. Use the following API to send the Agree broadcast.

    Note

    Send the broadcast only after the user clicks Agree.

    QuinoxlessPrivacyUtil.sendPrivacyAgreedBroadcast(Context context);
  3. Check if the user has agreed to the privacy permissions.

    Note

    Before calling this API, initialize the mPaaS framework.

     QuinoxlessPrivacyUtil.isUserAgreed(Context context);
  4. Update the user consent flag for privacy permissions. This lets you display the dialog again in specific scenarios.

    QuinoxlessPrivacyUtil.setUserAgreedState(Context context, **boolean **agreed);
  5. The callback is invoked when the framework initialization is complete.

    • If you use QuinoxlessApplicationLike, use mPaaS features after the onMPaaSFrameworkInitFinished callback.

      Note

      You must use QuinoxlessApplicationLike if you need the hotpatching feature.

    • If you do not use QuinoxlessApplicationLike, use mPaaS features after the onPostInit method in the IInitCallback callback.

      QuinoxlessFramework.setup(this, new IInitCallback() 
      {
      @Override
        public void onPostInit() 
      {
      
      }
      });
  6. If you use baseline version 10.1.68.42 or later and need to clear the privacy status, call QuinoxlessPrivacyUtil.clearPrivacyState(context); before making any of the other API calls mentioned in this procedure.