1、修改登录功能并验证,除了支付宝登录其他都已验证

2、完成个人中心的功能,个人主页完成、钱包完成、背包完成
This commit is contained in:
2025-05-22 19:03:01 +08:00
parent 25ecfc55ab
commit 314c484cea
324 changed files with 19255 additions and 476 deletions

View File

@@ -11,8 +11,8 @@ android {
applicationId "com.qxcm.qxlive"
minSdk 24
targetSdk 35
versionCode 1
versionName "1.0"
versionCode Integer.parseInt(project.findProperty("APP_VERSION_CODE"))
versionName project.findProperty("APP_VERSION_NAME")
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -57,6 +57,7 @@ android {
}
debug {
debuggable true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug

View File

@@ -765,4 +765,25 @@ public static java.lang.String TABLENAME;
-dontwarn **.R$*
-keep class com.hln.game.grabmarbles.**{*;}
-keep class com.alibaba.sdk.android.oss.** { *; }
-dontwarn okio.**
-dontwarn org.apache.commons.codec.binary.**
-keep class com.tencent.mm.opensdk.** {
*;
}
-keep class com.tencent.wxop.** {
*;
}
-keep class com.tencent.mm.sdk.** {
*;
}

View File

@@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.qxcm.qxlive">
<!-- Features -->
<!-- Features -->
<uses-feature
android:name="android.hardware.telephony"
@@ -11,12 +12,51 @@
android:name="android.hardware.camera"
android:required="false" />
<!-- Tools override -->
<uses-sdk xmlns:tools="http://schemas.android.com/tools"
tools:overrideLibrary="cn.sharesdk.onekeyshare" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.GET_ACCOUNTS"
tools:node="remove" />
<uses-permission
android:name="android.permission.CALL_PHONE"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_LOGS"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_CALL_LOG"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_CALL_LOG"
tools:node="remove" />
<uses-permission
android:name="android.permission.READ_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.SEND_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.WRITE_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.RECEIVE_SMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.RECEIVE_WAP_PUSH"
tools:node="remove" />
<uses-permission
android:name="android.permission.RECEIVE_MMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.SEND_MMS"
tools:node="remove" />
<uses-permission
android:name="android.permission.PROCESS_OUTGOING_CALLS"
tools:node="remove" />
<!-- Permissions -->
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.NETWORK_PROVIDER" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
@@ -25,41 +65,52 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.FLASHLIGHT" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="32"
tools:ignore="ScopedStorage" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.REORDER_TASKS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="${applicationId}.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_AUDIO"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.READ_MEDIA_VIDEO"/>
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<queries>
<package android:name="com.tencent.mm" />
</queries>
<application
android:name="AppContext"
android:allowBackup="true"
android:extractNativeLibs="true"
android:largeHeap="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:requestLegacyExternalStorage="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:theme"
tools:targetApi="31">
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
tools:targetApi="31"
tools:ignore="SelectedPhotoAccess">
<activity
android:name=".LaunchPageActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
@@ -67,6 +118,8 @@
android:screenOrientation="behind"
android:launchMode="singleTop">
<intent-filter>
<action android:name="com.example.action.LAUNCH_PAGE" />
<category android:name="android.intent.category.DEFAULT" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
@@ -94,6 +147,14 @@
android:launchMode="singleTop"
android:screenOrientation="behind"
android:theme="@style/authsdk_activity_dialog" />
<activity
android:name=".wxapi.WXEntryActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:exported="true"
android:taskAffinity="com.qxcm.qxlive"
android:launchMode="singleTask">
</activity>
</application>
</manifest>

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 KiB

View File

@@ -1,13 +1,9 @@
package com.qxcm.qxlive;
import android.text.TextUtils;
import com.hjq.toast.IToastInterceptor;
import com.hjq.toast.ToastUtils;
import com.qxcm.moduleutil.utils.config.EnvironmentEnum;
import com.qxcm.moduleutil.utils.config.EnvironmentPrefs;
import com.qxcm.moduleutil.widget.CommonAppConfig;
import com.qxcm.moduleutil.widget.CommonAppContext;
import com.qxcm.moduleutil.base.CommonAppContext;
/**
@@ -17,7 +13,6 @@ import com.qxcm.moduleutil.widget.CommonAppContext;
public class AppContext extends CommonAppContext {
private boolean mBeautyInited;
private EnvironmentEnum currentEnvironment;
@Override
public void onCreate() {
@@ -30,11 +25,6 @@ public class AppContext extends CommonAppContext {
// }
// });
// L.setDeBug(BuildConfig.DEBUG);
EnvironmentPrefs prefs = new EnvironmentPrefs(this);
currentEnvironment = prefs.getSelectedEnvironment();
}
public EnvironmentEnum getCurrentEnvironment() {
return currentEnvironment;
}
public static void initSdk() {
CommonAppContext context = CommonAppContext.getInstance();

View File

@@ -13,6 +13,6 @@ public final class LaunchContacter {
public interface ILoginPre extends IPresenter {
void oauthLogin(String login_token);
}
}

View File

@@ -4,6 +4,7 @@ package com.qxcm.qxlive;
import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.text.TextUtils;
import android.view.Gravity;
@@ -19,21 +20,24 @@ import com.mobile.auth.gatewayauth.PreLoginResultListener;
import com.mobile.auth.gatewayauth.ResultCode;
import com.mobile.auth.gatewayauth.TokenResultListener;
import com.mobile.auth.gatewayauth.model.TokenRet;
import com.qxcm.modulelogin.activity.ImproveInfoActivity;
import com.qxcm.modulelogin.activity.LoginActivity;
import com.qxcm.modulelogin.activity.PasswordLoginActivity;
import com.qxcm.modulemain.activity.MainActivity;
import com.qxcm.moduleutil.activity.BaseMvpActivity;
import com.qxcm.moduleutil.base.CommonAppContext;
import com.qxcm.moduleutil.bean.UserBean;
import com.qxcm.moduleutil.dialog.PolicyDialog;
import com.qxcm.moduleutil.utils.SpUtil;
import com.qxcm.moduleutil.utils.logger.Logger;
import com.qxcm.qxlive.databinding.ActivityLaunchPageBinding;
public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, ActivityLaunchPageBinding> implements LaunchContacter.View{
public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, ActivityLaunchPageBinding> implements LaunchContacter.View {
private Handler handler;
public PhoneNumberAuthHelper phoneNumberAuthHelper;
private TokenResultListener tokenResultListener;
private boolean canOnePass;
private boolean isCanOnePass=false;
private boolean isCanOnePass = true;
@Override
protected void initData() {
@@ -51,8 +55,8 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
// BaseApplication.getInstance().checkInEmulator();
// BaseApplication.getInstance().initHeartBeat();
// //延迟1.5秒执行
// handler.postDelayed(runnable, 100);
initLogin();
handler.postDelayed(runnable, 100);
// initLogin();
} else {
PolicyDialog policyDialog = new PolicyDialog(this);
policyDialog.setCancelable(false);
@@ -82,12 +86,8 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
private void initLogin() {
if (isCanOnePass){
initQuickLogin();
checkOnePass();
}else {
startActivity(new Intent(this, MainActivity.class));
}
initQuickLogin();
checkOnePass();
}
private void checkOnePass() {
@@ -116,6 +116,7 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
isRoot();
}
}
private void isRoot() {
runOnUiThread(new Runnable() {
@Override
@@ -156,18 +157,20 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
}
} else {
Logger.e("SplashEnd", "ARouters.MAIN");
// UserBean userBean = MyApplication.getInstance().getUser();
// if (userBean.getSex() == 0) {
// Intent intent = new Intent(this, ImproveInfoActivity.class);
// intent.putExtra("nickname", String.format("用户%s", userBean.getUser_code()));
// intent.putExtra("user_no_parent", userBean.getUser_no_parent());
// startActivity(intent);
// } else {
// startActivity(new Intent(this, MainActivity.class));
// }
UserBean userBean = CommonAppContext.getInstance().getUser();
if (userBean.getSex() == 0) {
Intent intent = new Intent(this, ImproveInfoActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("userBean", userBean);
intent.putExtras(bundle);
startActivity(intent);
} else {
startActivity(new Intent(this, MainActivity.class));
}
finish();
}
}
private void doOnePass() {
AuthUIConfig authUIConfig = new AuthUIConfig.Builder()
//导航栏
@@ -237,6 +240,7 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
phoneNumberAuthHelper.setAuthUIConfig(authUIConfig);
phoneNumberAuthHelper.getLoginToken(getApplicationContext(), 5000);
}
private void initQuickLogin() {
tokenResultListener = new TokenResultListener() {
@Override
@@ -252,7 +256,8 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
phoneNumberAuthHelper.hideLoginLoading();
//获取成功 dimiss就去登录、登录成功
phoneNumberAuthHelper.quitLoginPage();
// MvpPre.oauthLogin(null, tokenRet.getToken(), 4);
LogUtils.e("@@@",tokenRet.getToken());
MvpPre.oauthLogin(tokenRet.getToken());
}
} catch (Exception e) {
go2Login();
@@ -277,20 +282,22 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
};
try {
phoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(getApplicationContext(),tokenResultListener);
phoneNumberAuthHelper = PhoneNumberAuthHelper.getInstance(getApplicationContext(), null);
phoneNumberAuthHelper.getReporter().setLoggerEnable(true);
LogUtils.e("initAuthSDK", ((AppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
// phoneNumberAuthHelper.setAuthSDKInfo("6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=");
phoneNumberAuthHelper.setAuthSDKInfo(((AppContext) getApplication()).getCurrentEnvironment().getALI_AUTH_KEY());
phoneNumberAuthHelper.checkEnvAvailable(2);
} catch (Throwable ignored) {
Logger.e("initAuthSDK", ignored);
}
}
private void go2Login() {
startActivity(new Intent(this, PasswordLoginActivity.class));
finish();
}
@Override
protected int getLayoutId() {
return R.layout.activity_launch_page;
@@ -298,7 +305,7 @@ public class LaunchPageActivity extends BaseMvpActivity<LaunchPresenter, Activit
@Override
protected LaunchPresenter bindPresenter() {
return new LaunchPresenter( this,this);
return new LaunchPresenter(this, this);
}

View File

@@ -1,13 +1,83 @@
package com.qxcm.qxlive;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.blankj.utilcode.util.ToastUtils;
import com.qxcm.modulelogin.activity.ImproveInfoActivity;
import com.qxcm.modulelogin.activity.SwitchAccountsActivity;
import com.qxcm.modulemain.activity.MainActivity;
import com.qxcm.moduleutil.activity.IPresenter;
import com.qxcm.qxlive.presenter.BasePresenter;
import com.qxcm.moduleutil.base.CommonAppContext;
import com.qxcm.moduleutil.bean.UserBean;
import com.qxcm.moduleutil.http.BaseObserver;
import com.qxcm.moduleutil.presenter.BasePresenter;
import java.util.List;
import io.reactivex.disposables.Disposable;
public class LaunchPresenter extends BasePresenter<LaunchContacter.View> implements LaunchContacter.ILoginPre {
public LaunchPresenter(LaunchContacter.View view, Context context) {
super(view, context);
}
@Override
public void oauthLogin(String login_token) {
api.oauthLogin(login_token, new BaseObserver<List<UserBean>>() {
@Override
public void onSubscribe(Disposable d) {
addDisposable(d);
}
@Override
public void onNext(List<UserBean> userBeans) {
loginSuccess(userBeans);
}
});
}
public void loginSuccess(List<UserBean> userBean) {
if (userBean==null) {
ToastUtils.showShort("登录失败请重试");
return;
}
if (userBean.size()==1) {
CommonAppContext.getInstance().setUser(userBean.get(0));
// PreferencesUtils.putString( CommonAppContext.getInstance(), "mobile", userBean.get());
if (isViewAttach()) {
// MvpRef.get().disLoadings();
}
if (userBean.get(0).getSex() == 0) {
try {
Intent intent = new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), ImproveInfoActivity.class);
Bundle bundle = new Bundle();
bundle.putSerializable("userBean", userBean.get(0));
intent.putExtras(bundle);
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
} else {
com.blankj.utilcode.util.ActivityUtils.startActivity(MainActivity.class);
}
}else {
Intent intent=new Intent(com.blankj.utilcode.util.ActivityUtils.getTopActivity(), SwitchAccountsActivity.class);
Bundle bundle=new Bundle();
bundle.putSerializable("userBean", userBean.get(0));
intent.putExtras(bundle);
com.blankj.utilcode.util.ActivityUtils.startActivity(intent);
}
// EventBus.getDefault().post(new LoginFinishEvent());
// EventBus.getDefault().post(new SplashFinishEvent());
// AppLog.setUserUniqueID(userBean.getUser_id()); // 设置您自己的账号体系ID, 并保证其唯一性
}
}

View File

@@ -0,0 +1,233 @@
package com.qxcm.qxlive.wxapi;
import android.app.Activity;
import android.os.Bundle;
import com.blankj.utilcode.util.ToastUtils;
import com.qxcm.moduleutil.base.CommonAppContext;
import com.tencent.mm.opensdk.modelbase.BaseReq;
import com.tencent.mm.opensdk.modelbase.BaseResp;
import com.tencent.mm.opensdk.openapi.IWXAPI;
import com.tencent.mm.opensdk.openapi.IWXAPIEventHandler;
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import org.greenrobot.eventbus.EventBus;
public class WXEntryActivity extends Activity implements IWXAPIEventHandler{
// private static String TAG = "MicroMsg.WXEntryActivity";
//
// private IWXAPI api;
// private MyHandler handler;
//
// private static class MyHandler extends Handler {
// private final WeakReference<WXEntryActivity> wxEntryActivityWeakReference;
//
// public MyHandler(WXEntryActivity wxEntryActivity){
// wxEntryActivityWeakReference = new WeakReference<WXEntryActivity>(wxEntryActivity);
// }
//
// @Override
// public void handleMessage(Message msg) {
// int tag = msg.what;
// switch (tag) {
// case 0: {
// Bundle data = msg.getData();
// JSONObject json = null;
// try {
// json = new JSONObject(data.getString("result"));
// String openId, accessToken, refreshToken, scope;
// openId = json.getString("openid");
// accessToken = json.getString("access_token");
// refreshToken = json.getString("refresh_token");
// scope = json.getString("scope");
//// Intent intent = new Intent(wxEntryActivityWeakReference.get(), SendToWXActivity.class);
//// intent.putExtra("openId", openId);
//// intent.putExtra("accessToken", accessToken);
//// intent.putExtra("refreshToken", refreshToken);
//// intent.putExtra("scope", scope);
//// wxEntryActivityWeakReference.get().startActivity(intent);
// } catch (JSONException e) {
// Log.e(TAG, e.getMessage());
// }
// }
// }
// }
// }
//
// @Override
// public void onCreate(Bundle savedInstanceState) {
// super.onCreate(savedInstanceState);
//
// api = WXAPIFactory.createWXAPI(this, CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId(), false);
// handler = new MyHandler(this);
//
// try {
// Intent intent = getIntent();
// api.handleIntent(intent, this);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// @Override
// protected void onNewIntent(Intent intent) {
// super.onNewIntent(intent);
//
// setIntent(intent);
// api.handleIntent(intent, this);
// }
//
// @Override
// public void onReq(BaseReq req) {
// switch (req.getType()) {
// case ConstantsAPI.COMMAND_GETMESSAGE_FROM_WX:
//// goToGetMsg();
// break;
// case ConstantsAPI.COMMAND_SHOWMESSAGE_FROM_WX:
//// goToShowMsg((ShowMessageFromWX.Req) req);
// break;
// default:
// break;
// }
// finish();
// }
//
// @Override
// public void onResp(BaseResp resp) {
// int result = 0;
//
// switch (resp.errCode) {
// case BaseResp.ErrCode.ERR_OK:
//// result = com.qxcm.moduleutil.R.string.errcode_success;
// break;
// case BaseResp.ErrCode.ERR_USER_CANCEL:
//// result = R.string.errcode_cancel;
// break;
// case BaseResp.ErrCode.ERR_AUTH_DENIED:
//// result = R.string.errcode_deny;
// break;
// case BaseResp.ErrCode.ERR_UNSUPPORT:
//// result = R.string.errcode_unsupported;
// break;
// default:
//// result = R.string.errcode_unknown;
// break;
// }
//
// Toast.makeText(this, getString(result) + ", type=" + resp.getType(), Toast.LENGTH_SHORT).show();
//
//
// if (resp.getType() == ConstantsAPI.COMMAND_SUBSCRIBE_MESSAGE) {
// SubscribeMessage.Resp subscribeMsgResp = (SubscribeMessage.Resp) resp;
// String text = String.format("openid=%s\ntemplate_id=%s\nscene=%d\naction=%s\nreserved=%s",
// subscribeMsgResp.openId, subscribeMsgResp.templateID, subscribeMsgResp.scene, subscribeMsgResp.action, subscribeMsgResp.reserved);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_LAUNCH_WX_MINIPROGRAM) {
// WXLaunchMiniProgram.Resp launchMiniProgramResp = (WXLaunchMiniProgram.Resp) resp;
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s",
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_VIEW) {
// WXOpenBusinessView.Resp launchMiniProgramResp = (WXOpenBusinessView.Resp) resp;
// String text = String.format("openid=%s\nextMsg=%s\nerrStr=%s\nbusinessType=%s",
// launchMiniProgramResp.openId, launchMiniProgramResp.extMsg,launchMiniProgramResp.errStr,launchMiniProgramResp.businessType);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_OPEN_BUSINESS_WEBVIEW) {
// WXOpenBusinessWebview.Resp response = (WXOpenBusinessWebview.Resp) resp;
// String text = String.format("businessType=%d\nresultInfo=%s\nret=%d",response.businessType,response.resultInfo,response.errCode);
//
// Toast.makeText(this, text, Toast.LENGTH_LONG).show();
// }
//
// if (resp.getType() == ConstantsAPI.COMMAND_SENDAUTH) {
// SendAuth.Resp authResp = (SendAuth.Resp)resp;
// final String code = authResp.code;
//// NetworkUtil.sendWxAPI(handler, String.format("https://api.weixin.qq.com/sns/oauth2/access_token?" +
//// "appid=%s&secret=%s&code=%s&grant_type=authorization_code", "wxd930ea5d5a258f4f",
//// "1d6d1d57a3dd063b36d917bc0b44d964", code), NetworkUtil.GET_TOKEN);
// }
// finish();
// }
//
//// private void goToGetMsg() {
//// Intent intent = new Intent(this, GetFromWXActivity.class);
//// intent.putExtras(getIntent());
//// startActivity(intent);
//// finish();
//// }
////
//// private void goToShowMsg(ShowMessageFromWX.Req showReq) {
//// WXMediaMessage wxMsg = showReq.message;
//// WXAppExtendObject obj = (WXAppExtendObject) wxMsg.mediaObject;
////
//// StringBuffer msg = new StringBuffer();
//// msg.append("description: ");
//// msg.append(wxMsg.description);
//// msg.append("\n");
//// msg.append("extInfo: ");
//// msg.append(obj.extInfo);
//// msg.append("\n");
//// msg.append("filePath: ");
//// msg.append(obj.filePath);
////
//// Intent intent = new Intent(this, ShowFromWXActivity.class);
//// intent.putExtra(Constants.ShowMsgActivity.STitle, wxMsg.title);
//// intent.putExtra(Constants.ShowMsgActivity.SMessage, msg.toString());
//// intent.putExtra(Constants.ShowMsgActivity.BAThumbData, wxMsg.thumbData);
//// startActivity(intent);
//// finish();
//// }
private final String TAG = this.getClass().getSimpleName();
public static final String APP_ID = CommonAppContext.getInstance().getCurrentEnvironment().getWxAppId();
public static final String APP_SECRET = "请自己填写";
private IWXAPI mApi;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mApi = WXAPIFactory.createWXAPI(this, APP_ID, true);
mApi.handleIntent(this.getIntent(), this);
}
//微信发送的请求将回调到onReq方法
@Override
public void onReq(BaseReq baseReq) {
}
//发送到微信请求的响应结果
@Override
public void onResp(BaseResp resp) {
switch (resp.errCode) {
case BaseResp.ErrCode.ERR_OK:
//发送成功
ToastUtils.showShort("发送成功",resp.transaction);
EventBus.getDefault().post(resp);
break;
case BaseResp.ErrCode.ERR_USER_CANCEL:
//发送取消
ToastUtils.showShort("发送取消",resp);
break;
case BaseResp.ErrCode.ERR_AUTH_DENIED:
ToastUtils.showShort("发送被拒绝",resp);
//发送被拒绝
break;
default:
//发送返回
break;
}
finish();
}
}

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

View File

@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@color/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -1,5 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
<string name="app_name">Vespa</string>
<string name="recommend_skip">Skip</string>
<string name="a_067">Click to jump to third-party applications</string>
</resources>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#FFFFFF</color>
</resources>

View File

@@ -1,5 +1,5 @@
<resources>
<string name="app_name" translatable="false">羽声</string>
<string name="recommend_skip">跳过</string>
<string name="a_067">点击跳转第三方应用</string>
</resources>