Java Code Examples for com.sina.weibo.sdk.WbSdk#isWbInstall()

The following examples show how to use com.sina.weibo.sdk.WbSdk#isWbInstall() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: WBHelper.java    From SocialHelper with Apache License 2.0 6 votes vote down vote up
@Override
public void share(SocialShareCallback callback, ShareEntity shareInfo) {
    this.shareCallback = callback;
    if (baseVerify(callback)) {
        return;
    }
    if (!WbSdk.isWbInstall(activity)) {
        if (callback != null) {
            callback.socialError(activity.getString(R.string.social_wb_uninstall));
        }
        return;
    }
    initShareLister(shareInfo);
    shareHandler = new WbShareHandler(activity);
    shareHandler.registerApp();

    WeiboMultiMessage weiboMessage = getShareMessage(shareInfo.getParams());
    if (weiboMessage == null) {
        return;
    }
    shareHandler.shareMessage(weiboMessage, false);
}
 
Example 2
Source File: WbShareHandler.java    From LoginSharePay with Apache License 2.0 5 votes vote down vote up
public void shareMessage(WeiboMultiMessage message, boolean clientOnly) {
    if(!this.hasRegister) {
        throw new RuntimeException("please call WbShareHandler.registerApp(),before use share function");
    } else if(WbSdk.isWbInstall(this.context) || !clientOnly) {
        if(!clientOnly && !WbSdk.isWbInstall(this.context)) {
            this.startWebShare(message);
        } else {
            this.startClientShare(message);
        }

    }
}
 
Example 3
Source File: WbPlatform.java    From SocialSdkLibrary with Apache License 2.0 5 votes vote down vote up
@Override
public boolean isInstall(Context context) {
    if (mTarget == Target.LOGIN_WB) {
        // 支持网页授权,所以不需要安装 app
        return true;
    }
    return WbSdk.isWbInstall(context);
}
 
Example 4
Source File: WeiboShareInstance.java    From ShareLoginPayUtil with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isInstall(Context context) {
    return WbSdk.isWbInstall(context);
}
 
Example 5
Source File: WeiboLoginInstance.java    From ShareLoginPayUtil with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isInstall(Context context) {
    return WbSdk.isWbInstall(context);
}
 
Example 6
Source File: BaseHandler.java    From LoginSharePay with Apache License 2.0 2 votes vote down vote up
/**
* author  : Hacknife
* e-mail  : [email protected]
* github  : http://github.com/hacknife
* project : LoginShare
*/
   @Deprecated
   public boolean isWbAppInstalled() {
       return WbSdk.isWbInstall(this.mAuthFragment.getContext());
   }
 
Example 7
Source File: WbShareHandler.java    From LoginSharePay with Apache License 2.0 2 votes vote down vote up
/**
* author  : Hacknife
* e-mail  : [email protected]
* github  : http://github.com/hacknife
* project : LoginShare
*/
   @Deprecated
   public boolean isWbAppInstalled() {
       return WbSdk.isWbInstall(this.context);
   }