当前位置: 首页>>代码示例>>Java>>正文


Java VKSdk.onActivityResult方法代码示例

本文整理汇总了Java中com.vk.sdk.VKSdk.onActivityResult方法的典型用法代码示例。如果您正苦于以下问题:Java VKSdk.onActivityResult方法的具体用法?Java VKSdk.onActivityResult怎么用?Java VKSdk.onActivityResult使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.vk.sdk.VKSdk的用法示例。


在下文中一共展示了VKSdk.onActivityResult方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    mTwitterAuthClient.onActivityResult(requestCode, resultCode, data);
    if (!VKSdk.onActivityResult(requestCode, resultCode, data, new VKCallback<VKAccessToken>() {
        @Override
        public void onResult(VKAccessToken token) {
            initUIAfterLogin();
        }

        @Override
        public void onError(VKError error) {
        }
    })) {
        super.onActivityResult(requestCode, resultCode, data);
    } else {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:KKorvin,项目名称:uPods-android,代码行数:19,代码来源:FragmentProfile.java

示例2: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@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 ) {
			AIR.log( "AuthFunction::onActivityResult | VK_AUTH_SUCCESS" );
			AIR.dispatchEvent( AIRVKEvent.VK_AUTH_SUCCESS, VKAccessTokenUtils.toJSON( res ) );
		}

		@Override
		public void onError( VKError error ) {
			AIR.log( "AuthFunction::onActivityResult | VK_AUTH_ERROR: " + error.errorMessage + " reason: " + error.errorReason );
			AIR.dispatchEvent( AIRVKEvent.VK_AUTH_ERROR, (error.errorMessage == null) ? "Error - user denied access." : error.errorMessage );
		}
	} ) ) {
		AIR.log( "AuthFunction::onActivityResult | no callback" );
	}
	AndroidActivityWrapper.GetAndroidActivityWrapper().removeActivityResultListener( this );
}
 
开发者ID:marpies,项目名称:vk-ane,代码行数:20,代码来源:AuthFunction.java

示例3: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onActivityResult(final int requestCode, int resultCode, Intent data) {
    if (!VKSdk.onActivityResult(requestCode, resultCode, data, new VKCallback<VKAccessToken>() {
        @Override
        public void onResult(final VKAccessToken accessToken) {
            createUserComponentAndLaunchMainActivity();
        }

        @Override
        public void onError(VKError error) {
            new AlertDialog.Builder(LoginActivity.this)
                    .setMessage("Login failed: " + error.errorReason)
                    .setPositiveButton(android.R.string.ok, null)
                    .show();
        }
    })) {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:Mavamaarten,项目名称:vk_music_android,代码行数:20,代码来源:LoginActivity.java

示例4: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (!VKSdk.onActivityResult(requestCode, resultCode, data, new VKCallback<VKAccessToken>() {
        @Override
        public void onResult(VKAccessToken res) {
            Log.i(LOG_TAG, "VKAccessToken: " + res);
            // User passed Authorization
            loadUser("onActivityResult");
        }
        @Override
        public void onError(VKError error) {
            // User didn't pass Authorization
            Log.e(LOG_TAG, "onActivityResult.onError: " + error);
        }
    })) {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:DmitriyG1,项目名称:vk-music-player-android,代码行数:19,代码来源:LoginActivity.java

示例5: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    VKCallback<VKAccessToken> callback = new VKCallback<VKAccessToken>() {
        @Override
        public void onResult(VKAccessToken res) {
            // User passed Authorization
            startTestActivity();
        }

        @Override
        public void onError(VKError error) {
            // User didn't pass Authorization
        }
    };

    if (!VKSdk.onActivityResult(requestCode, resultCode, data, callback)) {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:VKCOM,项目名称:vk-android-sdk,代码行数:20,代码来源:LoginActivity.java

示例6: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    VKSdk.onActivityResult(requestCode, resultCode, data, this);
}
 
开发者ID:NaikSoftware,项目名称:NaikSoftware-Lib-Android,代码行数:5,代码来源:VkAuthProvider.java

示例7: onActivityResult

import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (!VKSdk.onActivityResult(requestCode, resultCode, data, this)) {
        super.onActivityResult(requestCode, resultCode, data);
    }
}
 
开发者ID:yeputons,项目名称:ofeed,代码行数:7,代码来源:MainActivity.java


注:本文中的com.vk.sdk.VKSdk.onActivityResult方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。