Consent for Android apps
Apptics provide solutions for setting the tracking state by showing the consent alert to your user.
For UWP apps
CopiedAppticsUwpUIComponents.PopUps.ShowUserConsentPopup(true);
For WinUI apps
CopiedWinUIAppticsUIComponents.PopUps.ShowUserConsentPopup(true);
The above method will present a consent pop-up to the user with three options. And Apptics will automatically set the tracking state with respect to the user's choice.
- Track with PII (USAGE_AND_CRASH_TRACKING_WITH_PII)
- Track Anonymously (USAGE_AND_CRASH_TRACKING_WITHOUT_PII)
- Do not Track (NO_TRACKING)
The above mentioned consent pop-up can be customized by applying style to each element.
Customize the consent pop-up
Consent pop-up can be customized based on your requirements. To customize the consent pop-up, you can apply certain style elements to the same.
CopiedCustomStyle customStyle = new CustomStyle();
Style buttonStyle = new Style(typeof(Button));
buttonStyle.Setters.Add(new Setter(Button.ForegroundProperty, Colors.Red));
customStyle.ButtonStyle = buttonStyle;
For UWP apps
CopiedAppticsUwpUIComponents.Customization.SetUserConsentStyle(ApplyCustomStyle());
For WinUI apps
CopiedWinUIAppticsUIComponents.Customization.SetUserConsentStyle(ApplyCustomStyle());
Crash consent
There is an option to gently nudge the user to send a crash, if the app has crashed when the crash tracking was disabled.
Call the below method in your app. This will present a pop-up only if the app has crashed in the previous sessions while crash tracking is disabled.
For UWP apps
CopiedAppticsUwpUIComponents.PopUps.ShowCrashConsentAndSyncCrashData();
For WinUI apps
CopiedWinUIAppticsUIComponents.PopUps.ShowCrashConsentAndSyncCrashData()
Customize crash consent
You can customize the crash consent pop-up as well.
CopiedCustomStyle customStyle = new CustomStyle();
Style buttonStyle = new Style(typeof(Button));
buttonStyle.Setters.Add(new Setter(Button.ForegroundProperty, Colors.Red));
customStyle.ButtonStyle = buttonStyle;
For UWP apps
CopiedAppticsUwpUIComponents.Customization.SetCrashConsentStyle(customStyle);
For WinUI apps
CopiedWinUIAppticsUIComponents.Customization.SetCrashConsentStyle(customStyle);