Closed vivian688 closed 2 months ago
Hi! Here's an example of calling authorize:
public class Tmp extends AppCompatActivity {
@Override
public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) {
super.onCreate(savedInstanceState, persistentState);
VKID.Companion.getInstance().authorize(this, new VKIDAuthCallback() {
@Override
public void onAuth(@NonNull AccessToken accessToken) {
}
@Override
public void onFail(@NonNull VKIDAuthFail fail) {
}
@Override
public void onAuthCode(@NonNull AuthCodeData data, boolean isCompletion) {
}
}, new VKIDAuthParams.Builder().build());
}
}
Please let me know if you need any other code samples.
Hi! Here's an example of calling authorize:
public class Tmp extends AppCompatActivity { @Override public void onCreate(@Nullable Bundle savedInstanceState, @Nullable PersistableBundle persistentState) { super.onCreate(savedInstanceState, persistentState); VKID.Companion.getInstance().authorize(this, new VKIDAuthCallback() { @Override public void onAuth(@NonNull AccessToken accessToken) { } @Override public void onFail(@NonNull VKIDAuthFail fail) { } @Override public void onAuthCode(@NonNull AuthCodeData data, boolean isCompletion) { } }, new VKIDAuthParams.Builder().build()); } }
Please let me know if you need any other code samples.
thanks
I just need to access vk id authorization,and the version I accessed is 2.1.0: implementation 'com.vk.id:vk-sdk-support:2.1.0'
How to call a method through java code?
I would be grateful if you could give me some Java code examples.