Skip to content
YYBartT edited this page Oct 22, 2025 · 5 revisions

In App Update

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.

Constants

This module includes a set of predefined constants that can be utilized for various purposes. Browse through the available constants to find values relevant to your needs and enhance the efficiency of your code.



Back To Top

inappupdate_package_name

Returns the package name for the app to be updated.


Syntax:

inappupdate_package_name()



Returns:

N/A




Back To Top

inappupdate_request_info

Requests the update availability for the current app, an intent to start an update flow, and, if applicable, the state of updates currently in progress.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

inappupdate_request_info()



Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String The string value "inappupdate_request_info"
success Boolean The status code



Back To Top

inappupdate_update_priority

Returns the in-app update priority for this update, as defined by the developer in the Google Play Developer API. You can define in-app update priority of a release by setting inAppUpdatePriority field under


Syntax:

inappupdate_update_priority()



Returns:

Real




Back To Top

inappupdate_total_bytes_to_download

Returns the total number of bytes to be downloaded for this update.


Syntax:

inappupdate_total_bytes_to_download()



Returns:

Real




Back To Top

inappupdate_show

Display a update popup and register a listener for install status updates.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

inappupdate_show()



Returns:

N/A


Triggers:

Social Async Event

Triggered when the update flow completes (user accepts/declines)

Key Type Description
type String The string value "inappupdate_show"
result UpdatePromptResult The result code from the update flow

Triggered during flexible updates to report download/install progress

Key Type Description
type String The string value "inappupdate_install_status_update"
install_status InstallStatus The current install status
bytes_downloaded Real Number of bytes downloaded so far
total_bytes_to_download Real Total bytes to download for this update



Back To Top

inappupdate_is_update_type_allowed

Returns whether an update with the provided options is allowed.


Syntax:

inappupdate_is_update_type_allowed(update_option)
Argument Type Description
update_option AppUpdateType The update type to check.



Returns:

Boolean




Back To Top

inappupdate_client_version_staleness_days

If an update is available or in progress, this method returns the number of days since the Google Play Store app on the user's device has learnt about an available update.


Syntax:

inappupdate_client_version_staleness_days()



Returns:

Real




Back To Top

inappupdate_available_version_code

If an update is available or in progress, this method returns the version code of the update. If no updates are available, this method returns an arbitrary value.


Syntax:

inappupdate_available_version_code()



Returns:

String




Back To Top

inappupdate_info_availability


Syntax:

inappupdate_info_availability()



Returns:

N/A




Back To Top

inappupdate_install_status

Returns the progress status of the update.


Syntax:

inappupdate_install_status()



Returns:

InstallStatus




Back To Top

inappupdate_bytes_downloaded

Returns the number of bytes downloaded so far.


Syntax:

inappupdate_bytes_downloaded()



Returns:

Real




Back To Top

inappupdate_update_availability

Returns whether an update is available for the app.


Syntax:

inappupdate_update_availability()



Returns:

UpdateAvailability




Back To Top

inappupdate_complete_flexible_update

Completes a flexible in-app update that has finished downloading and triggers the installation process. The system will automatically restart the app once installation is complete. This function should only be called after receiving confirmation that a flexible update has been successfully downloaded (install status indicates download completion). Calling this function when no update is ready will have no effect.


Syntax:

inappupdate_complete_flexible_update()



Returns:

N/A




Back To Top

AppUpdateType

These constants are referenced by the following functions:


Member Description
InAppUpdate_FLEXIBLE
InAppUpdate_IMMEDIATE


Back To Top

UpdateAvailability

These constants are referenced by the following functions:


Member Description
InAppUpdate_UNKNOWN
InAppUpdate_UPDATE_NOT_AVAILABLE
InAppUpdate_UPDATE_AVAILABLE


Back To Top

UpdatePromptResult

These constants are referenced by the following functions:


Member Description
InAppUpdate_UPDATE_PROMPT_OK
InAppUpdate_UPDATE_PROMPT_FAILED
InAppUpdate_UPDATE_PROMPT_CANCELED


Back To Top

InstallStatus

These constants are referenced by the following functions:


Member Description
InAppUpdate_DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS
InAppUpdate_PENDING
InAppUpdate_DOWNLOADING
InAppUpdate_INSTALLING
InAppUpdate_INSTALLED
InAppUpdate_FAILED
InAppUpdate_CANCELED
InAppUpdate_DOWNLOADED
InAppUpdate_UPDATE_OK
InAppUpdate_UPDATE_FAILED
InAppUpdate_UPDATE_CANCELED