version:1.1
fix: update:增加推送
@@ -16,8 +16,8 @@ android {
|
|||||||
applicationId "com.uiui.zyos"
|
applicationId "com.uiui.zyos"
|
||||||
minSdkVersion 24
|
minSdkVersion 24
|
||||||
targetSdkVersion 29
|
targetSdkVersion 29
|
||||||
versionCode 1
|
versionCode 2
|
||||||
versionName "1.0"
|
versionName "1.1"
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@ android {
|
|||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
mtk12 {
|
mtk12 {
|
||||||
storeFile file("keystore/TeclastMTK12.jks")
|
storeFile file("keystore/tuixin.jks")
|
||||||
storePassword "123456"
|
storePassword "123456"
|
||||||
keyAlias "TeclastMTK12"
|
keyAlias "universal"
|
||||||
keyPassword "123456"
|
keyPassword "123456"
|
||||||
v2SigningEnabled false
|
v2SigningEnabled false
|
||||||
}
|
}
|
||||||
@@ -154,7 +154,10 @@ dependencies {
|
|||||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
|
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.3'
|
||||||
//MMKV
|
//MMKV
|
||||||
implementation 'com.tencent:mmkv-static:1.2.14'
|
implementation 'com.tencent:mmkv-static:1.2.14'
|
||||||
|
//腾讯移动推送 TPNS
|
||||||
implementation 'com.tencent.tpns:tpns:1.3.7.0-release'
|
implementation 'com.tencent.tpns:tpns:1.3.7.0-release'
|
||||||
|
//阿里云推送
|
||||||
|
implementation 'com.aliyun.ams:alicloud-android-push:3.8.0'
|
||||||
//状态栏透明
|
//状态栏透明
|
||||||
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
implementation 'com.gitee.zackratos:UltimateBarX:0.8.0'
|
||||||
//指示器
|
//指示器
|
||||||
|
|||||||
BIN
app/keystore/tuixin.jks
Normal file
@@ -251,7 +251,7 @@
|
|||||||
android:exported="true"
|
android:exported="true"
|
||||||
tools:replace="android:exported" /> <!-- 【可选】APP实现的Receiver,用于接收消息透传和操作结果的回调,请根据需要添加 -->
|
tools:replace="android:exported" /> <!-- 【可选】APP实现的Receiver,用于接收消息透传和操作结果的回调,请根据需要添加 -->
|
||||||
<!-- YOUR_PACKAGE_PATH.CustomPushReceiver需要改为自己的Receiver: -->
|
<!-- YOUR_PACKAGE_PATH.CustomPushReceiver需要改为自己的Receiver: -->
|
||||||
<receiver android:name=".tpush.MessageReceiver">
|
<receiver android:name=".push.tpush.MessageReceiver">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
||||||
<!-- 接收消息透传 -->
|
<!-- 接收消息透传 -->
|
||||||
@@ -259,7 +259,8 @@
|
|||||||
<!-- 监听注册、反注册、设置/删除标签、通知被点击等处理结果 -->
|
<!-- 监听注册、反注册、设置/删除标签、通知被点击等处理结果 -->
|
||||||
<action android:name="com.tencent.android.xg.vip.action.FEEDBACK" />
|
<action android:name="com.tencent.android.xg.vip.action.FEEDBACK" />
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</receiver> <!-- MQTT START -->
|
</receiver>
|
||||||
|
<!-- MQTT START -->
|
||||||
<service
|
<service
|
||||||
android:name="com.tencent.tpns.mqttchannel.services.MqttService"
|
android:name="com.tencent.tpns.mqttchannel.services.MqttService"
|
||||||
android:exported="false"
|
android:exported="false"
|
||||||
@@ -268,7 +269,38 @@
|
|||||||
<provider
|
<provider
|
||||||
android:name="com.tencent.tpns.baseapi.base.SettingsContentProvider"
|
android:name="com.tencent.tpns.baseapi.base.SettingsContentProvider"
|
||||||
android:authorities="${applicationId}.XG_SETTINGS_PROVIDER"
|
android:authorities="${applicationId}.XG_SETTINGS_PROVIDER"
|
||||||
android:exported="false" /> <!-- MQTT END -->
|
android:exported="false" />
|
||||||
|
<!-- MQTT END -->
|
||||||
|
|
||||||
|
<!-- 消息接收监听器 (用户可自主扩展) -->
|
||||||
|
<receiver
|
||||||
|
android:name=".push.alipush.AliyunMessageReceiver"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
||||||
|
</intent-filter>
|
||||||
|
</receiver>
|
||||||
|
|
||||||
|
<service
|
||||||
|
android:name=".push.alipush.AliMessageIntentService"
|
||||||
|
android:exported="false">
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
|
||||||
|
</intent-filter>
|
||||||
|
<intent-filter>
|
||||||
|
<action android:name="com.alibaba.sdk.android.push.RECEIVE" />
|
||||||
|
</intent-filter>
|
||||||
|
</service>
|
||||||
|
|
||||||
<!-- 【必须】 请修改为 APP 的 AccessId,“15”开头的10位数字,中间没空格 -->
|
<!-- 【必须】 请修改为 APP 的 AccessId,“15”开头的10位数字,中间没空格 -->
|
||||||
<meta-data
|
<meta-data
|
||||||
android:name="XG_V2_ACCESS_ID"
|
android:name="XG_V2_ACCESS_ID"
|
||||||
@@ -276,6 +308,14 @@
|
|||||||
<meta-data
|
<meta-data
|
||||||
android:name="XG_V2_ACCESS_KEY"
|
android:name="XG_V2_ACCESS_KEY"
|
||||||
android:value="AZZXANJF4HBD" />
|
android:value="AZZXANJF4HBD" />
|
||||||
</application>
|
|
||||||
|
|
||||||
|
<!-- 请填写你自己的- appKey -->
|
||||||
|
<meta-data
|
||||||
|
android:name="com.alibaba.app.appkey"
|
||||||
|
android:value="333816243" />
|
||||||
|
<!-- 请填写你自己的appSecret -->
|
||||||
|
<meta-data
|
||||||
|
android:name="com.alibaba.app.appsecret"
|
||||||
|
android:value="ab5ffe213b1d449fb624d4a6e8ea7275" />
|
||||||
|
</application>
|
||||||
</manifest>
|
</manifest>
|
||||||
@@ -7,8 +7,8 @@ import com.trello.rxlifecycle4.android.ActivityEvent;
|
|||||||
|
|
||||||
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||||
|
|
||||||
public class MainPresenter implements MainContact.Presenter {
|
public class MainAPresenter implements MainContact.Presenter {
|
||||||
private static final String TAG = MainPresenter.class.getSimpleName();
|
private static final String TAG = MainAPresenter.class.getSimpleName();
|
||||||
private MainContact.MainView mView;
|
private MainContact.MainView mView;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
|
|
||||||
@@ -22,9 +22,9 @@ public class MainPresenter implements MainContact.Presenter {
|
|||||||
return lifecycle;
|
return lifecycle;
|
||||||
}
|
}
|
||||||
|
|
||||||
MainPresenter(Context context) {
|
MainAPresenter(Context context) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
Log.e(TAG, "MainPresenter: " + context.getClass());
|
Log.e(TAG, "MainAPresenter: " + context.getClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -8,7 +8,6 @@ import android.content.Intent;
|
|||||||
import android.content.IntentFilter;
|
import android.content.IntentFilter;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.graphics.Color;
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.provider.Settings;
|
import android.provider.Settings;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
@@ -20,27 +19,16 @@ import androidx.fragment.app.Fragment;
|
|||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import androidx.viewpager.widget.ViewPager;
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
import com.flyco.tablayout.SlidingTabLayout;
|
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
import com.uiui.zyos.BuildConfig;
|
|
||||||
import com.uiui.zyos.R;
|
import com.uiui.zyos.R;
|
||||||
import com.uiui.zyos.base.BaseActivity;
|
import com.uiui.zyos.base.BaseActivity;
|
||||||
import com.uiui.zyos.base.BaseFragmentPagerAdapter;
|
import com.uiui.zyos.base.BaseFragmentPagerAdapter;
|
||||||
import com.uiui.zyos.config.CommonConfig;
|
|
||||||
import com.uiui.zyos.dialog.PrivacyPolicyDialog;
|
import com.uiui.zyos.dialog.PrivacyPolicyDialog;
|
||||||
import com.uiui.zyos.fragment.biology.BiologyFragment;
|
import com.uiui.zyos.fragment.main.MainFragment;
|
||||||
import com.uiui.zyos.fragment.chemical.ChemicalFragment;
|
import com.uiui.zyos.fragment.user.UserFragment;
|
||||||
import com.uiui.zyos.fragment.chinese.ChineseFragment;
|
|
||||||
import com.uiui.zyos.fragment.english.EnglishFragment;
|
|
||||||
import com.uiui.zyos.fragment.math.MathFragment;
|
|
||||||
import com.uiui.zyos.fragment.physics.PhysicsFragment;
|
|
||||||
import com.uiui.zyos.service.NotificationService;
|
import com.uiui.zyos.service.NotificationService;
|
||||||
import com.uiui.zyos.utils.HomeWatcher;
|
import com.uiui.zyos.utils.HomeWatcher;
|
||||||
import com.uiui.zyos.utils.ToastUtil;
|
import com.uiui.zyos.utils.ToastUtil;
|
||||||
import com.uiui.zyos.view.ScaleCircleNavigator;
|
|
||||||
|
|
||||||
import net.lucode.hackware.magicindicator.MagicIndicator;
|
|
||||||
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -51,29 +39,21 @@ import butterknife.ButterKnife;
|
|||||||
public class MainActivity extends BaseActivity implements MainContact.MainView {
|
public class MainActivity extends BaseActivity implements MainContact.MainView {
|
||||||
private static final String TAG = MainActivity.class.getSimpleName();
|
private static final String TAG = MainActivity.class.getSimpleName();
|
||||||
|
|
||||||
@BindView(R.id.main_sliding_tab_layout)
|
|
||||||
SlidingTabLayout main_sliding_tab_layout;
|
|
||||||
@BindView(R.id.viewPager)
|
@BindView(R.id.viewPager)
|
||||||
ViewPager mViewPager;
|
ViewPager mViewPager;
|
||||||
@BindView(R.id.magicIndicator)
|
|
||||||
MagicIndicator mMagicIndicator;
|
|
||||||
|
|
||||||
private MainPresenter mMainPresenter;
|
private MMKV mMMKV = MMKV.defaultMMKV();
|
||||||
|
|
||||||
private ScaleCircleNavigator scaleCircleNavigator;
|
private MainAPresenter mMainAPresenter;
|
||||||
|
private HomeWatcher mHomeWatcher;
|
||||||
|
|
||||||
private FragmentManager mFragmentManager;
|
private FragmentManager mFragmentManager;
|
||||||
// private FragmentTransaction mFragmentTransaction;
|
// private FragmentTransaction mFragmentTransaction;
|
||||||
private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
||||||
|
|
||||||
private List<Fragment> mFragments;
|
private List<Fragment> mFragments;
|
||||||
|
|
||||||
private int defaultCurrent = 0;
|
private int defaultCurrent = 1;
|
||||||
private String[] title = new String[]{"语文","数学","英语","物理","化学","生物","其他",};
|
|
||||||
|
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
|
||||||
|
|
||||||
private HomeWatcher mHomeWatcher;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getLayoutId() {
|
public int getLayoutId() {
|
||||||
@@ -84,9 +64,9 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
public void initView() {
|
public void initView() {
|
||||||
ButterKnife.bind(this);
|
ButterKnife.bind(this);
|
||||||
toggleNotificationListenerService(this);
|
toggleNotificationListenerService(this);
|
||||||
mMainPresenter = new MainPresenter(this);
|
mMainAPresenter = new MainAPresenter(this);
|
||||||
mMainPresenter.attachView(this);
|
mMainAPresenter.attachView(this);
|
||||||
mMainPresenter.setLifecycle(lifecycleSubject);
|
mMainAPresenter.setLifecycle(lifecycleSubject);
|
||||||
|
|
||||||
mFragmentManager = getSupportFragmentManager();
|
mFragmentManager = getSupportFragmentManager();
|
||||||
// mFragmentTransaction = mFragmentManager.beginTransaction();
|
// mFragmentTransaction = mFragmentManager.beginTransaction();
|
||||||
@@ -95,39 +75,18 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
||||||
// fragmentTransaction.commit();
|
// fragmentTransaction.commit();
|
||||||
|
|
||||||
mFragments.add(new ChineseFragment());
|
mFragments.add(new UserFragment());
|
||||||
mFragments.add(new MathFragment());
|
mFragments.add(new MainFragment());
|
||||||
mFragments.add(new EnglishFragment());
|
|
||||||
mFragments.add(new PhysicsFragment());
|
|
||||||
mFragments.add(new ChemicalFragment());
|
|
||||||
mFragments.add(new BiologyFragment());
|
|
||||||
mFragments.add(new ChineseFragment());
|
|
||||||
|
|
||||||
scaleCircleNavigator = new ScaleCircleNavigator(this);
|
|
||||||
scaleCircleNavigator.setCircleCount(mFragments.size());
|
|
||||||
scaleCircleNavigator.setNormalCircleColor(Color.DKGRAY);
|
|
||||||
scaleCircleNavigator.setSelectedCircleColor(Color.LTGRAY);
|
|
||||||
scaleCircleNavigator.setCircleClickListener(new ScaleCircleNavigator.OnCircleClickListener() {
|
|
||||||
@Override
|
|
||||||
public void onClick(int index) {
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||||
mViewPager.setOffscreenPageLimit(4);
|
mViewPager.setOffscreenPageLimit(1);
|
||||||
mMagicIndicator.setNavigator(scaleCircleNavigator);
|
mViewPager.setCurrentItem(defaultCurrent);
|
||||||
ViewPagerHelper.bind(mMagicIndicator, mViewPager);
|
|
||||||
if (mFragments.size() > 1) {
|
|
||||||
mViewPager.setCurrentItem(defaultCurrent);
|
|
||||||
}
|
|
||||||
main_sliding_tab_layout.setViewPager(mViewPager,title);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void initData() {
|
public void initData() {
|
||||||
registmNewAppReceiver();
|
registmNewAppReceiver();
|
||||||
registerSOSNumberReceiver();
|
|
||||||
registerUpdateDesktopReceiver();
|
registerUpdateDesktopReceiver();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,13 +186,10 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
super.onDestroy();
|
||||||
mMainPresenter.detachView();
|
mMainAPresenter.detachView();
|
||||||
if (mNewAppReceiver != null) {
|
if (mNewAppReceiver != null) {
|
||||||
unregisterReceiver(mNewAppReceiver);
|
unregisterReceiver(mNewAppReceiver);
|
||||||
}
|
}
|
||||||
if (sosNumberReceiver != null) {
|
|
||||||
unregisterReceiver(sosNumberReceiver);
|
|
||||||
}
|
|
||||||
if (updateDesktopReceiver != null) {
|
if (updateDesktopReceiver != null) {
|
||||||
unregisterReceiver(updateDesktopReceiver);
|
unregisterReceiver(updateDesktopReceiver);
|
||||||
}
|
}
|
||||||
@@ -372,29 +328,6 @@ public class MainActivity extends BaseActivity implements MainContact.MainView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private SOSNumberReceiver sosNumberReceiver;
|
|
||||||
|
|
||||||
private void registerSOSNumberReceiver() {
|
|
||||||
if (sosNumberReceiver == null) {
|
|
||||||
sosNumberReceiver = new SOSNumberReceiver();
|
|
||||||
}
|
|
||||||
IntentFilter filter = new IntentFilter();
|
|
||||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
|
||||||
filter.addAction("setting_sos");
|
|
||||||
registerReceiver(sosNumberReceiver, filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
static class SOSNumberReceiver extends BroadcastReceiver {
|
|
||||||
@Override
|
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
Log.e(TAG, "onReceive: " + intent.getAction());
|
|
||||||
String setting_sos = intent.getStringExtra("setting_sos");
|
|
||||||
if (TextUtils.isEmpty(setting_sos)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private UpdateDesktopReceiver updateDesktopReceiver;
|
private UpdateDesktopReceiver updateDesktopReceiver;
|
||||||
|
|
||||||
private void registerUpdateDesktopReceiver() {
|
private void registerUpdateDesktopReceiver() {
|
||||||
|
|||||||
@@ -6,6 +6,9 @@ import android.os.Handler;
|
|||||||
import android.os.Looper;
|
import android.os.Looper;
|
||||||
import android.util.Log;
|
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.arialyy.aria.core.Aria;
|
||||||
import com.tencent.android.tpush.XGIOperateCallback;
|
import com.tencent.android.tpush.XGIOperateCallback;
|
||||||
import com.tencent.android.tpush.XGPushConfig;
|
import com.tencent.android.tpush.XGPushConfig;
|
||||||
@@ -15,6 +18,7 @@ import com.uiui.zyos.BuildConfig;
|
|||||||
import com.uiui.zyos.manager.ConnectManager;
|
import com.uiui.zyos.manager.ConnectManager;
|
||||||
import com.uiui.zyos.manager.RemoteManager;
|
import com.uiui.zyos.manager.RemoteManager;
|
||||||
import com.uiui.zyos.network.NetInterfaceManager;
|
import com.uiui.zyos.network.NetInterfaceManager;
|
||||||
|
import com.uiui.zyos.push.PushManager;
|
||||||
import com.uiui.zyos.service.main.MainService;
|
import com.uiui.zyos.service.main.MainService;
|
||||||
import com.uiui.zyos.utils.SystemUtils;
|
import com.uiui.zyos.utils.SystemUtils;
|
||||||
import com.uiui.zyos.utils.Utils;
|
import com.uiui.zyos.utils.Utils;
|
||||||
@@ -41,8 +45,11 @@ public class BaseApplication extends Application {
|
|||||||
Aria.init(this);
|
Aria.init(this);
|
||||||
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
Aria.get(this).getDownloadConfig().setMaxTaskNum(1);
|
||||||
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
Aria.get(this).getDownloadConfig().setConvertSpeed(true);
|
||||||
|
PushManager.init(this);
|
||||||
tpushInit();
|
tpushInit();
|
||||||
|
aliyunPushInit();
|
||||||
RemoteManager.init(this);
|
RemoteManager.init(this);
|
||||||
|
RemoteManager.getInstance().aliyunPushInit();
|
||||||
ConnectManager.init(this);
|
ConnectManager.init(this);
|
||||||
NetInterfaceManager.init(this);
|
NetInterfaceManager.init(this);
|
||||||
startService(new Intent(this, MainService.class));
|
startService(new Intent(this, MainService.class));
|
||||||
@@ -57,7 +64,7 @@ public class BaseApplication extends Application {
|
|||||||
//token在设备卸载重装的时候有可能会变
|
//token在设备卸载重装的时候有可能会变
|
||||||
Log.e("TPush", "注册成功,设备token为:" + data);
|
Log.e("TPush", "注册成功,设备token为:" + data);
|
||||||
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
||||||
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), RemoteManager.getInstance().getSerial()));
|
||||||
XGPushManager.upsertAccounts(getApplicationContext(), accountInfoList, new XGIOperateCallback() {
|
XGPushManager.upsertAccounts(getApplicationContext(), accountInfoList, new XGIOperateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object data, int flag) {
|
public void onSuccess(Object data, int flag) {
|
||||||
@@ -78,6 +85,23 @@ public class BaseApplication extends Application {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void aliyunPushInit() {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void catchException() {
|
private void catchException() {
|
||||||
Thread.setDefaultUncaughtExceptionHandler(
|
Thread.setDefaultUncaughtExceptionHandler(
|
||||||
|
|||||||
@@ -5,17 +5,19 @@ import java.io.Serializable;
|
|||||||
public class UserAvatarInfo implements Serializable {
|
public class UserAvatarInfo implements Serializable {
|
||||||
private static final long serialVersionUID = 7700643058775210597L;
|
private static final long serialVersionUID = 7700643058775210597L;
|
||||||
|
|
||||||
String username;
|
|
||||||
String avatar;
|
|
||||||
String gread;
|
|
||||||
int id;
|
int id;
|
||||||
|
String avatar;
|
||||||
|
String mobile;
|
||||||
|
String sn_name;
|
||||||
|
String class_name;
|
||||||
|
String username;
|
||||||
|
|
||||||
public String getUsername() {
|
public int getId() {
|
||||||
return username;
|
return id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setUsername(String username) {
|
public void setId(int id) {
|
||||||
this.username = username;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAvatar() {
|
public String getAvatar() {
|
||||||
@@ -26,19 +28,35 @@ public class UserAvatarInfo implements Serializable {
|
|||||||
this.avatar = avatar;
|
this.avatar = avatar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getGread() {
|
public String getMobile() {
|
||||||
return gread;
|
return mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setGread(String gread) {
|
public void setMobile(String mobile) {
|
||||||
this.gread = gread;
|
this.mobile = mobile;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId() {
|
public String getSn_name() {
|
||||||
return id;
|
return sn_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setId(int id) {
|
public void setSn_name(String sn_name) {
|
||||||
this.id = id;
|
this.sn_name = sn_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClass_name() {
|
||||||
|
return class_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClass_name(String class_name) {
|
||||||
|
this.class_name = class_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,11 @@ import com.uiui.zyos.base.BasePresenter;
|
|||||||
import com.uiui.zyos.base.BaseView;
|
import com.uiui.zyos.base.BaseView;
|
||||||
|
|
||||||
public class ChineseContact {
|
public class ChineseContact {
|
||||||
public interface Presenter extends BasePresenter<CustomView> {
|
public interface Presenter extends BasePresenter<ChineseView> {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface CustomView extends BaseView {
|
public interface ChineseView extends BaseView {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,6 @@ import com.blankj.utilcode.util.NetworkUtils;
|
|||||||
import com.uiui.zyos.R;
|
import com.uiui.zyos.R;
|
||||||
import com.uiui.zyos.base.BaseFragment;
|
import com.uiui.zyos.base.BaseFragment;
|
||||||
import com.uiui.zyos.manager.RemoteManager;
|
import com.uiui.zyos.manager.RemoteManager;
|
||||||
import com.uiui.zyos.tpush.MessageReceiver;
|
|
||||||
import com.uiui.zyos.utils.Utils;
|
import com.uiui.zyos.utils.Utils;
|
||||||
|
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -34,7 +33,7 @@ import butterknife.ButterKnife;
|
|||||||
* Use the {@link ChineseFragment#newInstance} factory method to
|
* Use the {@link ChineseFragment#newInstance} factory method to
|
||||||
* create an instance of this fragment.
|
* create an instance of this fragment.
|
||||||
*/
|
*/
|
||||||
public class ChineseFragment extends BaseFragment implements ChineseContact.CustomView, NetworkUtils.OnNetworkStatusChangedListener {
|
public class ChineseFragment extends BaseFragment implements ChineseContact.ChineseView, NetworkUtils.OnNetworkStatusChangedListener {
|
||||||
private static final String TAG = ChineseFragment.class.getSimpleName();
|
private static final String TAG = ChineseFragment.class.getSimpleName();
|
||||||
|
|
||||||
|
|
||||||
@@ -121,7 +120,6 @@ public class ChineseFragment extends BaseFragment implements ChineseContact.Cust
|
|||||||
private void initView() {
|
private void initView() {
|
||||||
Log.e(TAG, "initView: " + Utils.getBatteryLevel(mContext));
|
Log.e(TAG, "initView: " + Utils.getBatteryLevel(mContext));
|
||||||
registerBatteryReceiver();
|
registerBatteryReceiver();
|
||||||
registerAlarmClockReceiver();
|
|
||||||
registTimeReceiver();
|
registTimeReceiver();
|
||||||
mContext.registerReceiver(mbatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
mContext.registerReceiver(mbatteryReceiver, new IntentFilter(Intent.ACTION_BATTERY_CHANGED));
|
||||||
}
|
}
|
||||||
@@ -149,26 +147,6 @@ public class ChineseFragment extends BaseFragment implements ChineseContact.Cust
|
|||||||
private void initAmap() {
|
private void initAmap() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerAlarmClockReceiver() {
|
|
||||||
if (null == mAlarmClockReceiver) {
|
|
||||||
mAlarmClockReceiver = new AlarmClockReceiver();
|
|
||||||
}
|
|
||||||
IntentFilter filter = new IntentFilter();
|
|
||||||
filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
|
|
||||||
filter.addAction(MessageReceiver.SET_ALARMCLOCK);
|
|
||||||
mContext.registerReceiver(mAlarmClockReceiver, filter);
|
|
||||||
}
|
|
||||||
|
|
||||||
private AlarmClockReceiver mAlarmClockReceiver;
|
|
||||||
|
|
||||||
private class AlarmClockReceiver extends BroadcastReceiver {
|
|
||||||
@Override
|
|
||||||
public void onReceive(Context context, Intent intent) {
|
|
||||||
String action = intent.getAction();
|
|
||||||
Log.e(TAG, "onReceive: " + action);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void registerBatteryReceiver() {
|
private void registerBatteryReceiver() {
|
||||||
if (null == batteryReceiver) {
|
if (null == batteryReceiver) {
|
||||||
batteryReceiver = new BatteryReceiver();
|
batteryReceiver = new BatteryReceiver();
|
||||||
@@ -286,9 +264,6 @@ public class ChineseFragment extends BaseFragment implements ChineseContact.Cust
|
|||||||
if (mbatteryReceiver != null) {
|
if (mbatteryReceiver != null) {
|
||||||
mContext.unregisterReceiver(mbatteryReceiver);
|
mContext.unregisterReceiver(mbatteryReceiver);
|
||||||
}
|
}
|
||||||
if (mAlarmClockReceiver != null) {
|
|
||||||
mContext.unregisterReceiver(mAlarmClockReceiver);
|
|
||||||
}
|
|
||||||
unRegistTimeReceiver();
|
unRegistTimeReceiver();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
|||||||
public class ChinesePresenter implements ChineseContact.Presenter {
|
public class ChinesePresenter implements ChineseContact.Presenter {
|
||||||
private static final String TAG = ChinesePresenter.class.getSimpleName();
|
private static final String TAG = ChinesePresenter.class.getSimpleName();
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ChineseContact.CustomView mView;
|
private ChineseContact.ChineseView mView;
|
||||||
|
|
||||||
public ChinesePresenter(Context context) {
|
public ChinesePresenter(Context context) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
@@ -27,7 +27,7 @@ public class ChinesePresenter implements ChineseContact.Presenter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void attachView(@NonNull ChineseContact.CustomView view) {
|
public void attachView(@NonNull ChineseContact.ChineseView view) {
|
||||||
this.mView = view;
|
this.mView = view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package com.uiui.zyos.fragment.main;
|
||||||
|
|
||||||
|
import com.uiui.zyos.base.BasePresenter;
|
||||||
|
import com.uiui.zyos.base.BaseView;
|
||||||
|
|
||||||
|
public class MainContact {
|
||||||
|
public interface Presenter extends BasePresenter<MainView> {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface MainView extends BaseView {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package com.uiui.zyos.fragment.main;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
|
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.annotations.NonNull;
|
||||||
|
import io.reactivex.rxjava3.subjects.BehaviorSubject;
|
||||||
|
|
||||||
|
public class MainFPresenter implements MainContact.Presenter {
|
||||||
|
private static final String TAG = MainFPresenter.class.getSimpleName();
|
||||||
|
private Context mContext;
|
||||||
|
private MainContact.MainView mView;
|
||||||
|
|
||||||
|
public MainFPresenter(Context context) {
|
||||||
|
this.mContext = context;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BehaviorSubject<FragmentEvent> lifecycle;
|
||||||
|
|
||||||
|
void setLifecycle(BehaviorSubject<FragmentEvent> lifecycle) {
|
||||||
|
this.lifecycle = lifecycle;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BehaviorSubject<FragmentEvent> getLifecycle() {
|
||||||
|
return lifecycle;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void attachView(@NonNull MainContact.MainView view) {
|
||||||
|
this.mView = view;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void detachView() {
|
||||||
|
this.mView = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
159
app/src/main/java/com/uiui/zyos/fragment/main/MainFragment.java
Normal file
@@ -0,0 +1,159 @@
|
|||||||
|
package com.uiui.zyos.fragment.main;
|
||||||
|
|
||||||
|
import android.app.Activity;
|
||||||
|
import android.graphics.Color;
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
import androidx.viewpager.widget.ViewPager;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.flyco.tablayout.SlidingTabLayout;
|
||||||
|
import com.uiui.zyos.R;
|
||||||
|
import com.uiui.zyos.base.BaseFragment;
|
||||||
|
import com.uiui.zyos.base.BaseFragmentPagerAdapter;
|
||||||
|
import com.uiui.zyos.fragment.biology.BiologyFragment;
|
||||||
|
import com.uiui.zyos.fragment.chemical.ChemicalFragment;
|
||||||
|
import com.uiui.zyos.fragment.chinese.ChineseFragment;
|
||||||
|
import com.uiui.zyos.fragment.english.EnglishFragment;
|
||||||
|
import com.uiui.zyos.fragment.math.MathFragment;
|
||||||
|
import com.uiui.zyos.fragment.physics.PhysicsFragment;
|
||||||
|
import com.uiui.zyos.view.ScaleCircleNavigator;
|
||||||
|
|
||||||
|
import net.lucode.hackware.magicindicator.MagicIndicator;
|
||||||
|
import net.lucode.hackware.magicindicator.ViewPagerHelper;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import butterknife.BindView;
|
||||||
|
import butterknife.ButterKnife;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link MainFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class MainFragment extends BaseFragment implements MainContact.MainView {
|
||||||
|
|
||||||
|
@BindView(R.id.main_sliding_tab_layout)
|
||||||
|
SlidingTabLayout main_sliding_tab_layout;
|
||||||
|
@BindView(R.id.viewPager)
|
||||||
|
ViewPager mViewPager;
|
||||||
|
@BindView(R.id.magicIndicator)
|
||||||
|
MagicIndicator mMagicIndicator;
|
||||||
|
|
||||||
|
private MainFPresenter mPresenter;
|
||||||
|
|
||||||
|
private View rootView;
|
||||||
|
private FragmentActivity mContext;
|
||||||
|
private ScaleCircleNavigator scaleCircleNavigator;
|
||||||
|
private FragmentManager mFragmentManager;
|
||||||
|
// private FragmentTransaction mFragmentTransaction;
|
||||||
|
private BaseFragmentPagerAdapter mBaseFragmentPagerAdapter;
|
||||||
|
private List<Fragment> mFragments;
|
||||||
|
private int defaultCurrent = 0;
|
||||||
|
private String[] title = new String[]{"语文", "数学", "英语", "物理", "化学", "生物", "其他",};
|
||||||
|
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public MainFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment MainFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static MainFragment newInstance(String param1, String param2) {
|
||||||
|
MainFragment fragment = new MainFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
rootView = inflater.inflate(R.layout.fragment_main, container, false);
|
||||||
|
mContext = (FragmentActivity) rootView.getContext();
|
||||||
|
mPresenter = new MainFPresenter(mContext);
|
||||||
|
ButterKnife.bind(this, rootView);
|
||||||
|
initView();
|
||||||
|
return rootView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void fetchData() {
|
||||||
|
initData();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initView() {
|
||||||
|
mFragmentManager = getChildFragmentManager();
|
||||||
|
// mFragmentTransaction = mFragmentManager.beginTransaction();
|
||||||
|
mFragments = new ArrayList<>();
|
||||||
|
mBaseFragmentPagerAdapter = new BaseFragmentPagerAdapter(mFragmentManager, mFragments);
|
||||||
|
// fragmentTransaction.add(R.id.viewPager, appListFragment);
|
||||||
|
// fragmentTransaction.commit();
|
||||||
|
mFragments.add(new ChineseFragment());
|
||||||
|
mFragments.add(new MathFragment());
|
||||||
|
mFragments.add(new EnglishFragment());
|
||||||
|
mFragments.add(new PhysicsFragment());
|
||||||
|
mFragments.add(new ChemicalFragment());
|
||||||
|
mFragments.add(new BiologyFragment());
|
||||||
|
mFragments.add(new ChineseFragment());
|
||||||
|
|
||||||
|
scaleCircleNavigator = new ScaleCircleNavigator(mContext);
|
||||||
|
scaleCircleNavigator.setCircleCount(mFragments.size());
|
||||||
|
scaleCircleNavigator.setNormalCircleColor(Color.DKGRAY);
|
||||||
|
scaleCircleNavigator.setSelectedCircleColor(Color.LTGRAY);
|
||||||
|
scaleCircleNavigator.setCircleClickListener(new ScaleCircleNavigator.OnCircleClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(int index) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
mViewPager.setAdapter(mBaseFragmentPagerAdapter);
|
||||||
|
mViewPager.setOffscreenPageLimit(4);
|
||||||
|
mMagicIndicator.setNavigator(scaleCircleNavigator);
|
||||||
|
ViewPagerHelper.bind(mMagicIndicator, mViewPager);
|
||||||
|
if (mFragments.size() > 1) {
|
||||||
|
mViewPager.setCurrentItem(defaultCurrent);
|
||||||
|
}
|
||||||
|
main_sliding_tab_layout.setViewPager(mViewPager, title);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initData() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.uiui.zyos.fragment.user;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
|
||||||
|
import android.view.LayoutInflater;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
|
||||||
|
import com.uiui.zyos.R;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A simple {@link Fragment} subclass.
|
||||||
|
* Use the {@link UserFragment#newInstance} factory method to
|
||||||
|
* create an instance of this fragment.
|
||||||
|
*/
|
||||||
|
public class UserFragment extends Fragment {
|
||||||
|
// TODO: Rename parameter arguments, choose names that match
|
||||||
|
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
|
||||||
|
private static final String ARG_PARAM1 = "param1";
|
||||||
|
private static final String ARG_PARAM2 = "param2";
|
||||||
|
|
||||||
|
// TODO: Rename and change types of parameters
|
||||||
|
private String mParam1;
|
||||||
|
private String mParam2;
|
||||||
|
|
||||||
|
public UserFragment() {
|
||||||
|
// Required empty public constructor
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Use this factory method to create a new instance of
|
||||||
|
* this fragment using the provided parameters.
|
||||||
|
*
|
||||||
|
* @param param1 Parameter 1.
|
||||||
|
* @param param2 Parameter 2.
|
||||||
|
* @return A new instance of fragment UserFragment.
|
||||||
|
*/
|
||||||
|
// TODO: Rename and change types and number of parameters
|
||||||
|
public static UserFragment newInstance(String param1, String param2) {
|
||||||
|
UserFragment fragment = new UserFragment();
|
||||||
|
Bundle args = new Bundle();
|
||||||
|
args.putString(ARG_PARAM1, param1);
|
||||||
|
args.putString(ARG_PARAM2, param2);
|
||||||
|
fragment.setArguments(args);
|
||||||
|
return fragment;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
if (getArguments() != null) {
|
||||||
|
mParam1 = getArguments().getString(ARG_PARAM1);
|
||||||
|
mParam2 = getArguments().getString(ARG_PARAM2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public View onCreateView(LayoutInflater inflater, ViewGroup container,
|
||||||
|
Bundle savedInstanceState) {
|
||||||
|
// Inflate the layout for this fragment
|
||||||
|
return inflater.inflate(R.layout.fragment_user, container, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -9,6 +9,9 @@ import android.os.IBinder;
|
|||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
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.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
@@ -45,6 +48,7 @@ public class RemoteManager {
|
|||||||
mGetInfoInterface = IGetInfoInterface.Stub.asInterface(service);
|
mGetInfoInterface = IGetInfoInterface.Stub.asInterface(service);
|
||||||
getLocation();
|
getLocation();
|
||||||
Log.e(TAG, "onServiceConnected: " + getSerial());
|
Log.e(TAG, "onServiceConnected: " + getSerial());
|
||||||
|
aliyunPushInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -72,6 +76,36 @@ public class RemoteManager {
|
|||||||
return sInstance;
|
return sInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void aliyunPushInit() {
|
||||||
|
CloudPushService pushService = PushServiceFactory.getCloudPushService();
|
||||||
|
String account = getSerial();
|
||||||
|
pushService.bindAccount(account, new CommonCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(String s) {
|
||||||
|
Log.e("AliyunPush", "bind account " + account + " success\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");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private void bindInfoService() {
|
private void bindInfoService() {
|
||||||
if (mGetInfoInterface == null) {
|
if (mGetInfoInterface == null) {
|
||||||
//这是连接aidl服务的代码
|
//这是连接aidl服务的代码
|
||||||
@@ -96,7 +130,7 @@ public class RemoteManager {
|
|||||||
} else {
|
} else {
|
||||||
bindInfoService();
|
bindInfoService();
|
||||||
}
|
}
|
||||||
return "unknown";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getLocation() {
|
public void getLocation() {
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.uiui.zyos.network;
|
package com.uiui.zyos.network;
|
||||||
|
|
||||||
public class UrlAddress {
|
public class UrlAddress {
|
||||||
public static final String ROOT_URL = "https://led.zuoyepad.com/android/";
|
public static final String ROOT_URL = "https://led.aolelearn.com/android/";
|
||||||
|
|
||||||
|
|
||||||
|
/*设备信息接口*/
|
||||||
|
public static final String SNINFO = "sn/getSnInfo";
|
||||||
|
/*获取用户头像和信息*/
|
||||||
|
public static final String GET_USER_AVATAR_INFO = "sn/getUserAvatarInfo";
|
||||||
}
|
}
|
||||||
|
|||||||
16
app/src/main/java/com/uiui/zyos/network/api/SNInfoApi.java
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
package com.uiui.zyos.network.api;
|
||||||
|
|
||||||
|
import com.uiui.zyos.bean.BaseResponse;
|
||||||
|
import com.uiui.zyos.bean.SnInfo;
|
||||||
|
import com.uiui.zyos.network.UrlAddress;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.GET;
|
||||||
|
import retrofit2.http.Query;
|
||||||
|
|
||||||
|
public interface SNInfoApi {
|
||||||
|
@GET(UrlAddress.SNINFO)
|
||||||
|
Observable<BaseResponse<SnInfo>> getsninfo(
|
||||||
|
@Query("sn") String sn
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.uiui.zyos.network.api;
|
||||||
|
|
||||||
|
import com.uiui.zyos.bean.BaseResponse;
|
||||||
|
import com.uiui.zyos.bean.UserAvatarInfo;
|
||||||
|
import com.uiui.zyos.network.UrlAddress;
|
||||||
|
|
||||||
|
import io.reactivex.rxjava3.core.Observable;
|
||||||
|
import retrofit2.http.Field;
|
||||||
|
import retrofit2.http.FormUrlEncoded;
|
||||||
|
import retrofit2.http.POST;
|
||||||
|
|
||||||
|
public interface UserInfoControl {
|
||||||
|
@FormUrlEncoded
|
||||||
|
@POST(UrlAddress.GET_USER_AVATAR_INFO)
|
||||||
|
Observable<BaseResponse<UserAvatarInfo>> getUserAvatarInfo(
|
||||||
|
@Field("sn") String sn
|
||||||
|
);
|
||||||
|
}
|
||||||
60
app/src/main/java/com/uiui/zyos/push/PushManager.java
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
package com.uiui.zyos.push;
|
||||||
|
|
||||||
|
import android.annotation.SuppressLint;
|
||||||
|
import android.content.ContentResolver;
|
||||||
|
import android.content.Context;
|
||||||
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.uiui.zyos.disklrucache.CacheHelper;
|
||||||
|
import com.uiui.zyos.utils.ToastUtil;
|
||||||
|
|
||||||
|
public class PushManager {
|
||||||
|
private static final String TAG = PushManager.class.getSimpleName();
|
||||||
|
|
||||||
|
public static final String SET_ALARMCLOCK = "zuoyeos.action.change.alarmclaock";
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressLint("StaticFieldLeak")
|
||||||
|
private static PushManager sInstance;
|
||||||
|
private Context mContext;
|
||||||
|
private ContentResolver mResolver;
|
||||||
|
private CacheHelper mCacheHelper;
|
||||||
|
|
||||||
|
private PushManager(Context context) {
|
||||||
|
if (context == null) {
|
||||||
|
throw new RuntimeException("Context is NULL");
|
||||||
|
}
|
||||||
|
this.mContext = context;
|
||||||
|
this.mResolver = context.getContentResolver();
|
||||||
|
this.mCacheHelper = new CacheHelper(context);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void init(Context context) {
|
||||||
|
if (sInstance == null) {
|
||||||
|
sInstance = new PushManager(context);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PushManager getInstance() {
|
||||||
|
if (sInstance == null) {
|
||||||
|
throw new IllegalStateException("You must be init PushManager first");
|
||||||
|
}
|
||||||
|
return sInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
//闹钟
|
||||||
|
private static final String JIGUANG_ALARM_CLOCK = "57";
|
||||||
|
|
||||||
|
public void setPushContent(String title, String extras) {
|
||||||
|
switch (title) {
|
||||||
|
case JIGUANG_ALARM_CLOCK:
|
||||||
|
ToastUtil.betaShow("收到推送消息: 设置闹钟");
|
||||||
|
Intent intent = new Intent(SET_ALARMCLOCK);
|
||||||
|
mContext.sendBroadcast(intent);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
package com.uiui.zyos.push.alipush;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.alibaba.sdk.android.push.AliyunMessageIntentService;
|
||||||
|
import com.alibaba.sdk.android.push.notification.CPushMessage;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Created by liyazhou on 17/8/22.
|
||||||
|
* 为避免推送广播被系统拦截的小概率事件,我们推荐用户通过IntentService处理消息互调,接入步骤:
|
||||||
|
* 1. 创建IntentService并继承AliyunMessageIntentService
|
||||||
|
* 2. 覆写相关方法,并在Manifest的注册该Service
|
||||||
|
* 3. 调用接口CloudPushService.setPushIntentService
|
||||||
|
* 详细用户可参考:https://help.aliyun.com/document_detail/30066.html#h2-2-messagereceiver-aliyunmessageintentservice
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class AliMessageIntentService extends AliyunMessageIntentService {
|
||||||
|
private static final String TAG = AliyunMessageIntentService.class.getSimpleName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送通知的回调方法
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotification(Context context, String title, String summary, Map<String, String> extraMap) {
|
||||||
|
Log.i(TAG, "收到一条推送通知 : " + title + ", summary:" + summary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送消息的回调方法
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param cPushMessage
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onMessage(Context context, CPushMessage cPushMessage) {
|
||||||
|
Log.i(TAG, "收到一条推送消息 : " + cPushMessage.getTitle() + ", content:" + cPushMessage.getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从通知栏打开通知的扩展处理
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationOpened(Context context, String title, String summary, String extraMap) {
|
||||||
|
Log.i(TAG, "onNotificationOpened : " + " : " + title + " : " + summary + " : " + extraMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无动作通知点击回调。当在后台或阿里云控制台指定的通知动作为无逻辑跳转时,通知点击回调为onNotificationClickedWithNoAction而不是onNotificationOpened
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationClickedWithNoAction(Context context, String title, String summary, String extraMap) {
|
||||||
|
Log.i(TAG, "onNotificationClickedWithNoAction : " + " : " + title + " : " + summary + " : " + extraMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知删除回调
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param messageId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationRemoved(Context context, String messageId) {
|
||||||
|
Log.i(TAG, "onNotificationRemoved : " + messageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用处于前台时通知到达回调。注意:该方法仅对自定义样式通知有效,相关详情请参考https://help.aliyun.com/document_detail/30066.html#h3-3-4-basiccustompushnotification-api
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
* @param openType
|
||||||
|
* @param openActivity
|
||||||
|
* @param openUrl
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationReceivedInApp(Context context, String title, String summary, Map<String, String> extraMap, int openType, String openActivity, String openUrl) {
|
||||||
|
Log.i(TAG, "onNotificationReceivedInApp : " + " : " + title + " : " + summary + " " + extraMap + " : " + openType + " : " + openActivity + " : " + openUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.uiui.zyos.push.alipush;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.alibaba.sdk.android.push.MessageReceiver;
|
||||||
|
import com.alibaba.sdk.android.push.notification.CPushMessage;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import com.google.gson.JsonParser;
|
||||||
|
import com.uiui.zyos.push.PushManager;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author: 正纬
|
||||||
|
* @since: 15/4/9
|
||||||
|
* @version: 1.1
|
||||||
|
* @feature: 用于接收推送的通知和消息
|
||||||
|
*/
|
||||||
|
public class AliyunMessageReceiver extends MessageReceiver {
|
||||||
|
// 消息接收部分的LOG_TAG
|
||||||
|
public static final String TAG = AliyunMessageReceiver.class.getSimpleName();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送通知的回调方法
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onNotification(Context context, String title, String summary, Map<String, String> extraMap) {
|
||||||
|
// TODO 处理推送通知
|
||||||
|
if (null != extraMap) {
|
||||||
|
for (Map.Entry<String, String> entry : extraMap.entrySet()) {
|
||||||
|
Log.i(TAG, "@Get diy param : Key=" + entry.getKey() + " , Value=" + entry.getValue());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Log.i(TAG, "@收到通知 && 自定义消息为空");
|
||||||
|
}
|
||||||
|
Log.i(TAG, "收到一条推送通知 : " + title + ", summary:" + summary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 应用处于前台时通知到达回调。注意:该方法仅对自定义样式通知有效,相关详情请参考https://help.aliyun.com/document_detail/30066.html?spm=5176.product30047.6.620.wjcC87#h3-3-4-basiccustompushnotification-api
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
* @param openType
|
||||||
|
* @param openActivity
|
||||||
|
* @param openUrl
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationReceivedInApp(Context context, String title, String summary, Map<String, String> extraMap, int openType, String openActivity, String openUrl) {
|
||||||
|
Log.i(TAG, "onNotificationReceivedInApp : " + " : " + title + " : " + summary + " " + extraMap + " : " + openType + " : " + openActivity + " : " + openUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推送消息的回调方法
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param cPushMessage
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onMessage(Context context, CPushMessage cPushMessage) {
|
||||||
|
Log.e(TAG, "收到一条推送消息 : " + cPushMessage.getTitle() + ", content:" + cPushMessage.getContent());
|
||||||
|
String title = cPushMessage.getTitle();
|
||||||
|
String content = cPushMessage.getContent();
|
||||||
|
JsonObject extrasJson = JsonParser.parseString(content).getAsJsonObject();
|
||||||
|
String extras = "";
|
||||||
|
if (extrasJson.get("extras") != null) {
|
||||||
|
extras = extrasJson.get("extras").toString();
|
||||||
|
}
|
||||||
|
PushManager.getInstance().setPushContent(title, extras);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 从通知栏打开通知的扩展处理
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onNotificationOpened(Context context, String title, String summary, String extraMap) {
|
||||||
|
Log.i(TAG, "onNotificationOpened : " + " : " + title + " : " + summary + " : " + extraMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通知删除回调
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param messageId
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public void onNotificationRemoved(Context context, String messageId) {
|
||||||
|
Log.i(TAG, "onNotificationRemoved : " + messageId);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 无动作通知点击回调。当在后台或阿里云控制台指定的通知动作为无逻辑跳转时,通知点击回调为onNotificationClickedWithNoAction而不是onNotificationOpened
|
||||||
|
*
|
||||||
|
* @param context
|
||||||
|
* @param title
|
||||||
|
* @param summary
|
||||||
|
* @param extraMap
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void onNotificationClickedWithNoAction(Context context, String title, String summary, String extraMap) {
|
||||||
|
Log.i(TAG, "onNotificationClickedWithNoAction : " + " : " + title + " : " + summary + " : " + extraMap);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.uiui.zyos.tpush;
|
package com.uiui.zyos.push.tpush;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by chacewang on 2019/7/5.
|
* Created by chacewang on 2019/7/5.
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.uiui.zyos.tpush;
|
package com.uiui.zyos.push.tpush;
|
||||||
|
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -16,9 +16,9 @@ import com.tencent.android.tpush.XGPushClickedResult;
|
|||||||
import com.tencent.android.tpush.XGPushRegisterResult;
|
import com.tencent.android.tpush.XGPushRegisterResult;
|
||||||
import com.tencent.android.tpush.XGPushShowedResult;
|
import com.tencent.android.tpush.XGPushShowedResult;
|
||||||
import com.tencent.android.tpush.XGPushTextMessage;
|
import com.tencent.android.tpush.XGPushTextMessage;
|
||||||
import com.uiui.zyos.network.NetInterfaceManager;
|
import com.uiui.zyos.push.PushManager;
|
||||||
import com.uiui.zyos.tpush.common.NotificationService;
|
import com.uiui.zyos.push.tpush.common.NotificationService;
|
||||||
import com.uiui.zyos.tpush.po.XGNotification;
|
import com.uiui.zyos.push.tpush.po.XGNotification;
|
||||||
import com.uiui.zyos.utils.ToastUtil;
|
import com.uiui.zyos.utils.ToastUtil;
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
@@ -31,7 +31,6 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
public static final String TEST_ACTION = "com.qq.xgdemo.activity.TEST_ACTION";
|
public static final String TEST_ACTION = "com.qq.xgdemo.activity.TEST_ACTION";
|
||||||
public static final String LogTag = "xg.test";
|
public static final String LogTag = "xg.test";
|
||||||
|
|
||||||
public static final String SET_ALARMCLOCK = "zuoyeos.action.change.alarmclaock";
|
|
||||||
|
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ContentResolver mResolver;
|
private ContentResolver mResolver;
|
||||||
@@ -215,7 +214,6 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
context.sendBroadcast(testIntent);
|
context.sendBroadcast(testIntent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除账号回调
|
* 删除账号回调
|
||||||
*
|
*
|
||||||
@@ -289,9 +287,6 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
// Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
|
// Toast.makeText(context, text, Toast.LENGTH_SHORT).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
//闹钟
|
|
||||||
private static final String JIGUANG_ALARM_CLOCK = "57";
|
|
||||||
|
|
||||||
private void processCustomMessage(Context context, XGPushTextMessage message) {
|
private void processCustomMessage(Context context, XGPushTextMessage message) {
|
||||||
if (context == null || message == null) {
|
if (context == null || message == null) {
|
||||||
return;
|
return;
|
||||||
@@ -305,14 +300,6 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
if (extrasJson.get("extras") != null) {
|
if (extrasJson.get("extras") != null) {
|
||||||
extras = extrasJson.get("extras").toString();
|
extras = extrasJson.get("extras").toString();
|
||||||
}
|
}
|
||||||
|
PushManager.getInstance().setPushContent(title, extras);
|
||||||
switch (title) {
|
|
||||||
case JIGUANG_ALARM_CLOCK:
|
|
||||||
ToastUtil.betaShow("收到推送消息: 设置闹钟");
|
|
||||||
Intent intent = new Intent(SET_ALARMCLOCK);
|
|
||||||
mContext.sendBroadcast(intent);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.uiui.zyos.tpush.common;
|
package com.uiui.zyos.push.tpush.common;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.uiui.zyos.tpush.common;
|
package com.uiui.zyos.push.tpush.common;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
@@ -6,7 +6,7 @@ import android.database.Cursor;
|
|||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
|
||||||
|
|
||||||
import com.uiui.zyos.tpush.po.XGNotification;
|
import com.uiui.zyos.push.tpush.po.XGNotification;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.uiui.zyos.tpush.po;
|
package com.uiui.zyos.push.tpush.po;
|
||||||
|
|
||||||
public class XGNotification {
|
public class XGNotification {
|
||||||
private Integer id;
|
private Integer id;
|
||||||
@@ -30,30 +30,30 @@ public class Utils {
|
|||||||
/**
|
/**
|
||||||
* 获取设备序列号
|
* 获取设备序列号
|
||||||
*
|
*
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@SuppressLint("MissingPermission")
|
// @SuppressLint("MissingPermission")
|
||||||
public static String getSerial() {
|
// public static String getSerial() {
|
||||||
String serial = "unknow";
|
// String serial = "unknow";
|
||||||
try {
|
// try {
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+
|
// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {//9.0+
|
||||||
serial = Build.getSerial();
|
// serial = Build.getSerial();
|
||||||
} else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+
|
// } else if (Build.VERSION.SDK_INT > Build.VERSION_CODES.N) {//8.0+
|
||||||
serial = Build.SERIAL;
|
// serial = Build.SERIAL;
|
||||||
} else {//8.0-
|
// } else {//8.0-
|
||||||
Class<?> c = Class.forName("android.os.SystemProperties");
|
// Class<?> c = Class.forName("android.os.SystemProperties");
|
||||||
Method get = c.getMethod("get", String.class);
|
// Method get = c.getMethod("get", String.class);
|
||||||
serial = (String) get.invoke(c, "ro.serialno");
|
// serial = (String) get.invoke(c, "ro.serialno");
|
||||||
}
|
// }
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
Log.e("e", "读取设备序列号异常:" + e.toString());
|
// Log.e("e", "读取设备序列号异常:" + e.toString());
|
||||||
}
|
// }
|
||||||
if (BuildConfig.DEBUG) {
|
// if (BuildConfig.DEBUG) {
|
||||||
// return "QNG2DKB00463";
|
//// return "QNG2DKB00463";
|
||||||
}
|
// }
|
||||||
return serial;
|
// return serial;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public static String getDeviceSN() {
|
public static String getDeviceSN() {
|
||||||
String serial = null;
|
String serial = null;
|
||||||
|
|||||||
BIN
app/src/main/res/drawable-hdpi/default_avatar.png
Normal file
|
After Width: | Height: | Size: 7.6 KiB |
@@ -7,292 +7,12 @@
|
|||||||
android:background="@drawable/main_background"
|
android:background="@drawable/main_background"
|
||||||
tools:context=".activity.main.MainActivity">
|
tools:context=".activity.main.MainActivity">
|
||||||
|
|
||||||
<com.flyco.tablayout.SlidingTabLayout
|
|
||||||
android:id="@+id/main_sliding_tab_layout"
|
|
||||||
android:layout_width="@dimen/dp_320"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:tl_indicator_color="#00000000"
|
|
||||||
app:tl_indicator_margin_left="2dp"
|
|
||||||
app:tl_indicator_margin_right="2dp"
|
|
||||||
app:tl_indicator_style="NORMAL"
|
|
||||||
app:tl_tab_space_equal="true"
|
|
||||||
app:tl_textBold="SELECT"
|
|
||||||
app:tl_textsize="@dimen/sp_12" />
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/main_sliding_tab_layout" />
|
|
||||||
|
|
||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
|
||||||
android:id="@+id/magicIndicator"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="@dimen/dp_16"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/constraintLayout2"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:id="@+id/constraintLayout2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="@dimen/dp_4"
|
|
||||||
android:background="@drawable/custom_bg_ai"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_marginTop="@dimen/dp_4"
|
|
||||||
android:layout_marginBottom="@dimen/dp_2"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon0"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_8"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_error_book"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname0"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="AI全科错题本"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="@dimen/sp_7"
|
|
||||||
app:layout_constraintEnd_toEndOf="@+id/iv_icon0"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon0"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon0" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon1"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_homework"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname1"
|
|
||||||
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_icon1"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon1"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon1" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon2"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_listen"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname2"
|
|
||||||
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_icon2"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon2"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon2" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon3"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_textbook_sync"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname3"
|
|
||||||
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_icon3"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon3"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon3" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon4"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_sync_exercises"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname4"
|
|
||||||
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_icon4"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon4"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon4" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon5"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_dictionary"
|
|
||||||
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:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon6"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_4"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_glossary"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname6"
|
|
||||||
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_icon6"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon6"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon6" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_icon7"
|
|
||||||
android:layout_width="@dimen/dp_36"
|
|
||||||
android:layout_height="@dimen/dp_36"
|
|
||||||
android:layout_marginStart="@dimen/dp_4"
|
|
||||||
android:layout_marginEnd="@dimen/dp_8"
|
|
||||||
android:adjustViewBounds="true"
|
|
||||||
android:scaleType="centerCrop"
|
|
||||||
android:src="@drawable/icon_expand"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_appname7"
|
|
||||||
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_icon7"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/iv_icon7"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_icon7" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
302
app/src/main/res/layout-land/fragment_main.xml
Normal file
@@ -0,0 +1,302 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout 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=".fragment.main.MainFragment">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<com.flyco.tablayout.SlidingTabLayout
|
||||||
|
android:id="@+id/main_sliding_tab_layout"
|
||||||
|
android:layout_width="@dimen/dp_320"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:tl_indicator_color="#00000000"
|
||||||
|
app:tl_indicator_margin_left="2dp"
|
||||||
|
app:tl_indicator_margin_right="2dp"
|
||||||
|
app:tl_indicator_style="NORMAL"
|
||||||
|
app:tl_tab_space_equal="true"
|
||||||
|
app:tl_textBold="SELECT"
|
||||||
|
app:tl_textsize="@dimen/sp_12" />
|
||||||
|
|
||||||
|
<androidx.viewpager.widget.ViewPager
|
||||||
|
android:id="@+id/viewPager"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="0dp"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/main_sliding_tab_layout" />
|
||||||
|
|
||||||
|
<net.lucode.hackware.magicindicator.MagicIndicator
|
||||||
|
android:id="@+id/magicIndicator"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="@dimen/dp_16"
|
||||||
|
android:layout_centerHorizontal="true"
|
||||||
|
android:visibility="visible"
|
||||||
|
app:layout_constraintBottom_toTopOf="@+id/constraintLayout2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/constraintLayout2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="@dimen/dp_4"
|
||||||
|
android:background="@drawable/custom_bg_ai"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginTop="@dimen/dp_4"
|
||||||
|
android:layout_marginBottom="@dimen/dp_2"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon0"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_error_book"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname0"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="AI全科错题本"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_7"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/iv_icon0"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon0"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon0" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon1"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_homework"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname1"
|
||||||
|
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_icon1"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon1" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon2"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_listen"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname2"
|
||||||
|
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_icon2"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon2" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon3"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_textbook_sync"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname3"
|
||||||
|
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_icon3"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon3" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon4"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_sync_exercises"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname4"
|
||||||
|
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_icon4"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon4"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon4" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon5"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_dictionary"
|
||||||
|
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:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon6"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_4"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_glossary"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname6"
|
||||||
|
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_icon6"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon6"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon6" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_icon7"
|
||||||
|
android:layout_width="@dimen/dp_36"
|
||||||
|
android:layout_height="@dimen/dp_36"
|
||||||
|
android:layout_marginStart="@dimen/dp_4"
|
||||||
|
android:layout_marginEnd="@dimen/dp_8"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/icon_expand"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_appname7"
|
||||||
|
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_icon7"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/iv_icon7"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/iv_icon7" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</LinearLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</FrameLayout>
|
||||||
60
app/src/main/res/layout-land/fragment_user.xml
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<FrameLayout 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=".fragment.user.UserFragment">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="@dimen/dp_48"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintVertical_bias="0.0">
|
||||||
|
|
||||||
|
<com.shehuan.niv.NiceImageView
|
||||||
|
android:id="@+id/niceImageView"
|
||||||
|
android:layout_width="@dimen/dp_32"
|
||||||
|
android:layout_height="@dimen/dp_32"
|
||||||
|
android:layout_marginStart="@dimen/dp_32"
|
||||||
|
android:adjustViewBounds="true"
|
||||||
|
android:scaleType="centerCrop"
|
||||||
|
android:src="@drawable/default_avatar"
|
||||||
|
app:is_circle="true"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_name"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginStart="@dimen/dp_8"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@string/unbind"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintStart_toEndOf="@+id/niceImageView"
|
||||||
|
app:layout_constraintTop_toTopOf="@+id/niceImageView" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_bind_status"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:text="@string/notset"
|
||||||
|
android:textColor="@color/white"
|
||||||
|
android:textSize="@dimen/sp_10"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/niceImageView"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/tv_name" />
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
</FrameLayout>
|
||||||
@@ -6,36 +6,12 @@
|
|||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
tools:context=".activity.main.MainActivity">
|
tools:context=".activity.main.MainActivity">
|
||||||
|
|
||||||
<com.flyco.tablayout.SlidingTabLayout
|
|
||||||
android:id="@+id/main_sliding_tab_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:tl_indicator_color="@color/colorPrimary"
|
|
||||||
app:tl_indicator_margin_left="2dp"
|
|
||||||
app:tl_indicator_margin_right="2dp"
|
|
||||||
app:tl_indicator_style="NORMAL"
|
|
||||||
app:tl_tab_space_equal="true"
|
|
||||||
app:tl_textBold="SELECT"
|
|
||||||
app:tl_textsize="@dimen/sp_20"
|
|
||||||
app:tl_underline_color="@color/colorPrimary" />
|
|
||||||
|
|
||||||
<androidx.viewpager.widget.ViewPager
|
<androidx.viewpager.widget.ViewPager
|
||||||
android:id="@+id/viewPager"
|
android:id="@+id/viewPager"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="0dp"
|
android:layout_height="match_parent"
|
||||||
app:layout_constraintBottom_toTopOf="@+id/magicIndicator"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<net.lucode.hackware.magicindicator.MagicIndicator
|
|
||||||
android:id="@+id/magicIndicator"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="16dp"
|
|
||||||
android:layout_centerHorizontal="true"
|
|
||||||
android:visibility="visible"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 5.0 KiB |
@@ -1,13 +1,14 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">学习桌面</string>
|
<string name="app_name">学习桌面</string>
|
||||||
|
|
||||||
<!-- TODO: Remove or change this placeholder text -->
|
|
||||||
<string name="hello_blank_fragment">Hello blank fragment</string>
|
|
||||||
|
|
||||||
<string name="privacy_agreement"><u>隐私协议</u></string>
|
<string name="privacy_agreement"><u>隐私协议</u></string>
|
||||||
<string name="privacy_agreement_title">服务协议和隐私政策</string>
|
<string name="privacy_agreement_title">服务协议和隐私政策</string>
|
||||||
<string name="privacy_agreement_content">请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时通讯,内容分享等服务,
|
<string name="privacy_agreement_content">请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供即时通讯,内容分享等服务,
|
||||||
我们需要收集你的设备信息、操作日志等个人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。
|
我们需要收集你的设备信息、操作日志等个人信息。你可以在“设置”中查看、变更、删除个人信息并管理你的授权。
|
||||||
\n你可阅读《服务协议》,《隐私政策》了解详细信息。如你同意,请点击“同意”开始接受我们的服务</string>
|
\n你可阅读《服务协议》,《隐私政策》了解详细信息。如你同意,请点击“同意”开始接受我们的服务</string>
|
||||||
|
|
||||||
|
|
||||||
|
<string name="unbind" >未绑定</string>
|
||||||
|
<string name="notset">未设置</string>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
google()
|
google()
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url 'http://developer.huawei.com/repo/' }
|
maven { url 'http://developer.huawei.com/repo/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.6.4'
|
classpath 'com.android.tools.build:gradle:3.6.4'
|
||||||
classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
|
classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"
|
||||||
@@ -25,7 +26,9 @@ allprojects {
|
|||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url 'http://developer.huawei.com/repo/' }
|
maven { url 'http://developer.huawei.com/repo/' }
|
||||||
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
|
||||||
|
maven { url 'http://maven.aliyun.com/nexus/content/repositories/releases/' }
|
||||||
}
|
}
|
||||||
|
|
||||||
gradle.projectsEvaluated {
|
gradle.projectsEvaluated {
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
options.compilerArgs.add('-Xbootclasspath/p:app/libs/framework.jar')
|
options.compilerArgs.add('-Xbootclasspath/p:app/libs/framework.jar')
|
||||||
|
|||||||