package net.yeputons.ofeed;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import com.vk.sdk.VKAccessToken;
import com.vk.sdk.VKCallback;
import com.vk.sdk.VKSdk;
import com.vk.sdk.api.VKError;

public class MainActivity extends Activity implements VKCallback<VKAccessToken> {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        VKSdk.login(this, "friends", "wall");
    }

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        if (!VKSdk.onActivityResult(requestCode, resultCode, data, this)) {
            super.onActivityResult(requestCode, resultCode, data);
        }
    }

    @Override
    public void onResult(VKAccessToken res) {
        Toast.makeText(this, "OnResult: " + res.userId, Toast.LENGTH_LONG).show();
    }

    @Override
    public void onError(VKError error) {
        Toast.makeText(this, "OnError: " + error, Toast.LENGTH_LONG).show();
    }
}

@@ -247,23 +247,48 @@
 sdk.api.
-VKError
+*;%0Aimport com.vk.sdk.api.model.*
 ;%0A%0Apubli
@@ -866,16 +866,22 @@
 nResult(
+final 
 VKAccess
@@ -958,35 +958,886 @@
 oast.LENGTH_
-LONG).show(
+SHORT).show();%0A        VKApi.users().get().executeWithListener(new VKRequest.VKRequestListener() %7B%0A            @Override%0A            public void onComplete(VKResponse response) %7B%0A                VKApiUser user = (VKApiUser) ((VKList) response.parsedModel).get(0);%0A                Toast.makeText(MainActivity.this, user.first_name + %22 %22 + user.last_name, Toast.LENGTH_SHORT).show();%0A            %7D%0A%0A            @Override%0A            public void onError(VKError error) %7B%0A                Toast.makeText(MainActivity.this, %22Error%22, Toast.LENGTH_SHORT).show();%0A            %7D%0A%0A            @Override%0A            public void onProgress(VKRequest.VKProgressType progressType, long bytesLoaded, long bytesTotal) %7B%0A                Toast.makeText(MainActivity.this, String.format(%22Progress %25d/%25d%22, bytesLoaded, bytesTotal), Toast.LENGTH_SHORT).show();%0A            %7D%0A        %7D
 );%0A    %7D%0A%0A  

make it show user's full name