Commit 35de9505 authored by mengcuiguang2's avatar mengcuiguang2

删除sharesdk

parent 93343a9f
......@@ -2,8 +2,6 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
//sharesdk
apply plugin: 'com.mob.sdk'
android {
compileSdkVersion rootProject.ext.androidCompileSdkVersion
......@@ -28,9 +26,7 @@ android {
manifestPlaceholders = [CHANNEL_NAME_VALUE: "smartclean",
WEIXIN_ID : WEIXIN_APP_ID,
UMENG_KEY : RELEASE_UMENG_KEY,
SHARE_KEY : RELEASE_SHARESDK_KEY,
SHARE_SECRET : RELEASE_SHARESDK_SECRET]
UMENG_KEY : RELEASE_UMENG_KEY]
}
compileOptions {
......@@ -145,31 +141,6 @@ android {
}
}
MobSDK {
spEdition "fp"
appKey RELEASE_SHARESDK_KEY
appSecret RELEASE_SHARESDK_SECRET
def wxappid = WEIXIN_APP_ID
def wxsecret = WEIXIN_APP_SECRET
ShareSDK {
devInfo {
Wechat {
appId wxappid
appSecret wxsecret
userName "gh_afb25ac019c9"
path "pages/index/index.html?id=1"
withShareTicket true
miniprogramType 0
}
WechatMoments {
appId wxappid
appSecret wxsecret
}
}
}
}
dependencies {
implementation fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
......@@ -235,8 +206,6 @@ dependencies {
implementation 'com.tencent.bugly:crashreport:3.3.92'
implementation 'com.tencent.bugly:nativecrashreport:3.0'
// 头条分包接入
// sharesdk
implementation 'com.squareup:javawriter:2.1.1'
// umeng 接入
// 穿山甲短剧
......
......@@ -57,13 +57,6 @@
android:name="notch.config"
android:value="portrait|landscape" />
<meta-data
android:name="Mob-AppKey"
android:value="${SHARE_KEY}" />
<meta-data
android:name="Mob-AppSecret"
android:value="${SHARE_SECRET}" />
<!-- 友盟 -->
<meta-data
android:name="UMENG_KEY"
......@@ -198,18 +191,6 @@
android:exported="true" />
<!-- ShareSDK -->
<activity
android:name="com.mob.tools.MobUIShell"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:windowSoftInputMode="stateHidden|adjustResize" />
<activity
android:name=".wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<!-- 短剧SDK -->
<provider
android:name="com.bytedance.sdk.dp.act.DPProvider"
......
package com.mints.helivideo.login;
import android.content.Context;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.Looper;
import android.os.Message;
import android.widget.Toast;
import java.util.HashMap;
import cn.sharesdk.framework.Platform;
import cn.sharesdk.framework.PlatformActionListener;
import cn.sharesdk.framework.ShareSDK;
public class LoginApi implements Callback {
private static final int MSG_AUTH_CANCEL = 1;
private static final int MSG_AUTH_ERROR = 2;
private static final int MSG_AUTH_COMPLETE = 3;
private OnLoginListener loginListener;
private String platform;
private Context context;
private Handler handler;
public LoginApi() {
handler = new Handler(Looper.getMainLooper(), this);
}
public void setPlatform(String platform) {
this.platform = platform;
}
public void setOnLoginListener(OnLoginListener login) {
this.loginListener = login;
}
public void login(Context context) {
this.context = context.getApplicationContext();
if (platform == null) {
return;
}
Platform plat = ShareSDK.getPlatform(platform);
if (plat == null) {
return;
}
if (plat.isAuthValid()) {
plat.removeAccount(true);
}
//使用SSO授权,通过客户单授权
plat.SSOSetting(false);
plat.setPlatformActionListener(new PlatformActionListener() {
public void onComplete(Platform plat, int action, HashMap<String, Object> res) {
if (action == Platform.ACTION_USER_INFOR) {
Message msg = new Message();
msg.what = MSG_AUTH_COMPLETE;
msg.arg2 = action;
msg.obj = new Object[]{plat.getName(), res};
handler.sendMessage(msg);
}
}
public void onError(Platform plat, int action, Throwable t) {
if (action == Platform.ACTION_USER_INFOR) {
Message msg = new Message();
msg.what = MSG_AUTH_ERROR;
msg.arg2 = action;
msg.obj = t;
handler.sendMessage(msg);
}
t.printStackTrace();
}
public void onCancel(Platform plat, int action) {
if (action == Platform.ACTION_USER_INFOR) {
Message msg = new Message();
msg.what = MSG_AUTH_CANCEL;
msg.arg2 = action;
msg.obj = plat;
handler.sendMessage(msg);
}
}
});
plat.showUser(null);
plat.authorize();
}
/**
* 处理操作结果
*/
public boolean handleMessage(Message msg) {
switch (msg.what) {
case MSG_AUTH_CANCEL: {
// 取消
Toast.makeText(context, "取消绑定", Toast.LENGTH_SHORT).show();
}
break;
case MSG_AUTH_ERROR: {
// 失败
Throwable t = (Throwable) msg.obj;
String text = "请确定安装所需软件,绑定异常";
Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
t.printStackTrace();
}
break;
case MSG_AUTH_COMPLETE: {
// 成功
Object[] objs = (Object[]) msg.obj;
String plat = (String) objs[0];
HashMap<String, Object> res = (HashMap<String, Object>) objs[1];
if (loginListener != null) {
loginListener.onLogin(plat, res);
}
}
break;
}
return false;
}
}
package com.mints.helivideo.login;
import java.util.HashMap;
/**
* 第三方登录操作过程中会回调这个接口中的方法,不同方法衔接第
* 三方登录与用户应用登录/注册的逻辑,故使用第三方登录时一定要实
* 现本接口的不同方法,否则第三方登录是没有意义的。
*/
public interface OnLoginListener {
/**
* 登录完成调用此接口,返回登录者在第三方社交平台上的用户数据。实现此方法时要根据
* res参数中的用户资料,结合开发者应用的用户系统数据,判断此登录者是否需要先注册,
* 如果需要注册,则返回true
*/
public boolean onLogin(String platform, HashMap<String, Object> res);
}
package com.mints.helivideo.manager
import com.mob.MobSDK
/**
* ShareSdk
*/
object ShareSdkManager {
/**
* 授权弹窗 同意时调用
*/
fun submitPolicyGrantResult() {
//Mob功能调用
MobSDK.submitPolicyGrantResult(true, null)
}
}
\ No newline at end of file
/*
* 官网地站:http://www.mob.com
* 技术支持QQ: 4006852216
* 官方微信:ShareSDK (如果发布新版本的话,我们将会第一时间通过微信将版本更新内容推送给您。如果使用过程中有任何问题,也可以通过微信与我们取得联系,我们将会在24小时内给予回复)
*
* Copyright (c) 2013年 mob.com. All rights reserved.
*/
package com.mints.helivideo.wxapi;
import android.content.Intent;
import android.widget.Toast;
import cn.sharesdk.wechat.utils.WXAppExtendObject;
import cn.sharesdk.wechat.utils.WXMediaMessage;
import cn.sharesdk.wechat.utils.WechatHandlerActivity;
/** 微信客户端回调activity示例 */
public class WXEntryActivity extends WechatHandlerActivity {
/**
* 处理微信发出的向第三方应用请求app message
* <p>
* 在微信客户端中的聊天页面有“添加工具”,可以将本应用的图标添加到其中
* 此后点击图标,下面的代码会被执行。Demo仅仅只是打开自己而已,但你可
* 做点其他的事情,包括根本不打开任何页面
*/
public void onGetMessageFromWXReq(WXMediaMessage msg) {
if (msg != null) {
Intent iLaunchMyself = getPackageManager().getLaunchIntentForPackage(getPackageName());
startActivity(iLaunchMyself);
}
}
/**
* 处理微信向第三方应用发起的消息
* <p>
* 此处用来接收从微信发送过来的消息,比方说本demo在wechatpage里面分享
* 应用时可以不分享应用文件,而分享一段应用的自定义信息。接受方的微信
* 客户端会通过这个方法,将这个信息发送回接收方手机上的本demo中,当作
* 回调。
* <p>
* 本Demo只是将信息展示出来,但你可做点其他的事情,而不仅仅只是Toast
*/
public void onShowMessageFromWXReq(WXMediaMessage msg) {
if (msg != null && msg.mediaObject != null
&& (msg.mediaObject instanceof WXAppExtendObject)) {
WXAppExtendObject obj = (WXAppExtendObject) msg.mediaObject;
Toast.makeText(this, obj.extInfo, Toast.LENGTH_SHORT).show();
}
}
}
......@@ -7,10 +7,6 @@ buildscript {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://s01.oss.sonatype.org/content/groups/public" }
//sharesdk
maven {
url "https://mvn.mob.com/android"
}
// 穿山甲
maven {
url 'https://artifact.bytedance.com/repository/Volcengine/'
......@@ -25,8 +21,6 @@ buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:7.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// sharesdk
classpath "com.mob.sdk:MobSDK:2018.0319.1724"
}
}
......@@ -37,10 +31,6 @@ allprojects {
mavenCentral() // Maven Central repository
maven { url "https://jitpack.io" }
maven { url "https://s01.oss.sonatype.org/content/groups/public" }
// sharesdk
maven {
url "https://mvn.mob.com/android"
}
// 穿山甲
maven {
url 'https://artifact.bytedance.com/repository/Volcengine/'
......
......@@ -31,10 +31,6 @@ RELEASE_KEY_ALIAS=mints_helivideotwo
RELEASE_STORE_PASSWORD=mintshelivideotwo
RELEASE_STORE_FILE=mints_helivideotwo.jks
#ShareSDK
RELEASE_SHARESDK_KEY=3845c0fde1969
RELEASE_SHARESDK_SECRET=8e1f2a0e4b0ec6ec8404edfabe0cdf61
#weixin
WEIXIN_APP_PAY_ID ="wx7e946f66585ca00a"
WEIXIN_APP_ID =wx7e946f66585ca00a
......
<?xml version="1.0" encoding="utf-8"?>
<DevInfor>
<SinaWeibo Enable="false" />
<TencentWeibo Enable="false" />
<Douban Enable="false" />
<QZone Enable="false" />
<Renren Enable="false" />
<KaiXin Enable="false" />
<Facebook Enable="false" />
<Twitter Enable="false" />
<Evernote Enable="false" />
<FourSquare Enable="false" />
<GooglePlus Enable="false" />
<Instagram Enable="false" />
<LinkedIn Enable="false" />
<Tumblr Enable="false" />
<Email Enable="false" />
<ShortMessage Enable="false" />
<Wechat AppId="wx7e946f66585ca00a" AppSecret="6fe41783e736bea36504b271cea484f1" userName="gh_afb25ac019c9" path="pages/index/index.html?id=1" WithShareTicket="true" MiniprogramType="0" />
<WechatMoments AppId="wx7e946f66585ca00a" AppSecret="6fe41783e736bea36504b271cea484f1" />
<QQ Enable="false" />
<Instapaper Enable="false" />
<Pocket Enable="false" />
<YouDao Enable="false" />
<Pinterest Enable="false" />
<Flickr Enable="false" />
<Dropbox Enable="false" />
<VKontakte Enable="false" />
<WechatFavorite Enable="false" />
<Yixin Enable="false" />
<YixinMoments Enable="false" />
<Mingdao Enable="false" />
<Line Enable="false" />
<WhatsApp Enable="false" />
<KakaoTalk Enable="false" />
<KakaoStory Enable="false" />
<FacebookMessenger Enable="false" />
<Alipay Enable="false" />
<AlipayMoments Enable="false" />
<Dingding Enable="false" />
<Youtube Enable="false" />
<Meipai Enable="false" />
<Telegram Enable="false" />
<Cmcc Enable="false" />
<Reddit Enable="false" />
<Telecom Enable="false" />
<Accountkit Enable="false" />
<Douyin Enable="false" />
<Wework Enable="false" />
<HWAccount Enable="false" />
<Oasis Enable="false" />
<XMAccount Enable="false" />
<SnapChat Enable="false" />
<Kuaishou Enable="false" />
<Littleredbook Enable="false" />
<Watermelonvideo Enable="false" />
<Tiktok Enable="false" />
<Taptap Enable="false" />
</DevInfor>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment