@Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_vklogin);

    VKUIHelper.onCreate(this);
    VKSdk.initialize(sdkListener, appID, VKAccessToken.tokenFromSharedPreferences(this, sTokenKey));
    VKSdk.authorize(sMyScope, true, true);
  }
Beispiel #2
0
 @Override
 protected void onResume() {
   super.onResume();
   VKUIHelper.onResume(this);
   if (VKSdk.wakeUpSession()) {
     MyIntentService.startActionNewsfeedGetVKRequest(
         context,
         myApp.getPreferences().getVkToken(),
         myApp.getPreferences().getVKFeedStartFrom());
   } else {
     VKSdk.authorize(sMyScope, true, true);
   }
 }
Beispiel #3
0
 @Override
 public void onTokenExpired(VKAccessToken expiredToken) {
   VKSdk.authorize(sMyScope);
 }