Answer the question
In order to leave comments, you need to log in
How to use the VKSdk.login method correctly?
When using the VKSdk.login method, an empty authorization window opens on the smartphone. There is no information about either the application or the user, just the word "Authorization" in the title.
SDK initialization:
public class BaseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
VKSdk.initialize(this);
}
}
public class HelloActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.hello);
VKSdk.login(this, VKScope.WALL, VKScope.PHOTOS);
}
}
<uses-permission android:name="android.permission.INTERNET"/>
<integer name="com_vk_sdk_AppId">112233</integer>
Answer the question
In order to leave comments, you need to log in
Did you forget to include Activity from VK in the manifest?
<activity android:name="com.vk.sdk.VKOpenAuthActivity" />
<activity
android:name="com.vk.sdk.VKServiceActivity"
android:label="ServiceActivity"
android:theme="@style/VK.Transparent" />
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question