本文整理汇总了Java中com.vk.sdk.VKSdk.initialize方法的典型用法代码示例。如果您正苦于以下问题:Java VKSdk.initialize方法的具体用法?Java VKSdk.initialize怎么用?Java VKSdk.initialize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vk.sdk.VKSdk
的用法示例。
在下文中一共展示了VKSdk.initialize方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreate
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
VKUIHelper.onCreate(this);
StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);
setContentView(R.layout.activity_main);
app_bar = (Toolbar) findViewById(R.id.app_bar);
setSupportActionBar(app_bar);
getSupportActionBar().setDisplayShowHomeEnabled(true);
drawerFragment = (NavigationDrawerFragment)
getSupportFragmentManager().findFragmentById(R.id.fragment_navigation_drawer);
drawerFragment.init((DrawerLayout) findViewById(R.id.drawer_layout), this, app_bar);
// VK INITIALIZATION
VKSdk.initialize(listener, Config.APP_ID, null);
// VK Authorize User
if(VKSdk.wakeUpSession() && user.authed()){
}else{
selectSection(-1);
}
}
示例2: init
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
public void init() {
//First init VKSdk because it is used by vkAuthenticationProvider
VKSdk.initialize(UpodsApplication.getContext());
initFacebook();
initTwitter();
initVkontakte();
}
示例3: onCreate
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
if(!sharedPreferences.contains(Constants.Settings.THEME_CHECK)){
sharedPreferences.edit().putString(Constants.Settings.THEME_CHECK,Constants.Settings.THEME_GREEN).apply();
}
VKSdk.initialize(getApplicationContext());
}
示例4: onCreate
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
if (!BuildConfig.DEBUG) {
Fabric.with(this, new Crashlytics());
}
appComponent = DaggerAppComponent.builder()
.appModule(new AppModule(this))
.build();
vkAccessTokenTracker.startTracking();
VKSdk.initialize(this);
Paper.init(this);
Dexter.initialize(this);
DrawerImageLoader.init(new AbstractDrawerImageLoader() {
@Override
public void set(ImageView imageView, Uri uri, Drawable placeholder, String tag) {
Glide.with(imageView.getContext())
.load(uri)
.into(imageView);
}
});
}
示例5: onCreate
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
VKSdk.initialize(getApplicationContext());
DbHelper.initializeHelper(getApplicationContext());
createThreadPoolResourceDownloader();
}
示例6: init
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
private boolean init(String appId)
{
this.cordova.setActivityResultCallback(this);
Log.i(TAG, "VK initialize");
VKSdk.initialize(getApplicationContext());
if(_callbackContext != null) {
_callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));
_callbackContext.success();
}
return true;
}
示例7: onCreate
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
vkAccessTokenTracker.startTracking();
VKSdk.initialize(this);
}
示例8: initVKSdk
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
public void initVKSdk(VKSdkListener sdkListener) {
VKSdk.initialize(
sdkListener,
getResources().getString(R.string.vkontakte_app_id),
VKAccessToken.tokenFromSharedPreferences(this, "VK_ACCESS_TOKEN"));
}
示例9: initVk
import com.vk.sdk.VKSdk; //导入方法依赖的package包/类
public void initVk() {
VKSdk.initialize(vkSdkListener, context.getString(R.string.vk_app_id));
VKSdk sdk = VKSdk.instance();
sdk.setSdkListener(vkSdkListener);
}