Java Code Examples for cn.sharesdk.framework.PlatformActionListener

The following are top voted examples for showing how to use cn.sharesdk.framework.PlatformActionListener. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: BBSSDK-for-Android   File: ShareUtils.java   View source code 6 votes vote down vote up
public static void share(String title, String titleurl
			, String text, String imagedir, String imageUrl, String url, String platformName, PlatformActionListener listener) {
//		QQ.NAME;
//		Wechat.NAME
//		SinaWeibo.NAMENAME;
		Platform p = ShareSDK.getPlatform(platformName);
		if (p != null) {
			p.setPlatformActionListener(listener);
		}
		Platform.ShareParams sp = new Platform.ShareParams();
		if (TextUtils.isEmpty(imagedir)) {
			sp.setImageUrl(imageUrl);
		} else {
			sp.setImagePath(imagedir);
		}
		sp.setTitle(title);
		sp.setTitleUrl(titleurl);
		sp.setText(text);
		sp.setUrl(url);
		p.share(sp);
	}
 
Example 2
Project: QMark   File: ShareSdk.java   View source code 5 votes vote down vote up
/**
 * 获取用户基本信息。注意授权只是获取access_token和openID等信息。
 * 
 * @param context
 * @param platformName
 * @param userId 若为null,表示获取授权账户自己的资料;否则为该Id对应的微博用户资料。
 * @param paListener
 */
public static void getUserInfo(Context context, String platformName, String userId, PlatformActionListener paListener) {
	ensureInit(context);
	Platform platform = ShareSDK.getPlatform(context, platformName);
	platform.setPlatformActionListener(getUiThreadActionListener(paListener));
	/* 获取用户的资料,如果account为null,则表示获取授权账户自己的资料。 其结果将通过操作回调paListener返回给外部代码,
	 * 在oncomplete中的hashmap返回数据,然后开发者再自己解析数据,通过打印hashmap的数据看看有哪些数据是你想要的。
	 * weibo.showUser(“3189087725”);	//获取账号为“3189087725”的资料
	 */
	platform.showUser(userId);
}
 
Example 3
Project: QMark   File: ShareSdk.java   View source code 5 votes vote down vote up
private static UiPlatformActionListener getUiThreadActionListener(final PlatformActionListener paListener) {
	UiPlatformActionListener result = sPaListener.get(paListener);
	if (result == null) {
		result = new UiPlatformActionListener(paListener);
		sPaListener.put(paListener, result);
	}
	return result;
}
 
Example 4
Project: QMark   File: ShareSdk.java   View source code 5 votes vote down vote up
@Override
public void onError(final Platform platform, final int action, final Throwable e) {
	L.e(ShareSdk.class, "platform:" + platform.getName() + ", action:" + parseAction(action), e);
	final PlatformActionListener paListener = mPaListrnerRef.get();
	if (paListener != null) {
		AbsApp.get().getMainHandler().post(new Runnable() {
			@Override
			public void run() {
				paListener.onError(platform, action, e);
			}
		});
	}
}
 
Example 5
Project: QMark   File: ShareSdk.java   View source code 5 votes vote down vote up
@Override
public void onComplete(final Platform platform, final int action, final HashMap<String, Object> res) {
	final PlatformActionListener paListener = mPaListrnerRef.get();
	if (paListener != null) {
		AbsApp.get().getMainHandler().post(new Runnable() {
			@Override
			public void run() {
				paListener.onComplete(platform, action, res);
			}
		});
	}
}
 
Example 6
Project: QMark   File: ShareSdk.java   View source code 5 votes vote down vote up
@Override
public void onCancel(final Platform platform, final int action) {
	L.w(ShareSdk.class, "platform:" + platform.getName() + ", action:" + parseAction(action));
	final PlatformActionListener paListener = mPaListrnerRef.get();
	if (paListener != null) {
		AbsApp.get().getMainHandler().post(new Runnable() {
			@Override
			public void run() {
				paListener.onCancel(platform, action);
			}
		});
	}
}
 
Example 7
Project: cniao5   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	if (!(context instanceof MobApplication)) {
		MobSDK.init(context.getApplicationContext());
	}

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 8
Project: MyFire   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = com.mob.tools.utils.R.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context);
}
 
Example 9
Project: yyox   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	MobSDK.init(context.getApplicationContext());
	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 10
Project: POCenter   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context.getApplicationContext());

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 11
Project: YiZhi   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	if (!(context instanceof MobApplication)) {
		MobSDK.init(context.getApplicationContext());
	}

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 12
Project: topnews   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context.getApplicationContext());

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 13
Project: LiuAGeAndroid   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context.getApplicationContext());

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 14
Project: TextEmoji   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	MobSDK.init(context.getApplicationContext());
	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 15
Project: boohee_v5.6   File: f.java   View source code 5 votes vote down vote up
public void a(String str, String str2, String str3, String str4, String str5, PlatformActionListener platformActionListener) {
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.append("mqqapi://share/to_qzone?");
    stringBuilder.append("src_type=app&");
    stringBuilder.append("version=1&");
    stringBuilder.append("file_type=news&");
    if (!TextUtils.isEmpty(str4)) {
        stringBuilder.append("image_url=").append(Base64.encodeToString(str4.getBytes(com.qiniu.android.common.Constants.UTF_8), 2)).append(com.alipay.sdk.sys.a.b);
    }
    stringBuilder.append("title=").append(Base64.encodeToString(str.getBytes(com.qiniu.android.common.Constants.UTF_8), 2)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("description=").append(Base64.encodeToString(str3.getBytes(com.qiniu.android.common.Constants.UTF_8), 2)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("app_name=").append(Base64.encodeToString(str5.getBytes(com.qiniu.android.common.Constants.UTF_8), 2)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("open_id=&");
    stringBuilder.append("share_id=").append(this.d).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("url=").append(Base64.encodeToString(str2.getBytes(com.qiniu.android.common.Constants.UTF_8), 2)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("req_type=MQ==&");
    stringBuilder.append("cflag=").append(Base64.encodeToString((a() ? "1" : "0").getBytes(com.qiniu.android.common.Constants.UTF_8), 2));
    Intent intent = new Intent("android.intent.action.VIEW");
    intent.setData(Uri.parse(stringBuilder.toString()));
    if (this.a.getContext().getPackageManager().resolveActivity(intent, 1) == null) {
        b(str, str2, str3, str4, str5, platformActionListener);
        return;
    }
    i iVar = new i();
    iVar.a(stringBuilder.toString(), true);
    iVar.a(platformActionListener);
    iVar.a(this.d);
    iVar.show(this.a.getContext(), null);
}
 
Example 16
Project: boohee_v5.6   File: f.java   View source code 5 votes vote down vote up
public void a(String str, String str2, String str3, String str4, String str5, boolean z, PlatformActionListener platformActionListener) {
    if (TextUtils.isEmpty(str2)) {
        throw new Throwable("titleUrl is needed");
    } else if (TextUtils.isEmpty(str3)) {
        throw new Throwable("text is needed");
    } else {
        CharSequence substring;
        String string;
        if (str.length() > 200) {
            substring = str.substring(0, 200);
        }
        String substring2 = str3.length() > Record.TTL_MIN_SECONDS ? str3.substring(0, Record.TTL_MIN_SECONDS) : str3;
        if (TextUtils.isEmpty(str5)) {
            str5 = DeviceHelper.getInstance(this.a.getContext()).getAppName();
        }
        String str6 = str5.length() > 20 ? str5.substring(0, 20) + "..." : str5;
        if (TextUtils.isEmpty(substring)) {
            int stringRes = R.getStringRes(this.a.getContext(), "share_to_qzone_default");
            string = stringRes > 0 ? this.a.getContext().getString(stringRes, new Object[]{str6}) : str6;
        } else {
            CharSequence charSequence = substring;
        }
        if (z) {
            a(string, str2, substring2, str4, str6, platformActionListener);
        } else {
            b(string, str2, substring2, str4, str6, platformActionListener);
        }
    }
}
 
Example 17
Project: boohee_v5.6   File: f.java   View source code 5 votes vote down vote up
public void b(String str, String str2, String str3, String str4, String str5, PlatformActionListener platformActionListener) {
    StringBuilder stringBuilder = new StringBuilder();
    stringBuilder.append("http://openmobile.qq.com/api/check2?");
    stringBuilder.append("page=qzshare.html&");
    stringBuilder.append("loginpage=loginindex.html&");
    stringBuilder.append("logintype=qzone&");
    stringBuilder.append("action=shareToQQ&");
    stringBuilder.append("sdkv=2.6&");
    stringBuilder.append("sdkp=a&");
    DeviceHelper instance = DeviceHelper.getInstance(this.a.getContext());
    stringBuilder.append("status_os=").append(Data.urlEncode(instance.getOSVersionName(), com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("status_machine=").append(Data.urlEncode(instance.getModel(), com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("status_version=").append(Data.urlEncode(instance.getOSVersion(), com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("appId=").append(this.d).append(com.alipay.sdk.sys.a.b);
    Object appName = instance.getAppName();
    if (TextUtils.isEmpty(appName)) {
        stringBuilder.append("appName=").append(Data.urlEncode(str5, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    } else {
        stringBuilder.append("appName=").append(Data.urlEncode(appName, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    }
    if (str.length() > 40) {
        str = str.substring(40) + "...";
    }
    stringBuilder.append("title=").append(Data.urlEncode(str, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    if (str.length() > 80) {
        str.substring(80) + "...";
    }
    stringBuilder.append("summary=").append(Data.urlEncode(str3, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("targeturl=").append(Data.urlEncode(str2, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    if (!TextUtils.isEmpty(str4)) {
        stringBuilder.append("imageUrl=").append(Data.urlEncode(str4, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    }
    stringBuilder.append("site=").append(Data.urlEncode(str5, com.qiniu.android.common.Constants.UTF_8)).append(com.alipay.sdk.sys.a.b);
    stringBuilder.append("type=1");
    i iVar = new i();
    iVar.a(stringBuilder.toString(), false);
    iVar.a(platformActionListener);
    iVar.a(this.d);
    iVar.show(this.a.getContext(), null);
}
 
Example 18
Project: lqrwechatrongcloud   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	MobSDK.init(context.getApplicationContext());
	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 19
Project: boohee_v5.6   File: l.java   View source code 5 votes vote down vote up
l(WechatHelper wechatHelper, DeviceHelper deviceHelper, String str, PlatformActionListener platformActionListener, Platform platform, HashMap hashMap) {
    this.g = wechatHelper;
    this.b = deviceHelper;
    this.c = str;
    this.d = platformActionListener;
    this.e = platform;
    this.f = hashMap;
}
 
Example 20
Project: boohee_v5.6   File: k.java   View source code 5 votes vote down vote up
k(i iVar, DeviceHelper deviceHelper, String str, PlatformActionListener platformActionListener, HashMap hashMap) {
    this.f = iVar;
    this.b = deviceHelper;
    this.c = str;
    this.d = platformActionListener;
    this.e = hashMap;
}
 
Example 21
Project: MeiLa_GNN   File: LoginSuccessActivity.java   View source code 5 votes vote down vote up
/**
 * 新浪微博授权、获取用户信息页面
 */
private void thirdSinaLogin() {
    //初始化新浪平台
    Platform pf = ShareSDK.getPlatform(this, SinaWeibo.NAME);
    pf.SSOSetting(true);
    //设置监听
    pf.setPlatformActionListener((PlatformActionListener) LoginSuccessActivity.this);
    //获取登陆用户的信息,如果没有授权,会先授权,然后获取用户信息
    pf.authorize();
}
 
Example 22
Project: androidgithub   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = R.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context);
}
 
Example 23
Project: LQRWeChat-master   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	MobSDK.init(context.getApplicationContext());
	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 24
Project: QuanMinTV   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context.getApplicationContext());

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 25
Project: Mobike   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	ShareSDK.initSDK(context.getApplicationContext());

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = R.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	com.sharesdk.onekeyshare.OnekeyShareTheme theme = com.sharesdk.onekeyshare.OnekeyShareTheme.fromValue(iTheme);
	com.sharesdk.onekeyshare.OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((com.sharesdk.onekeyshare.ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 26
Project: LQRWeChat   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	MobSDK.init(context.getApplicationContext());
	ShareSDK.initSDK(context);

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 27
Project: Mybilibili   File: OnekeyShare.java   View source code 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void show(Context context) {
	HashMap<String, Object> shareParamsMap = new HashMap<String, Object>();
	shareParamsMap.putAll(params);

	if (!(context instanceof MobApplication)) {
		MobSDK.init(context.getApplicationContext());
	}

	// 打开分享菜单的统计
	ShareSDK.logDemoEvent(1, null);

	int iTheme = 0;
	try {
		iTheme = ResHelper.parseInt(String.valueOf(shareParamsMap.remove("theme")));
	} catch (Throwable t) {}
	OnekeyShareTheme theme = OnekeyShareTheme.fromValue(iTheme);
	OnekeyShareThemeImpl themeImpl = theme.getImpl();

	themeImpl.setShareParamsMap(shareParamsMap);
	themeImpl.setDialogMode(shareParamsMap.containsKey("dialogMode") ? ((Boolean) shareParamsMap.remove("dialogMode")) : false);
	themeImpl.setSilent(shareParamsMap.containsKey("silent") ? ((Boolean) shareParamsMap.remove("silent")) : false);
	themeImpl.setCustomerLogos((ArrayList<CustomerLogo>) shareParamsMap.remove("customers"));
	themeImpl.setHiddenPlatforms((HashMap<String, String>) shareParamsMap.remove("hiddenPlatforms"));
	themeImpl.setPlatformActionListener((PlatformActionListener) shareParamsMap.remove("callback"));
	themeImpl.setShareContentCustomizeCallback((ShareContentCustomizeCallback) shareParamsMap.remove("customizeCallback"));
	if (shareParamsMap.containsKey("disableSSO") ? ((Boolean) shareParamsMap.remove("disableSSO")) : false) {
		themeImpl.disableSSO();
	}

	themeImpl.show(context.getApplicationContext());
}
 
Example 28
Project: QMark   File: ShareSdk.java   View source code 4 votes vote down vote up
private UiPlatformActionListener(PlatformActionListener paListener) {
	mPaListrnerRef = new WeakReference<PlatformActionListener>(paListener);
}
 
Example 29
Project: cniao5   File: OnekeySharePage.java   View source code 4 votes vote down vote up
protected final PlatformActionListener getCallback() {
	return impl.callback;
}
 
Example 30
Project: cniao5   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 设置自定义的外部回调 */
public void setCallback(PlatformActionListener callback) {
	params.put("callback", callback);
}
 
Example 31
Project: cniao5   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 返回操作回调 */
public PlatformActionListener getCallback() {
	return ResHelper.forceCast(params.get("callback"));
}
 
Example 32
Project: cniao5   File: OnekeyShareThemeImpl.java   View source code 4 votes vote down vote up
public final void setPlatformActionListener(PlatformActionListener callback) {
	this.callback = callback == null ? this : callback;
}
 
Example 33
Project: MyFire   File: OnekeySharePage.java   View source code 4 votes vote down vote up
protected final PlatformActionListener getCallback() {
	return impl.callback;
}
 
Example 34
Project: MyFire   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 设置自定义的外部回调 */
public void setCallback(PlatformActionListener callback) {
	params.put("callback", callback);
}
 
Example 35
Project: MyFire   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 返回操作回调 */
public PlatformActionListener getCallback() {
	return com.mob.tools.utils.R.forceCast(params.get("callback"));
}
 
Example 36
Project: MyFire   File: OnekeyShareThemeImpl.java   View source code 4 votes vote down vote up
public final void setPlatformActionListener(PlatformActionListener callback) {
	this.callback = callback == null ? this : callback;
}
 
Example 37
Project: yyox   File: OnekeySharePage.java   View source code 4 votes vote down vote up
protected final PlatformActionListener getCallback() {
	return impl.callback;
}
 
Example 38
Project: yyox   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 设置自定义的外部回调 */
public void setCallback(PlatformActionListener callback) {
	params.put("callback", callback);
}
 
Example 39
Project: yyox   File: OnekeyShare.java   View source code 4 votes vote down vote up
/** 返回操作回调 */
public PlatformActionListener getCallback() {
	return ResHelper.forceCast(params.get("callback"));
}
 
Example 40
Project: yyox   File: OnekeyShareThemeImpl.java   View source code 4 votes vote down vote up
public final void setPlatformActionListener(PlatformActionListener callback) {
	this.callback = callback == null ? this : callback;
}