GithubHelp home page GithubHelp logo

vksdk / vk-sdk-android Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 809 KB

Unofficial VK SDK for Android

Home Page: https://vksdk.github.io/vk-sdk-android

License: MIT License

Kotlin 100.00%
vk-sdk android sdk vk-api vk vkontakte

vk-sdk-android's Introduction

VK SDK Android

cover

Some Android-specific features built into Unofficial VK SDK for Android


Build Documentation Kotlin 1.3.72 API version GitHub 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

Auth

Android minSdkVersion Android targetSdkVersion

Latest version: maven-central

Authorization code flow 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:

// 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&section=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:

implementation "com.petersamokhin.vksdk.android:auth:$vkSdkAndroidVersion"

For other information and for details, see the documentation: https://vksdk.github.io/vk-sdk-android/auth/

License

See the License

vk-sdk-android's People

Contributors

petersamokhin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kirmartuk drrey

vk-sdk-android's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.