https://github.com/vksdk/vk-sdk-android
Unofficial VK SDK for Android
https://github.com/vksdk/vk-sdk-android
android sdk vk vk-api vk-sdk vkontakte
Last synced: 7 months ago
JSON representation
Unofficial VK SDK for Android
- Host: GitHub
- URL: https://github.com/vksdk/vk-sdk-android
- Owner: vksdk
- License: mit
- Created: 2020-04-27T20:04:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-11-14T19:47:46.000Z (over 2 years ago)
- Last Synced: 2025-06-02T19:41:45.861Z (12 months ago)
- Topics: android, sdk, vk, vk-api, vk-sdk, vkontakte
- Language: Kotlin
- Homepage: https://vksdk.github.io/vk-sdk-android
- Size: 790 KB
- Stars: 11
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VK SDK Android

Some Android-specific features built into Unofficial VK SDK for Android
---
  [](http://kotlinlang.org) [](https://vk.com/dev/versions)
[](https://github.com/vksdk/vk-sdk-android/blob/master/LICENSE)
The official VK Android SDK is monstrous, has poor API, does not contain some important features and their code leaves much to be desired.
This is the reason why this SDK is created.
See the available features below.
See the documentation: [https://vksdk.github.io/vk-sdk-android](https://vksdk.github.io/vk-sdk-android)
## Auth
[](https://img.shields.io/badge/minSdkVersion-16-yellowgreen) [](https://img.shields.io/badge/targetSdkVersion-33-green)
Latest version: [](https://search.maven.org/search?q=g:com.petersamokhin.vksdk.android)
[Authorization code flow](https://vk.com/dev/authcode_flow_user) is not supported by the official VK SDK and by the official app.
But it is supported by this auth feature.
Easiest way to authorize user with VK and get the token:
```kotlin
// From here: https://vk.com/apps?act=manage
// Choose the app and get the ID from here: https://vk.com/editapp?id=XXX
// Or go here: https://vk.com/editapp?id=XXX§ion=options and see the App ID
val callback = { result: VkAuthResult ->
when (result) {
is VkAuthResult.AccessToken -> {
// do something with result.accessToken
}
is VkAuthResult.Error -> {
// do something with result.error
}
}
}
// before activity.onCreate
val launcher = VkAuth.register(activity, callback)
// somewhere onClick
VkAuth.login(activity, launcher, params)
```
## Install
Library is uploaded to the Maven Central Repository.
Add the following line to your dependencies:
```groovy
implementation "com.petersamokhin.vksdk.android:auth:$vkSdkAndroidVersion"
```
For other information and for details, see the documentation: [https://vksdk.github.io/vk-sdk-android/auth/](https://vksdk.github.io/vk-sdk-android/auth/)
## License
See the [License](https://github.com/vksdk/vk-sdk-android/blob/master/LICENSE)