version:1.5.8
fix: update:更换图标,增加护眼模式,增加幼儿模式
@@ -25,4 +25,6 @@ interface IGetInfoInterface {
|
||||
String getAppUsedStatistics();
|
||||
//获取应用市场app
|
||||
List<String> getAdminApp();
|
||||
//写入系统数据
|
||||
boolean putSecureInt(String key, int value);
|
||||
}
|
||||
|
||||
@@ -1,19 +1,15 @@
|
||||
package com.uiui.zyos.activity.main;
|
||||
|
||||
import android.app.role.RoleManager;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.BroadcastReceiver;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Configuration;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Process;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
@@ -53,8 +49,6 @@ import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executor;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@@ -254,14 +248,21 @@ public class MainActivity extends BaseActivity implements MainContact.MainView,
|
||||
cl_4.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
Intent intent = new Intent(Settings.ACTION_SETTINGS);
|
||||
startActivity(intent);
|
||||
// Intent intent = new Intent(Settings.ACTION_SETTINGS);
|
||||
// startActivity(intent);
|
||||
int activated = Settings.Secure.getInt(getContentResolver(), Settings.Secure.NIGHT_DISPLAY_ACTIVATED, 0);
|
||||
if (RemoteManager.getInstance().putSecureInt(Settings.Secure.NIGHT_DISPLAY_ACTIVATED, activated == 0 ? 1 : 0)) {
|
||||
Log.e(TAG, "onClick: putSecureInt successfully");
|
||||
} else {
|
||||
Log.e(TAG, "onClick: putSecureInt failed");
|
||||
}
|
||||
}
|
||||
});
|
||||
cl_5.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
OpenApkUtils.getInstance().openApp("com.android.gallery3d");
|
||||
// OpenApkUtils.getInstance().openApp("com.android.gallery3d");
|
||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_YOUER_PACKAGE_NAME, JxwPackageConfig.JXW_YOUER_CLASS_NAME);
|
||||
}
|
||||
});
|
||||
cl_6.setOnClickListener(new View.OnClickListener() {
|
||||
|
||||
@@ -8,7 +8,6 @@ import android.os.Looper;
|
||||
import android.util.Log;
|
||||
|
||||
import com.alibaba.sdk.android.push.CloudPushService;
|
||||
import com.alibaba.sdk.android.push.CommonCallback;
|
||||
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
|
||||
import com.arialyy.aria.core.Aria;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
@@ -48,6 +47,7 @@ public class BaseApplication extends Application {
|
||||
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
||||
PushManager.init(this);
|
||||
aliyunPushInit();
|
||||
|
||||
RemoteManager.init(this);
|
||||
RemoteManager.setListener(new RemoteManager.ConnectedListener() {
|
||||
@Override
|
||||
@@ -84,18 +84,18 @@ public class BaseApplication extends Application {
|
||||
PushServiceFactory.init(this);
|
||||
final CloudPushService pushService = PushServiceFactory.getCloudPushService();
|
||||
pushService.setLogLevel(CloudPushService.LOG_DEBUG);
|
||||
pushService.register(this, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String response) {
|
||||
Log.e("AliyunPush", "init cloudchannel success");
|
||||
Log.e("AliyunPush", "init cloudchannel success " + pushService.getDeviceId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMessage) {
|
||||
Log.e("AliyunPush", "init cloudchannel failed -- errorcode:" + errorCode + " -- errorMessage:" + errorMessage);
|
||||
}
|
||||
});
|
||||
// pushService.register(this, new CommonCallback() {
|
||||
// @Override
|
||||
// public void onSuccess(String response) {
|
||||
// Log.e("AliyunPush", "init cloudchannel success");
|
||||
// Log.e("AliyunPush", "init cloudchannel success " + pushService.getDeviceId());
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onFailed(String errorCode, String errorMessage) {
|
||||
// Log.e("AliyunPush", "init cloudchannel failed -- errorcode:" + errorCode + " -- errorMessage:" + errorMessage);
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
private void catchException() {
|
||||
|
||||
29
app/src/main/java/com/uiui/zyos/bean/StudyStatBean.java
Normal file
@@ -0,0 +1,29 @@
|
||||
package com.uiui.zyos.bean;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParser;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class StudyStatBean implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5373574945126624447L;
|
||||
|
||||
String study_exceed;
|
||||
|
||||
public String getStudy_exceed() {
|
||||
return study_exceed;
|
||||
}
|
||||
|
||||
public void setStudy_exceed(String study_exceed) {
|
||||
this.study_exceed = study_exceed;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonParser.parseString(new Gson().toJson(this)).getAsJsonObject().toString();
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,14 @@ package com.uiui.zyos.fragment.english;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.uiui.zyos.R;
|
||||
import com.uiui.zyos.base.BaseFragment;
|
||||
import com.uiui.zyos.dialog.EnglishBasicsDialog;
|
||||
@@ -156,7 +155,7 @@ public class EnglishFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onClickListener4() {
|
||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_GRAMMAR_PACKAGE_NAME, JxwPackageConfig.JXW_Grammar_CLASS_NAME);
|
||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_GRAMMAR_PACKAGE_NAME, JxwPackageConfig.JXW_GRAMMAR_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -166,7 +165,7 @@ public class EnglishFragment extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public void onClickListener6() {
|
||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_Conjunctions_PACKAGE_NAME, JxwPackageConfig.JXW_Conjunctions_CLASS_NAME);
|
||||
OpenApkUtils.getInstance().openAppWithoutArgs(JxwPackageConfig.JXW_CONJUNCTIONS_PACKAGE_NAME, JxwPackageConfig.JXW_CONJUNCTIONS_CLASS_NAME);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.uiui.zyos.base.BaseView;
|
||||
import com.uiui.zyos.bean.BaseResponse;
|
||||
import com.uiui.zyos.bean.DesktopIcon;
|
||||
import com.uiui.zyos.bean.SnInfo;
|
||||
import com.uiui.zyos.bean.StudyStatBean;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -14,6 +15,7 @@ public class UserContact {
|
||||
public interface Presenter extends BasePresenter<UserView> {
|
||||
/*获取设备信息*/
|
||||
void getSnInfo();
|
||||
void getStudyStat();
|
||||
void getQrCode();
|
||||
void getInstalledApp();
|
||||
void getAppUsedStatistics();
|
||||
@@ -21,6 +23,7 @@ public class UserContact {
|
||||
|
||||
public interface UserView extends BaseView {
|
||||
void setSnInfo(BaseResponse<SnInfo> response);
|
||||
void setStudyStat(StudyStatBean studyStat);
|
||||
void setQrCode(Bitmap bitmap);
|
||||
void setInstalledApp( ArrayList<DesktopIcon> desktopIcons);
|
||||
void setAppUsedStatistics(long time);
|
||||
|
||||
@@ -35,6 +35,7 @@ import com.uiui.zyos.base.BaseFragment;
|
||||
import com.uiui.zyos.bean.BaseResponse;
|
||||
import com.uiui.zyos.bean.DesktopIcon;
|
||||
import com.uiui.zyos.bean.SnInfo;
|
||||
import com.uiui.zyos.bean.StudyStatBean;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zyos.dialog.SingleDialog;
|
||||
import com.uiui.zyos.jxw.JxwPackageConfig;
|
||||
@@ -387,7 +388,7 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
||||
} else {
|
||||
tv_grade.setText(grade);
|
||||
}
|
||||
tv_percent.setText(snInfo.getStudy_time_ranking() + "%");
|
||||
// tv_percent.setText(snInfo.getStudy_time_ranking() + "%");
|
||||
tv_duration.setText(String.format(getString(R.string.today_study_time), TimeUtils.formatTime(snInfo.getStudy_time())));
|
||||
|
||||
cl_nodata.setVisibility(View.GONE);
|
||||
@@ -419,9 +420,18 @@ public class UserFragment extends BaseFragment implements UserContact.UserView {
|
||||
}
|
||||
}
|
||||
setButtonVisibility();
|
||||
|
||||
mPresenter.getStudyStat();
|
||||
mPresenter.getQrCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStudyStat(StudyStatBean studyStat) {
|
||||
if (studyStat != null) {
|
||||
tv_percent.setText(studyStat.getStudy_exceed() + "%");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setQrCode(Bitmap bitmap) {
|
||||
iv_device_qrcode.setImageBitmap(bitmap);
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.util.Log;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiui.zyos.BuildConfig;
|
||||
import com.uiui.zyos.R;
|
||||
@@ -14,6 +15,7 @@ import com.uiui.zyos.bean.AppUsed;
|
||||
import com.uiui.zyos.bean.BaseResponse;
|
||||
import com.uiui.zyos.bean.DesktopIcon;
|
||||
import com.uiui.zyos.bean.SnInfo;
|
||||
import com.uiui.zyos.bean.StudyStatBean;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zyos.disklrucache.CacheHelper;
|
||||
import com.uiui.zyos.manager.AppManager;
|
||||
@@ -30,6 +32,7 @@ import java.util.function.Predicate;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
|
||||
@@ -96,6 +99,40 @@ public class UserPresenter implements UserContact.Presenter {
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getStudyStat() {
|
||||
NetInterfaceManager.getInstance().getStudyStatObservable()
|
||||
.compose(RxLifecycle.bindUntilEvent(lifecycle, FragmentEvent.DESTROY))
|
||||
.subscribe(new Observer<BaseResponse<StudyStatBean>>() {
|
||||
@Override
|
||||
public void onSubscribe(@NonNull Disposable d) {
|
||||
Log.e("getStudyStat", "onSubscribe: ");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(@NonNull BaseResponse<StudyStatBean> studyStatBeanBaseResponse) {
|
||||
Log.e("getStudyStat", "onNext: " + studyStatBeanBaseResponse);
|
||||
if (studyStatBeanBaseResponse.code==200){
|
||||
StudyStatBean studyStatBean = studyStatBeanBaseResponse.data;
|
||||
mView.setStudyStat(studyStatBean);
|
||||
}else {
|
||||
mView.setStudyStat(null);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(@NonNull Throwable e) {
|
||||
Log.e("getStudyStat", "onError: " + e.getMessage());
|
||||
onComplete();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
Log.e("getStudyStat", "onComplete: ");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getQrCode() {
|
||||
String encryptString = CXAESUtil.encrypt(CommonConfig.AES_KEY, RemoteManager.getInstance().getSerial());
|
||||
|
||||
@@ -9,7 +9,7 @@ public class JxwPackageConfig {
|
||||
public static final String JXW_VIDEO_PACKAGE_NAME = "com.jxw.newyouer.video";
|
||||
public static final String JXW_VIDEO_CLASS_NAME = "com.jxw.newyouer.activity.ExecellentActivity";
|
||||
public static final String JXW_COMPOSITION_CLASS_NAME = "com.jxw.newyouer.activity.SpecialVideoActivity";
|
||||
public static final String JXW_Quality_CLASS_NAME = "com.jxw.newyouer.activity.QualityActivity";
|
||||
public static final String JXW_QUALITY_CLASS_NAME = "com.jxw.newyouer.activity.QualityActivity";
|
||||
|
||||
/*同步辅导*/
|
||||
public static final String JXW_TUTORING_PACKAGE_NAME = "com.jxw.online_study";
|
||||
@@ -80,11 +80,15 @@ public class JxwPackageConfig {
|
||||
public static final String JXW_LETTER_CLASS_NAME = "com.jxw.mskt.video.VideoTopicActivity";
|
||||
/*薄冰语法*/
|
||||
public static final String JXW_GRAMMAR_PACKAGE_NAME = "com.jxw.online_study";
|
||||
public static final String JXW_Grammar_CLASS_NAME = "com.jxw.online_study.activity.BobingGrammarActivity";
|
||||
public static final String JXW_GRAMMAR_CLASS_NAME = "com.jxw.online_study.activity.BobingGrammarActivity";
|
||||
/*连词成句*/
|
||||
public static final String JXW_Conjunctions_PACKAGE_NAME = "com.jxw.liancichengju";
|
||||
public static final String JXW_Conjunctions_CLASS_NAME = "com.jxw.liancichengju.MainActivity";
|
||||
public static final String JXW_CONJUNCTIONS_PACKAGE_NAME = "com.jxw.liancichengju";
|
||||
public static final String JXW_CONJUNCTIONS_CLASS_NAME = "com.jxw.liancichengju.MainActivity";
|
||||
/*智能语音*/
|
||||
public static final String JXW_VOICE_PACKAGE_NAME = "com.iflytek.cyber.iot.show.core";
|
||||
public static final String JXW_VOICE_CLASS_NAME = "com.iflytek.cyber.iot.show.core.EvsLauncherActivity";
|
||||
/*幼儿平台*/
|
||||
public static final String JXW_YOUER_PACKAGE_NAME = "com.jxw.youer.video";
|
||||
public static final String JXW_YOUER_CLASS_NAME = "com.jxw.youer.activity.MainActivity";
|
||||
|
||||
}
|
||||
@@ -17,10 +17,9 @@ import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
import com.tencent.mmkv.MMKV;
|
||||
import com.uiui.zyos.BuildConfig;
|
||||
import com.uiui.zy.IGetInfoInterface;
|
||||
import com.uiui.zyos.bean.MapBean;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zy.IGetInfoInterface;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
@@ -135,35 +134,46 @@ public class RemoteManager {
|
||||
}
|
||||
|
||||
public void aliyunPushInit() {
|
||||
if (TextUtils.isEmpty(getSerial())) {
|
||||
String sn = getSerial();
|
||||
if (TextUtils.isEmpty(sn)) {
|
||||
Log.e(TAG, "aliyunPushInit: empty");
|
||||
return;
|
||||
}
|
||||
String account = getSerial();
|
||||
CloudPushService pushService = PushServiceFactory.getCloudPushService();
|
||||
pushService.bindAccount(account, new CommonCallback() {
|
||||
pushService.register(mContext, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.e("AliyunPush", "bind account " + account + " success\n");
|
||||
public void onSuccess(String response) {
|
||||
Log.e("AliyunPush", "init cloudchannel success");
|
||||
Log.e("AliyunPush", "init cloudchannel success " + pushService.getDeviceId());
|
||||
pushService.bindAccount(sn, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.e("AliyunPush", "bind account " + sn + " success\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMsg) {
|
||||
Log.e("AliyunPush", "bind account " + sn + " failed." +
|
||||
"errorCode: " + errorCode + ", errorMsg:" + errorMsg);
|
||||
}
|
||||
});
|
||||
pushService.addAlias(sn, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.e("AliyunPush", "add alias " + sn + " success\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMsg) {
|
||||
Log.e("AliyunPush", "add alias " + sn + " failed." +
|
||||
"errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMsg) {
|
||||
Log.e("AliyunPush", "bind account " + account + " failed." +
|
||||
"errorCode: " + errorCode + ", errorMsg:" + errorMsg);
|
||||
}
|
||||
});
|
||||
String alias = getSerial();
|
||||
pushService.addAlias(account, new CommonCallback() {
|
||||
@Override
|
||||
public void onSuccess(String s) {
|
||||
Log.e("AliyunPush", "add alias " + alias + " success\n");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onFailed(String errorCode, String errorMsg) {
|
||||
Log.e("AliyunPush", "add alias " + alias + " failed." +
|
||||
"errorCode: " + errorCode + ", errorMsg:" + errorMsg + "\n");
|
||||
public void onFailed(String errorCode, String errorMessage) {
|
||||
Log.e("AliyunPush", "init cloudchannel failed -- errorcode:" + errorCode + " -- errorMessage:" + errorMessage);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -312,4 +322,16 @@ public class RemoteManager {
|
||||
Set<String> packages = mMMKV.decodeStringSet(CommonConfig.ADMIN_APP_LIST, new HashSet<>());
|
||||
return new ArrayList<>(packages);
|
||||
}
|
||||
|
||||
public boolean putSecureInt(String key, int value) {
|
||||
if (mGetInfoInterface != null) {
|
||||
try {
|
||||
return mGetInfoInterface.putSecureInt(key, value);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "putSecureInt: " + e.getMessage());
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.uiui.zyos.bean.LessonApp;
|
||||
import com.uiui.zyos.bean.LessonJson;
|
||||
import com.uiui.zyos.bean.LessonSetting;
|
||||
import com.uiui.zyos.bean.SnInfo;
|
||||
import com.uiui.zyos.bean.StudyStatBean;
|
||||
import com.uiui.zyos.bean.UserAvatarInfo;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zyos.disklrucache.CacheHelper;
|
||||
@@ -29,6 +30,7 @@ import com.uiui.zyos.network.api.CloudLessonApi;
|
||||
import com.uiui.zyos.network.api.CloudLessonAppApi;
|
||||
import com.uiui.zyos.network.api.RunNewApp;
|
||||
import com.uiui.zyos.network.api.SNInfoApi;
|
||||
import com.uiui.zyos.network.api.StudyStatApi;
|
||||
import com.uiui.zyos.network.api.UpdateAlarmClockApi;
|
||||
import com.uiui.zyos.network.api.UserInfoControl;
|
||||
import com.uiui.zyos.network.interceptor.RepeatRequestInterceptor;
|
||||
@@ -46,7 +48,6 @@ import io.reactivex.rxjava3.annotations.NonNull;
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import io.reactivex.rxjava3.core.Observer;
|
||||
import io.reactivex.rxjava3.disposables.Disposable;
|
||||
import io.reactivex.rxjava3.functions.BiFunction;
|
||||
import io.reactivex.rxjava3.schedulers.Schedulers;
|
||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||
import okhttp3.Cache;
|
||||
@@ -208,6 +209,13 @@ public class NetInterfaceManager {
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
public Observable<BaseResponse<StudyStatBean>> getStudyStatObservable() {
|
||||
return mRetrofit.create(StudyStatApi.class)
|
||||
.getStudyStat(RemoteManager.getInstance().getSerial())
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread());
|
||||
}
|
||||
|
||||
/*
|
||||
*
|
||||
* execution
|
||||
|
||||
@@ -7,6 +7,8 @@ public class UrlAddress {
|
||||
public static final String SNINFO = "sn/getSnInfo";
|
||||
/*获取用户头像和信息*/
|
||||
public static final String GET_USER_AVATAR_INFO = "sn/getUserAvatarInfo";
|
||||
/*获取统计*/
|
||||
public static final String GET_STUDY_STAT = "Sn/getStudyStat";
|
||||
|
||||
/*应用使用记录*/
|
||||
public static final String APP_USAGE_RECORD = "appUsageRecord";
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.uiui.zyos.network.api;
|
||||
|
||||
import com.uiui.zyos.bean.BaseResponse;
|
||||
import com.uiui.zyos.bean.StudyStatBean;
|
||||
import com.uiui.zyos.network.UrlAddress;
|
||||
|
||||
import io.reactivex.rxjava3.core.Observable;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
public interface StudyStatApi {
|
||||
@GET(UrlAddress.GET_STUDY_STAT)
|
||||
Observable<BaseResponse<StudyStatBean>> getStudyStat(
|
||||
@Query("sn") String sn
|
||||
);
|
||||
}
|
||||
@@ -18,9 +18,7 @@ import android.util.Log;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.uiui.zyos.BuildConfig;
|
||||
import com.uiui.zyos.R;
|
||||
import com.uiui.zyos.bean.DesktopIcon;
|
||||
import com.uiui.zyos.config.CommonConfig;
|
||||
import com.uiui.zyos.manager.RemoteManager;
|
||||
import com.uiui.zyos.receiver.InstallResultReceiver;
|
||||
|
||||
@@ -382,7 +380,10 @@ public class ApkUtils {
|
||||
ComponentName cn = new ComponentName(packageName, className);
|
||||
Intent intent = new Intent();
|
||||
intent.setComponent(cn);
|
||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
//Fix for Android 13
|
||||
if (Build.VERSION.SDK_INT < 33) {
|
||||
intent.addCategory(Intent.CATEGORY_LAUNCHER);
|
||||
}
|
||||
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
|
||||
if (context != null) {
|
||||
try {
|
||||
|
||||
@@ -219,7 +219,7 @@ public class OpenApkUtils {
|
||||
return;
|
||||
}
|
||||
String packageName = JxwPackageConfig.JXW_VIDEO_PACKAGE_NAME;
|
||||
String className = JxwPackageConfig.JXW_Quality_CLASS_NAME;
|
||||
String className = JxwPackageConfig.JXW_QUALITY_CLASS_NAME;
|
||||
if (isCloudLessonMod(packageName)) {
|
||||
if (openPackageWithArgs(packageName, className, "StartArgs", "中华文化")) {
|
||||
sendRuningApp(packageName);
|
||||
|
||||
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 5.9 KiB |
BIN
app/src/main/res/drawable-hdpi/com_system_huyan.png
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/drawable-hdpi/com_system_youer.png
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 5.0 KiB After Width: | Height: | Size: 4.2 KiB |
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 9.4 KiB |
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 19 KiB |
@@ -146,6 +146,7 @@
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:visibility="gone"
|
||||
android:id="@+id/tv_activated2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="@dimen/dp_16"
|
||||
@@ -215,6 +216,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
android:background="@drawable/activation_bg"
|
||||
android:gravity="center"
|
||||
android:visibility="gone"
|
||||
android:text="学习资源下载"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_8"
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_robot"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_width="@dimen/dp_40"
|
||||
android:layout_height="@dimen/dp_40"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:layout_marginEnd="@dimen/dp_8"
|
||||
@@ -188,7 +188,7 @@
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_4"
|
||||
android:visibility="gone"
|
||||
android:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@@ -200,7 +200,7 @@
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/com_android_settings"
|
||||
android:src="@drawable/com_system_huyan"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -209,7 +209,7 @@
|
||||
android:id="@+id/tv_appname4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="设置"
|
||||
android:text="护眼模式"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_7"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon4"
|
||||
@@ -217,37 +217,6 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon4" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_5"
|
||||
android:visibility="gone"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon5"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/com_android_gallery3d_app"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="图库"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_7"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon5"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon5" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_6"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -338,6 +307,37 @@
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon8" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/cl_5"
|
||||
android:visibility="visible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_icon5"
|
||||
android:layout_width="@dimen/dp_32"
|
||||
android:layout_height="@dimen/dp_32"
|
||||
android:layout_marginStart="@dimen/dp_4"
|
||||
android:layout_marginEnd="@dimen/dp_4"
|
||||
android:adjustViewBounds="true"
|
||||
android:scaleType="centerCrop"
|
||||
android:src="@drawable/com_system_youer"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_appname5"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="幼儿模式"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_7"
|
||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon5"
|
||||
app:layout_constraintStart_toStartOf="@+id/iv_icon5"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon5" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||