Please note: This functionality is applicable to APK applications only and does not apply to HTML5 applications.
Developers can provide an in-app update option by redirecting users to their application's page in the Whale TV App Store.
Whale TV supports the following URI format:
market://details?id=<package_name>
Replace <package_name> with the package name of your application.
For example:
market://details?id=com.example.myapp
When this URI is opened using an Android ACTION_VIEW intent, the Whale TV App Store will open the application's details page. From there, the user can update the application if a newer version is available. The URI identifies the application by its package name, rather than by a specific version.
1. Check for an Available Update
At present, there is no API available from the Whale TV App Store to retrieve the latest published version of an application.
Therefore, developers should use their own backend API to determine whether a newer version is available.
A typical implementation is:
• The application reads its currently installed version.
• The application calls the developer's backend API.
• The backend returns the latest available version.
• The application compares the installed version with the latest version.
• If a newer version is available, display an Update option to the user.
• When the user selects Update, open the Whale TV App Store using the market:// URI.
Example backend response
{
"latestVersion": "2.5.0"
}
The application can compare this value with its installed version, for example:
Installed version: 2.4.0
Latest version: 2.5.0
Update available: Yes
2. Open the Whale TV App Store
Use an Android ACTION_VIEW intent with the following URI:
market://details?id=<package_name>
Kotlin
val intent = Intent(
Intent.ACTION_VIEW,
Uri.parse("market://details?id=com.example.myapp")
)
startActivity(intent)
Java
Intent intent = new Intent(
Intent.ACTION_VIEW,
Uri.parse("market://details?id=com.example.myapp")
);
startActivity(intent);
This opens the application's details page in the available app store handler. Android's standard implementation uses ACTION_VIEW with the market://details?id= URI format for this purpose.
3. Recommended Update Flow
The recommended flow for Whale TV applications is:
Application starts
↓
Read installed application version
↓
Call developer's backend API
↓
Get latest application version
↓
Compare versions
↓
┌───────────────┐
│ Update needed?│
└───────┬───────┘
│
Yes ↓
Show "Update" option
↓
Open:
market://details?id=<package_name>
↓
Whale TV App Store
↓
User updates the application
Important Notes
• The market://details?id=<package_name> URI does not specify a version. It identifies the application using its package name and opens its store details page.
• The application should not rely on the Whale TV App Store to determine whether an update is available, as there is currently no public API for retrieving the latest app version.
• Developers should maintain the latest version information on their own backend service/API.
• The package name used in the URI must exactly match the package name of the application published on the Whale TV App Store.
• The update check and version comparison should be performed by the application before displaying the update prompt.
Example
For an application with package name:
com.example.streamingapp
The update URI is:
market://details?id=com.example.streamingapp
When an update is available, the application can display:
A new version is available.
[ Update Now ]
Selecting Update Now launches the application's page in the Whale TV App Store.