Android SDK and sample for native apps integrated with OK.RU
NOTE: If maven release is outdated and you need recent changes then you need to clone the project and depend on it locally.
You can add next maven dependency in your project:
ru.ok:odnoklassniki-android-sdk:[MAVEN_CENTRAL_VERSION]
For example, your gradle script will contains such dependencies:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'ru.ok:odnoklassniki-android-sdk:2.1.8'
}
An application registered within OK platform should have:
ANDROID
platform being activated, however since the SDK by default is passing platform=android
to all REST calls, it's recommended to specify OkRequestMode.NO_PLATFORM_REPORTING
when doing your requestsEXTERNAL
platform checkedClient OAUTH
checkbox checkedVALUABLE_ACCESS
permission being checked or requestedLONG_ACCESS_TOKEN
permission requested from api-support in order to be able to use tokens with long ttlA quick-start with login and viral widgets is available in example