update:2020.12.26
fix:增加启动页
add:
This commit is contained in:
2020-12-26 18:17:32 +08:00
parent 63cc954eb9
commit 85505851ab
11 changed files with 102 additions and 33 deletions

View File

@@ -89,9 +89,9 @@ android {
} }
newl { newl {
flavorDimensions "default" flavorDimensions "default"
// versionCode 162 versionCode 163
versionCode 1030 // versionCode 1031
versionName "1.2.2" versionName "1.2.3"
/*********************************极光推送************************************/ /*********************************极光推送************************************/
manifestPlaceholders = [ manifestPlaceholders = [
JPUSH_PKGNAME: "com.jiaoguanyi.appstore", JPUSH_PKGNAME: "com.jiaoguanyi.appstore",

View File

@@ -87,15 +87,17 @@
android:enabled="true" android:enabled="true"
android:exported="true" /> android:exported="true" />
<activity <activity android:name=".activity.HomeActivity">
android:name=".activity.MainActivity"
android:excludeFromRecents="true">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity
android:name=".activity.MainActivity"
android:excludeFromRecents="true"
android:launchMode="singleTop"/>
<service android:name=".server.MyDownloadService" /> <service android:name=".server.MyDownloadService" />
<service android:name=".server.GuardService" /> <service android:name=".server.GuardService" />

View File

@@ -0,0 +1,25 @@
package com.mjsheng.myappstore.activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import com.mjsheng.myappstore.R;
public class HomeActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_home);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
startActivity(new Intent(HomeActivity.this, MainActivity.class));
finish();
}
}, 3000);
}
}

View File

@@ -1,21 +1,16 @@
package com.mjsheng.myappstore.activity; package com.mjsheng.myappstore.activity;
import android.app.ActivityManager;
import android.app.AlertDialog; import android.app.AlertDialog;
import android.bluetooth.BluetoothAdapter; import android.bluetooth.BluetoothAdapter;
import android.content.BroadcastReceiver; import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context; import android.content.Context;
import android.content.ContextWrapper; import android.content.ContextWrapper;
import android.content.DialogInterface; import android.content.DialogInterface;
import android.content.Intent; import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageInfo; import android.content.pm.PackageInfo;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import android.os.BatteryManager; import android.os.BatteryManager;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@@ -36,12 +31,9 @@ import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
import android.widget.TextView; import android.widget.TextView;
import android.widget.Toast;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocation;
import com.amap.api.location.AMapLocationClient;
import com.amap.api.location.AMapLocationClientOption;
import com.amap.api.location.AMapLocationListener; import com.amap.api.location.AMapLocationListener;
import com.amap.api.location.AMapLocationQualityReport; import com.amap.api.location.AMapLocationQualityReport;
import com.arialyy.aria.core.Aria; import com.arialyy.aria.core.Aria;
@@ -50,7 +42,6 @@ import com.blankj.utilcode.util.EncryptUtils;
import com.blankj.utilcode.util.LogUtils; import com.blankj.utilcode.util.LogUtils;
import com.blankj.utilcode.util.PathUtils; import com.blankj.utilcode.util.PathUtils;
import com.blankj.utilcode.util.ToastUtils; import com.blankj.utilcode.util.ToastUtils;
import com.google.gson.Gson;
import com.hjq.permissions.OnPermission; import com.hjq.permissions.OnPermission;
import com.hjq.permissions.Permission; import com.hjq.permissions.Permission;
import com.hjq.permissions.XXPermissions; import com.hjq.permissions.XXPermissions;
@@ -61,31 +52,24 @@ import com.lzy.okserver.download.DownloadService;
import com.mjsheng.myappstore.BuildConfig; import com.mjsheng.myappstore.BuildConfig;
import com.mjsheng.myappstore.MyApplication; import com.mjsheng.myappstore.MyApplication;
import com.mjsheng.myappstore.R; import com.mjsheng.myappstore.R;
import com.mjsheng.myappstore.bean.CommonPicBean;
import com.mjsheng.myappstore.bean.CommonPicData;
import com.mjsheng.myappstore.bean.ForceDownloadBean; import com.mjsheng.myappstore.bean.ForceDownloadBean;
import com.mjsheng.myappstore.bean.ForceDownloadData; import com.mjsheng.myappstore.bean.ForceDownloadData;
import com.mjsheng.myappstore.bean.LzyResponse; import com.mjsheng.myappstore.bean.LzyResponse;
import com.mjsheng.myappstore.bean.NetAndLaunchBean; import com.mjsheng.myappstore.bean.NetAndLaunchBean;
import com.mjsheng.myappstore.bean.NetAndLaunchData; import com.mjsheng.myappstore.bean.NetAndLaunchData;
import com.mjsheng.myappstore.bean.StudentsInfo; import com.mjsheng.myappstore.bean.StudentsInfo;
import com.mjsheng.myappstore.bean.UploadAppInfo;
import com.mjsheng.myappstore.comm.CommonDatas; import com.mjsheng.myappstore.comm.CommonDatas;
import com.mjsheng.myappstore.jpush.TagAliasOperatorHelper; import com.mjsheng.myappstore.jpush.TagAliasOperatorHelper;
import com.mjsheng.myappstore.network.HTTPInterface; import com.mjsheng.myappstore.network.HTTPInterface;
import com.mjsheng.myappstore.network.Network; import com.mjsheng.myappstore.network.Network;
import com.mjsheng.myappstore.network.api.AppLimitApi; import com.mjsheng.myappstore.network.api.AppLimitApi;
import com.mjsheng.myappstore.network.api.BrankPicApi;
import com.mjsheng.myappstore.network.api.DeselectBrowserIDApi; import com.mjsheng.myappstore.network.api.DeselectBrowserIDApi;
import com.mjsheng.myappstore.network.api.DeselectIDApi; import com.mjsheng.myappstore.network.api.DeselectIDApi;
import com.mjsheng.myappstore.network.api.ForceDownloadApi; import com.mjsheng.myappstore.network.api.ForceDownloadApi;
import com.mjsheng.myappstore.network.api.NetAndLaunchApi; import com.mjsheng.myappstore.network.api.NetAndLaunchApi;
import com.mjsheng.myappstore.network.api.SystemSettingApi; import com.mjsheng.myappstore.network.api.SystemSettingApi;
import com.mjsheng.myappstore.network.api.UploadAppInfoApi;
import com.mjsheng.myappstore.server.InitJpushServer;
import com.mjsheng.myappstore.server.MyDownloadService; import com.mjsheng.myappstore.server.MyDownloadService;
import com.mjsheng.myappstore.utils.ApkUtils; import com.mjsheng.myappstore.utils.ApkUtils;
import com.mjsheng.myappstore.utils.CmdUtil;
import com.mjsheng.myappstore.utils.Configure; import com.mjsheng.myappstore.utils.Configure;
import com.mjsheng.myappstore.utils.ExampleUtil; import com.mjsheng.myappstore.utils.ExampleUtil;
import com.mjsheng.myappstore.utils.MySQLData; import com.mjsheng.myappstore.utils.MySQLData;
@@ -105,9 +89,6 @@ import org.lzh.framework.updatepluginlib.UpdateBuilder;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Random; import java.util.Random;
@@ -121,7 +102,6 @@ import io.reactivex.schedulers.Schedulers;
import okhttp3.Call; import okhttp3.Call;
import okhttp3.Response; import okhttp3.Response;
import okhttp3.ResponseBody; import okhttp3.ResponseBody;
import okhttp3.internal.Util;
import rx.Observable; import rx.Observable;
import rx.functions.Action1; import rx.functions.Action1;
@@ -194,7 +174,7 @@ public class MainActivity extends AppCompatActivity implements AMapLocationListe
// Utils.queryStorage(); // Utils.queryStorage();
// Utils.shotScreen(this); // Utils.shotScreen(this);
HTTPInterface.updateDeviceInfo(this); HTTPInterface.updateDeviceInfo(this);
testFilepath(); // testFilepath();
} }
private void testFilepath() { private void testFilepath() {

View File

@@ -229,7 +229,7 @@ public class GuardService extends Service {
OkGo.post(Configure.HTTP_TAG_DOWNLOAD_URL) OkGo.post(Configure.HTTP_TAG_DOWNLOAD_URL)
.params("key", Configure.HTTP_KEY) .params("key", Configure.HTTP_KEY)
.params("sn", Utils.getSerial()) .params("sn", Utils.getSerial())
.params("package", packageName) .params("package", app_package)
.tag(this) .tag(this)
.execute(new StringCallback() { .execute(new StringCallback() {
@Override @Override

View File

@@ -317,7 +317,6 @@ public class InitJpushServer extends Service {
@Override @Override
public void call(Long aLong) { public void call(Long aLong) {
checkUpdate(); checkUpdate();
getDefaultDesktop();
getLockedState();// getLockedState();//
} }
}); });
@@ -1105,7 +1104,7 @@ public class InitJpushServer extends Service {
HTTPInterface.setHomepagtag(InitJpushServer.this);//设置主页和标签 HTTPInterface.setHomepagtag(InitJpushServer.this);//设置主页和标签
HTTPInterface.setHideDesktopIcon(InitJpushServer.this);//设置桌面图标隐藏 HTTPInterface.setHideDesktopIcon(InitJpushServer.this);//设置桌面图标隐藏
// MyApplication.getInstance().getWhitePackageList(); // MyApplication.getInstance().getWhitePackageList();
getDefaultDesktop();
} }
} else if (code == -300) { } else if (code == -300) {
// ApkUtils.uninstallAllApp(InitJpushServer.this); // ApkUtils.uninstallAllApp(InitJpushServer.this);

View File

@@ -209,7 +209,7 @@ public class Configure {
//通过sn获取信息 //通过sn获取信息
public static final String SEND_SCREENSHOT = HTTP_TAG_HEAD_NEW + "Screenshot/addImg"; public static final String SEND_SCREENSHOT = HTTP_TAG_HEAD_NEW + "Screenshot/addImg";
//上传截图 //上传截图
public static final String UPDATE_DEVICEINFO = HTTP_TAG_HEAD_NEW + "Mac/getInfo"; // public static final String UPDATE_DEVICEINFO = HTTP_TAG_HEAD_NEW + "Mac/getInfo";
//上传我的设备 //上传我的设备
public final static String GET_LOCK_SCREEN_STATE = HTTP_TAG_HEAD_NEW + "Sn/getSnScreen"; public final static String GET_LOCK_SCREEN_STATE = HTTP_TAG_HEAD_NEW + "Sn/getSnScreen";
//获取霸屏状态 //获取霸屏状态

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mjsheng.myappstore.activity.MainActivity">
<ImageView
android:id="@+id/imageView"
android:layout_width="266dp"
android:layout_height="100dp"
android:layout_marginTop="80dp"
android:src="@drawable/main_logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="24dp"
android:text="版权所有@深圳市七彩宏云网络科技有限公司"
android:textColor="@color/title_textcolor"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.mjsheng.myappstore.activity.MainActivity">
<ImageView
android:id="@+id/imageView"
android:layout_width="266dp"
android:layout_height="100dp"
android:layout_marginTop="160dp"
android:src="@drawable/main_logo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="40dp"
android:textColor="@color/title_textcolor"
android:text="版权所有@深圳市七彩宏云网络科技有限公司"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@@ -1,6 +1,5 @@
#Thu Jul 05 09:38:39 CST 2018
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip