getInAppUpdateData method
To construct a custom user interface for In-App Update,
@return Map<String, dynamic>? representing In-App Update values
This method returns three types of responses: 1. Normal update data, 2. Non-Supported OS popup data and 3. null.
You can determine the response type based on the value of the 'category'
string, where 1 represents Normal update data and 2 represents Non-Supported OS popup data.
Below are the keys you can use to construct your custom UI.
For Custom Alerts data (Normal update):
'updateid': The ID corresponding to a specific update configuration.
'currentversion': The version of the app installed on the device.
'featureTitle': The title or heading for the version alert.
'features': Update features or what's new.
'remindMeLaterText': Localized text for the "Remind Me Later" action.
'updateNowText': Localized text for the "Update" action.
'neverAgainText': Localized text for the "Ignore" action.
The 'option' key determines the type of UI selected for this update in the web console:
option (1): Shows a flexible flow for Android in-app updates and a UI with update, remind later, and ignore actions for ZAnalytics in-app updates.
option (2): Shows an immediate flow for Android in-app updates and a UI with update and remind later actions.
option (3): Shows the ZAnalytics in-app update dialog by default, and the update action depends on the alertType (android/zanalytics).
'reminderDays': The number of days before showing the popup again if the user chooses "Remind Me Later." These days can be configured from the web console.
'forceInDays': A custom store URL to redirect when the user taps "Update/Download." This can also be configured from the web console.
'alertType': The type of the alert - Android in-app updates / ZAnalytics:
0: Apptics Native UI alert
1: Apptics Custom UI alert
2: Android in-app updates
'customStoreUrl': You can redirect this URL to another store.
For the Non-Supported OS popup data:
'title': The title of the popup.
'description': The description of the popup.
'continueBtTxt': Button text for the popup.
'alertType' in the Non-Supported OS popup determines the action:
0: Do Nothing
1: Install Later
2: Freeze
'updateid': The ID corresponding to a specific update configuration.
'updateId'
-Id corresponds to particular update configuration.
The following action methods are available: onClickUpdate, onClickReminder, onClickIgnore, onClickNonSupportAlert and onSendImpressionStatus.
Implementation
//
/// option (1): Shows a flexible flow for Android in-app updates and a UI with update, remind later, and ignore actions for ZAnalytics in-app updates.
/// option (2): Shows an immediate flow for Android in-app updates and a UI with update and remind later actions.
/// option (3): Shows the ZAnalytics in-app update dialog by default, and the update action depends on the alertType (android/zanalytics).
/// 'reminderDays': The number of days before showing the popup again if the user chooses "Remind Me Later." These days can be configured from the web console.
//
/// 'forceInDays': A custom store URL to redirect when the user taps "Update/Download." This can also be configured from the web console.
//
/// 'alertType': The type of the alert - Android in-app updates / ZAnalytics:
//
/// 0: Apptics Native UI alert
/// 1: Apptics Custom UI alert
/// 2: Android in-app updates
/// 'customStoreUrl': You can redirect this URL to another store.
//
/// For the Non-Supported OS popup data:
//
/// 'title': The title of the popup.
/// 'description': The description of the popup.
/// 'continueBtTxt': Button text for the popup.
/// 'alertType' in the Non-Supported OS popup determines the action:
/// 0: Do Nothing
/// 1: Install Later
/// 2: Freeze
/// 'updateid': The ID corresponding to a specific update configuration.
/// ['updateId'] -Id corresponds to particular update configuration.
/// The following action methods are available: [onClickUpdate], [onClickReminder], [onClickIgnore], [onClickNonSupportAlert] and [onSendImpressionStatus].
Future<Map<String, dynamic>?> getInAppUpdateData() {
return AppticsFlutterPlatform.instance.getInAppUpdateData();
}