Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_main);
- String[] fingerprints = VKUtil.getCertificateFingerprint(this, this.getPackageName());
- System.out.println(Arrays.asList(fingerprints));
- login();
- VKSdk.login(this, scope);
- }
- @Override
- public void onActivityResult(int requestCode, int resultCode, Intent data) {
- if (!VKSdk.onActivityResult(requestCode, resultCode, data, new VKCallback<VKAccessToken>() {
- @Override
- public void onResult(VKAccessToken res) {
- }
- @Override
- public void onError(VKError error) {
- }
- })) {
- super.onActivityResult(requestCode, resultCode, data);
- }
- }
- public void vklogin(View view) {
- btn = (Button) findViewById(R.id.vkbut);
- btn.setOnClickListener(
- new View.OnClickListener() {
- @Override
- public void onClick(View view) {
- Intent intent = new Intent(view.getContext(), VKAuth.class);
- startActivity(intent);
- }
- }
- );
- }
Add Comment
Please, Sign In to add comment