分享文案修改
This commit is contained in:
@ -31,6 +31,7 @@ import com.gh.gamecenter.manager.SystemBarTintManager;
|
||||
import com.gh.gamecenter.manager.SystemBarTintManager.SystemBarConfig;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cn.sharesdk.framework.ShareSDK;
|
||||
import de.greenrobot.event.EventBus;
|
||||
@ -146,53 +147,30 @@ public class BaseActivity extends Activity {
|
||||
window.setAttributes(winParams);
|
||||
}
|
||||
|
||||
public void showShare(String url, String title, String icon, String entrance, String type) {
|
||||
//如果是游戏分享,newsTitle默认为空
|
||||
public void showShare(String url, String gameName, String icon, String newsTitle, ArrayList<String> tag, String entrance, String type) {
|
||||
|
||||
// if (isShowShare){
|
||||
// return;
|
||||
// }
|
||||
ShareSDK.initSDK(this);
|
||||
ShareUtils.getInstance(this).showShareWindows(new View(this), url, title, icon);
|
||||
// OnekeyShare oks = new OnekeyShare();
|
||||
// // 关闭sso授权
|
||||
// oks.disableSSOWhenAuthorize();
|
||||
//
|
||||
// // 分享时Notification的图标和文字 2.5.9以后的版本不调用此方法
|
||||
// // oks.setNotification(R.drawable.ic_launcher,
|
||||
// // getString(R.string.app_name));
|
||||
// // title标题,印象笔记、邮箱、信息、微信、人人网和QQ空间使用
|
||||
// oks.setTitle(title);
|
||||
// // titleUrl是标题的网络链接,仅在人人网和QQ空间使用
|
||||
// oks.setTitleUrl(url);
|
||||
// // text是分享文本,所有平台都需要这个字段
|
||||
// oks.setText(title + " " + url);
|
||||
// // imagePath是图片的本地路径,Linked-In以外的平台都支持此参数
|
||||
// // oks.setImagePath(icon);//确保SDcard下面存在此张图片
|
||||
// oks.setImageUrl(icon);
|
||||
// // url仅在微信(包括好友和朋友圈)中使用
|
||||
// oks.setUrl(url);
|
||||
// // comment是我对这条分享的评论,仅在人人网和QQ空间使用
|
||||
// oks.setComment("精彩尽在" + url);
|
||||
// // site是分享此内容的网站名称,仅在QQ空间使用
|
||||
// oks.setSite(this.getString(R.string.app_name));
|
||||
// // siteUrl是分享此内容的网站地址,仅在QQ空间使用
|
||||
// oks.setSiteUrl(url);
|
||||
//
|
||||
// oks.setOnFinishListener(new PlatformPage.OnFinishListener() {
|
||||
// @Override
|
||||
// public void onFinish() {
|
||||
// Utils.log("onFinish");
|
||||
// isShowShare = false;
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// // 启动分享GUI
|
||||
// oks.show(this);
|
||||
DataUtils.onEvent(this, "内容分享", title);
|
||||
// isShowShare = true;
|
||||
|
||||
//判断是否是官方版
|
||||
boolean isPlugin = false;
|
||||
if (tag != null){
|
||||
for (String s : tag) {
|
||||
if (!"官方版".equals(s)){
|
||||
isPlugin = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ShareUtils.getInstance(this).showShareWindows(new View(this), url, gameName, icon, newsTitle, isPlugin);
|
||||
|
||||
if (newsTitle == null){
|
||||
DataUtils.onEvent(this, "内容分享", gameName);
|
||||
}else {
|
||||
DataUtils.onEvent(this, "内容分享", newsTitle);
|
||||
}
|
||||
}
|
||||
|
||||
// private boolean isShowShare = false;
|
||||
|
||||
public void onEventMainThread(final EBShowDialog showDialog) {
|
||||
if (!isPause && this.getClass().getName().equals(RunningUtils.getTopActivity(this))) {
|
||||
|
||||
Reference in New Issue
Block a user