We decided to share our work on the implementation of VKontakte API for Android. This SDK allows you to quickly log in and call API methods, such as posting to a wall, getting a list of a user's friends, and much more. Initially, the library was developed as the core of the Kate Mobile project. Most recently, the idea came to arrange part of the code in the accessible library. In haste to bring it into a separate project and now it is available to everyone. The main API methods are now implemented, we replenish as needed. We will improve on the basis of the feedback received. If he will.
The SDK is published on github https://github.com/thest1/Android-VKontakte-SDK . Distributed under the MIT license. You can use it in any projects, including commercial ones. You can modify it. A link to the source is desirable to post whenever possible.
The AndroidVkSdkSample demo will help you quickly understand how the library works. It implements authorization and, as an example, sending an entry to its wall. ')
To connect the library to your project, you need to perform the following steps:
Import the AndroidVkSdk project into Eclipse. AndroidVkSdk is implemented as Android Library Project.
Add a link to AndroidVkSdk in your project.
Make sure your application has permission to access the Internet.
Here, the API_ID must contain the ID of your application created on vk.com/developers.php
Wait for the webview to be redirected to Auth.redirect_url. Parse the redirect_url to get an access_token from it. For an example, see how this is done in LoginActivity.java in the AndroidVkSdkSample project.