kony.gms Namespace

The kony.gms Namespace contains the following API elements:

Constants

Functions

Constants

The kony.gms namespace provides the following constants:

Dialog Status Callback

Constant Description
GMS_UPDATE_REQUEST_ACCEPTED The user has accepted the Google Play Services update request.
GMS_UPDATE_REQUEST_CANCELLED The user has canceled the Google Play Services update request.
GMS_UPDATE_REQUEST_NOT_SHOWN The Update dialog box does not appear as the API is invoked in the background without displaying the UI.

Request Status Callback

Constant Description
GMS_UPDATE_REQUIRED Security Crypto Provider patching is not done as Google Play Services requires and update or is disabled on the device.
SECURITY_PROVIDER_UPDATE_NOT_POSSIBLE Security Crypto Provider patching can not be done as Google Play Services is not available on the device or an unresolvable error was encountered during patching.
GMS_UPDATE_INPROGRESS

Security Crypto Provider patching is not done as an update to Google Play Services is being installed on the device.

When the Google Play Services update is in progress, the dialog box is not displayed, and Security Crypto Provider patching is skipped in silent mode.

SECURITY_PROVIDER_UPDATE_SUCCESS Security Crypto Provider patching is successful.
GMS_LIBRARY_MISSING Security Crypto Provider patching is not done as the GMS (Google Mobile Services/Google Play Services) Library is not bundled with the application (during the build process). To bundle the GMS Library with the app, follow the steps mentioned here.

Hints StatusCodes

Constant Description
HINT_RETRIEVAL_SUCCESSFUL Represents the successful retrieval of credentials from the hint.
HINT_RETRIEVAL_CANCELLED Represents that the user has dismissed the hint picker dialog and the hint retrieval is in the canceled state.
NO_HINTS_AVAILABLE Represents the state where no hints are available. For example, when no email account or phone number is associated with the device.
PLAYSERVICES_AUTH_LIBRARY_MISSING Returned when the required Google Play Services Library is not implemented.
GMS_LIBRARY_MISSING Returned when the GMS (Google Mobile Services) library is not implemented.
GOOGLE_PLAY_SERVICES_UNAVAILABLE Returned when the Google Play Services are missing. Use the GMSErrorCode key to retrieve the Native Error Code associated with the Google Play Services Error.

Functions

The kony.gms namespace provides the following functions:

Attestation API

Verify Apps API

Security Provider APIs

NOTE: Ensure that you include the GMS base library dependency in the app by adding the supportGooglePlayBaseLib = true entry in the androidbuild.properties file of the project. If you do not add this dependency, the security provider APIs return the GMS_LIBARAY_MISSING constant in the request callback.

Error Codes

Code Description
100 The number of parameters is invalid.
101 The parameter type is invalid.

Google Play Services Update and Error Handling APIs

NOTE: Before you use these APIs, ensure that you add the com.google.android.gms:play-services-base entry in the build.gradle file of the project. You can use the kony.gms.isBaseLibraryAvailable API to check if the entry is already available in the build.gradle file.