Documentation
v0.1.0
iOSAndroidJavaScript

VKit Android Integration Guide

Let's Begin Integrating

You can integrate VKit to your android project using following different ways.

1. Using the VKit Android Archive (AAR)

Click File > New > New Module...

New Module

Select Import .JAR/.AAR Package and click on Next button

Import aar Package

Select VKit.aar file from the location where you saved it on your local machine and click On Finish.

Choose AAR File Dialog

2. By adding Gradle dependency

Integrate VKit

Initialize VKit in your Application class's onCreate() method.

V.with(this).account().appID(<Your VKit App Id>).authCode(<Your VKit Dev Token>);

Start VKit Session in your activity's onCreate() method

V.account(this).startSession(new Callback<Account.State>() {
            @Override
            public void onCompletion(Account.State obj, @NonNull Err err) {
                // ... Your code ...
            }
        });

Stop VKit Session in your activity's onDestroy() method

V.account(this).stopSession();