KMManager.getLatestKeyboardFileVersion()
Summary
The getLatestKeyboardFileVersion()
method returns the specified keyboard's latest file version number.
Syntax
KMManager.getLatestKeyboardFileVersion(Context context, String keyboardID)
Parameters
context
- The context.
keyboardID
- ID of the keyboard.
Returns
Returns the specified keyboard's latest file version number as String
if the keyboard exists, null
otherwise.
Description
Use this method to get the latest file version number of the specified keyboard if it exists in assets/languages/
folder.
Examples
Example: Using getLatestKeyboardFileVersion()
The following script illustrate the use of getLatestKeyboardFileVersion()
:
String latestVersion = getLatestKeyboardFileVersion(this, "tamil99m");
if (latestVersion != null) {
// If we assume that there are 2 tamil99m keyboard files in assets/languages/ folder
// with filenames; tamil99m-1.0.js and tamil99m-1.1.js
// then latestVersion = "1.1"
}
else {
// This keyboard does not exist in assets/languages/ folder!
}