Selaa lähdekoodia

1.修改服务协议
2.修改友盟
3.删除推送

FailedToRead 2 vuotta sitten
vanhempi
commit
7962b7a5cc

+ 1 - 3
.idea/gradle.xml

@@ -4,18 +4,16 @@
   <component name="GradleSettings">
     <option name="linkedExternalProjectsSettings">
       <GradleProjectSettings>
-        <option name="testRunner" value="PLATFORM" />
+        <option name="testRunner" value="GRADLE" />
         <option name="distributionType" value="DEFAULT_WRAPPED" />
         <option name="externalProjectPath" value="$PROJECT_DIR$" />
         <option name="modules">
           <set>
             <option value="$PROJECT_DIR$" />
             <option value="$PROJECT_DIR$/app" />
-            <option value="$PROJECT_DIR$/push" />
           </set>
         </option>
         <option name="resolveModulePerSourceSet" value="false" />
-        <option name="useQualifiedModuleNames" value="true" />
       </GradleProjectSettings>
     </option>
   </component>

+ 0 - 12
.idea/runConfigurations.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project version="4">
-  <component name="RunConfigurationProducerService">
-    <option name="ignoredProducers">
-      <set>
-        <option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
-        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
-        <option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
-      </set>
-    </option>
-  </component>
-</project>

+ 18 - 18
app/build.gradle

@@ -10,8 +10,8 @@ android {
         applicationId "com.edufound.android.xyyf"
         minSdkVersion 19
         targetSdkVersion 28
-        versionCode 10011
-        versionName "1.0.0.1.1"
+        versionCode 10020
+        versionName "1.0.0.2.0"
         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
         multiDexEnabled true
         flavorDimensions "versionCode"
@@ -21,13 +21,13 @@ android {
         efunbox {
             keyAlias "edufound_key"
             keyPassword "edufound321"
-            storeFile file("C:\\Users\\Candy\\Desktop\\义方教育\\edufound\\edufound.keystore")
+            storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
             storePassword "edufound123"
         }
         debug {
             keyAlias "edufound_key"
             keyPassword "edufound321"
-            storeFile file("C:\\Users\\Candy\\Desktop\\义方教育\\edufound\\edufound.keystore")
+            storeFile file("C:/Users/candy/Desktop/efunbox/edufound.keystore")
             storePassword "edufound123"
         }
     }
@@ -46,6 +46,8 @@ android {
                         def newoutputFile = "";
                         if (channel == ("2011")) {
                             newoutputFile = "\\华为联运\\"
+                        } else if (channel == ("2005")) {
+                            newoutputFile = "\\华为不联运\\"
                         }
                         output.outputFileName = new File(newoutputFile, fileName)
                     }
@@ -71,7 +73,7 @@ android {
         }
     }
     productFlavors {
-        //义方
+        //华为联运
         channel_huaweilianyun {
             signingConfig signingConfigs.efunbox
             manifestPlaceholders = [
@@ -79,6 +81,14 @@ android {
                     appIcon: "@drawable/icon",
             ]
         }
+        //华为不联运
+        channel_huawei {
+            signingConfig signingConfigs.efunbox
+            manifestPlaceholders = [
+                    appCode: "2005",
+                    appIcon: "@drawable/icon",
+            ]
+        }
 
     }
     productFlavors.all {
@@ -117,19 +127,6 @@ dependencies {
 //    implementation "com.umeng.umsdk:common:2.1.0"
 //    //PushSDK
 //    implementation "com.umeng.umsdk:push:6.0.1"
-    api project(":push")
-    //小米Push通道
-    implementation "com.umeng.umsdk:xiaomi-push:3.6.17"
-    implementation "com.umeng.umsdk:xiaomi-umengaccs:1.1.0"
-    //魅族Push通道
-    implementation "com.umeng.umsdk:meizu-push:3.8.1"
-    implementation "com.umeng.umsdk:meizu-umengaccs:1.0.6"
-    //vivo Push通道
-    implementation "com.umeng.umsdk:vivo-push:2.3.1"
-    implementation "com.umeng.umsdk:vivo-umengaccs:1.0.4"
-    //Oppo Push通道
-    implementation "com.umeng.umsdk:oppo-push:1.0.1"
-    implementation "com.umeng.umsdk:oppo-umengaccs:1.0.3"
     //cardView
     implementation 'com.android.support:cardview-v7:28.0.0'
     //recyclerview
@@ -143,5 +140,8 @@ dependencies {
     implementation 'com.huawei.hms:iap:5.1.0.300'
     implementation 'com.huawei.hms:appservice:5.0.4.303'
     implementation 'com.huawei.hms:hianalytics:5.2.0.301'
+    // 友盟基础组件库(所有友盟业务SDK都依赖基础组件库)
+    implementation 'com.umeng.umsdk:common:9.4.4'// (必选)
+    implementation 'com.umeng.umsdk:asms:1.4.1'// asms包依赖必选
 }
 

BIN
app/libs/umeng-analytics-v6.0.9.jar


+ 94 - 108
app/src/main/AndroidManifest.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-        xmlns:tools="http://schemas.android.com/tools"
-        package="com.edufound.android.xyyf">
+    xmlns:tools="http://schemas.android.com/tools"
+    package="com.edufound.android.xyyf">
 
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.INTERNET" />
@@ -16,35 +16,35 @@
     <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <!-- 切换网络通道 -->
     <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <!-- 开关wifi状态,解决国内机型移动网络权限问题需要 -->
     <application
-            android:name="com.edufound.android.xyyf.application.EApplication"
-            android:allowBackup="false"
-            android:appComponentFactory="huawei"
-            android:icon="${icon}"
-            android:label="@string/app_name"
-            android:networkSecurityConfig="@xml/network_security_config"
-            android:resizeableActivity="true"
-            android:supportsRtl="true"
-            android:theme="@style/NoTitle"
-            android:usesCleartextTraffic="true"
-            tools:replace="android:allowBackup,android:appComponentFactory">
+        android:name="com.edufound.android.xyyf.application.EApplication"
+        android:allowBackup="false"
+        android:appComponentFactory="huawei"
+        android:icon="${icon}"
+        android:label="@string/app_name"
+        android:networkSecurityConfig="@xml/network_security_config"
+        android:resizeableActivity="true"
+        android:supportsRtl="true"
+        android:theme="@style/NoTitle"
+        android:usesCleartextTraffic="true"
+        tools:replace="android:allowBackup,android:appComponentFactory">
 
         <meta-data
-                android:name="android.notch_support"
-                android:value="true" />
+            android:name="android.notch_support"
+            android:value="true" />
         <meta-data
-                android:name="android.max_aspect"
-                android:value="2.1" />
+            android:name="android.max_aspect"
+            android:value="2.1" />
         <meta-data
-                android:name="notch.config"
-                android:value="portrait|landscape" />
+            android:name="notch.config"
+            android:value="portrait|landscape" />
 
         <activity
-                android:name="com.edufound.android.xyyf.activity.MainActivity"
-                android:configChanges="orientation|keyboardHidden|screenSize"
-                android:maxAspectRatio="2.1"
-                android:resizeableActivity="true"
-                android:screenOrientation="landscape"
-                android:theme="@style/AppStartTheme">
+            android:name="com.edufound.android.xyyf.activity.MainActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:maxAspectRatio="2.1"
+            android:resizeableActivity="true"
+            android:screenOrientation="landscape"
+            android:theme="@style/AppStartTheme">
             <intent-filter>
                 <action android:name="android.intent.action.VIEW" />
 
@@ -52,16 +52,16 @@
                 <category android:name="android.intent.category.BROWSABLE" />
 
                 <data
-                        android:host="com.edufound.android.xyyf"
-                        android:path="/main"
-                        android:scheme="efunbox" />
+                    android:host="com.edufound.android.xyyf"
+                    android:path="/main"
+                    android:scheme="efunbox" />
             </intent-filter>
         </activity>
         <activity
-                android:name="com.edufound.android.xyyf.activity.AgreementActivity"
-                android:maxAspectRatio="2.1"
-                android:resizeableActivity="true"
-                android:screenOrientation="portrait">
+            android:name="com.edufound.android.xyyf.activity.AgreementActivity"
+            android:maxAspectRatio="2.1"
+            android:resizeableActivity="true"
+            android:screenOrientation="portrait">
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
 
@@ -70,116 +70,102 @@
         </activity>
 
         <activity
-                android:name=".activity.PhoneNumLoginActivity"
-                android:launchMode="singleInstance"
-                android:screenOrientation="portrait"
-                android:theme="@style/NoTitle"></activity>
+            android:name=".activity.PhoneNumLoginActivity"
+            android:launchMode="singleInstance"
+            android:screenOrientation="portrait"
+            android:theme="@style/NoTitle"></activity>
         <!--友盟start-->
         <meta-data
-                android:name="UMENG_APPKEY"
-                android:value="5ffbb9e0f1eb4f3f9b58b05e" />
+            android:name="UMENG_APPKEY"
+            android:value="5ffbb9e0f1eb4f3f9b58b05e" />
         <meta-data
-                android:name="UMENG_CHANNEL"
-                android:value="${UMENG_CHANNEL_VALUE}" />
+            android:name="UMENG_CHANNEL"
+            android:value="${UMENG_CHANNEL_VALUE}" />
         <!--友盟end-->
 
         <activity
-                android:name="com.edufound.android.xyyf.pay.PayActivity"
-                android:configChanges="orientation|screenSize"
-                android:screenOrientation="portrait"
-                android:theme="@style/NoTitle"></activity>
+            android:name="com.edufound.android.xyyf.pay.PayActivity"
+            android:configChanges="orientation|screenSize"
+            android:screenOrientation="portrait"
+            android:theme="@style/NoTitle"></activity>
 
         <provider
-                android:name="android.support.v4.content.FileProvider"
-                android:authorities="com.edufound.android.xyyf.fileprovider"
-                android:exported="false"
-                android:grantUriPermissions="true">
+            android:name="android.support.v4.content.FileProvider"
+            android:authorities="com.edufound.android.xyyf.fileprovider"
+            android:exported="false"
+            android:grantUriPermissions="true">
             <meta-data
-                    android:name="android.support.FILE_PROVIDER_PATHS"
-                    android:resource="@xml/apk_file_paths" />
+                android:name="android.support.FILE_PROVIDER_PATHS"
+                android:resource="@xml/apk_file_paths" />
         </provider>
 
         <activity
-                android:name="com.edufound.android.xyyf.wxapi.WXEntryActivity"
-                android:exported="true"
-                android:launchMode="singleTask"
-                android:screenOrientation="landscape"
-                android:taskAffinity="com.edufound.android.xyyf"
-                android:theme="@style/transcutestyle"></activity>
+            android:name="com.edufound.android.xyyf.wxapi.WXEntryActivity"
+            android:exported="true"
+            android:launchMode="singleTask"
+            android:screenOrientation="landscape"
+            android:taskAffinity="com.edufound.android.xyyf"
+            android:theme="@style/transcutestyle"></activity>
 
         <activity
-                android:name="com.edufound.android.xyyf.wxapi.WXPayEntryActivity"
-                android:exported="true"
-                android:screenOrientation="landscape"
-                android:theme="@style/transcutestyle">
+            android:name="com.edufound.android.xyyf.wxapi.WXPayEntryActivity"
+            android:exported="true"
+            android:screenOrientation="landscape"
+            android:theme="@style/transcutestyle">
 
         </activity>
 
         <activity
-                android:name="com.alipay.sdk.app.H5PayActivity"
-                android:configChanges="orientation|keyboardHidden|navigation|screenSize"
-                android:exported="false"
-                android:screenOrientation="behind"
-                android:windowSoftInputMode="adjustResize|stateHidden"></activity>
+            android:name="com.alipay.sdk.app.H5PayActivity"
+            android:configChanges="orientation|keyboardHidden|navigation|screenSize"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
         <activity
-                android:name="com.alipay.sdk.app.H5AuthActivity"
-                android:configChanges="orientation|keyboardHidden|navigation"
-                android:exported="false"
-                android:screenOrientation="behind"
-                android:windowSoftInputMode="adjustResize|stateHidden"></activity>
+            android:name="com.alipay.sdk.app.H5AuthActivity"
+            android:configChanges="orientation|keyboardHidden|navigation"
+            android:exported="false"
+            android:screenOrientation="behind"
+            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
 
 
-        <activity
-                android:name="com.edufound.android.xyyf.push.MipushTestActivity"
-                android:exported="true"
-                android:launchMode="singleTask" />
-
         <meta-data
-                android:name="com.huawei.hms.client.channel.androidMarket"
-                android:value="false" />
+            android:name="com.huawei.hms.client.channel.androidMarket"
+            android:value="false" />
         <meta-data
-                android:name="com.huawei.hms.client.appid"
-                android:value="appid=103790191" />
+            android:name="com.huawei.hms.client.appid"
+            android:value="appid=103790191" />
 
-        <!--vivo push参数声明 -->
-        <!-- vivo start-->
-        <meta-data
-                android:name="com.vivo.push.api_key"
-                android:value="xxxxxx" />
-        <meta-data
-                android:name="com.vivo.push.app_id"
-                android:value="xxxxxx" />
-        <!-- VIVO end-->
         <activity
-                android:name=".activity.PhoneNumLoginActivityLandscape"
-                android:configChanges="orientation|keyboardHidden|screenSize"
-                android:exported="false"
-                android:launchMode="singleTop"
-                android:screenOrientation="landscape"
-                android:theme="@style/translucent">
+            android:name=".activity.PhoneNumLoginActivityLandscape"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:exported="false"
+            android:launchMode="singleTop"
+            android:screenOrientation="landscape"
+            android:theme="@style/translucent">
 
         </activity>
 
         <!--联通电信授权页-->
         <activity
-                android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
-                android:configChanges="orientation|keyboardHidden|screenSize"
-                android:exported="false"
-                android:launchMode="singleTop"
-                android:theme="@style/phonelogin_dialog_activity_landscape" />
+            android:name="com.mobile.auth.gatewayauth.LoginAuthActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:exported="false"
+            android:launchMode="singleTop"
+            android:theme="@style/phonelogin_dialog_activity_landscape" />
         <!--协议页面webview-->
         <activity
-                android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
-                android:configChanges="orientation|keyboardHidden|screenSize"
-                android:exported="false"
-                android:launchMode="singleTop"
-                android:screenOrientation="behind" />
+            android:name="com.mobile.auth.gatewayauth.activity.AuthWebVeiwActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:exported="false"
+            android:launchMode="singleTop"
+            android:screenOrientation="behind" />
         <!--移动授权页-->
         <activity
-                android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
-                android:configChanges="orientation|keyboardHidden|screenSize"
-                android:exported="false"
-                android:launchMode="singleTop" />
+            android:name="com.cmic.sso.sdk.activity.LoginAuthActivity"
+            android:configChanges="orientation|keyboardHidden|screenSize"
+            android:exported="false"
+            android:launchMode="singleTop" />
 
     </application>
 

+ 2 - 2
app/src/main/java/com/edufound/android/xyyf/activity/AgreementActivity.java

@@ -80,8 +80,8 @@ public class AgreementActivity extends BaseActivity implements UserAgreementView
 
     List<Integer> leftBrackets = new ArrayList<>();
     List<Integer> rightBrackets = new ArrayList<>();
-    String text = "请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了向你提供内容等服务,我们需要收集你的设备信息、操作日志等个人信息。" +
-            "\n你可以阅读《服务协议》和《隐私政策》了解详细信息。如你同意,请点击“同意”开始接受我们的服务。";
+    String text = "请你务必审慎阅读、充分理解“用户协议”和“隐私政策”各条款,包括但不限于:为了向你提供内容等服务,我们需要收集你的设备信息、操作日志等个人信息。" +
+            "\n你可以阅读《用户协议》和《隐私政策》了解详细信息。如你同意,请点击“同意”开始接受我们的服务。";
 
     void setContext() {
         leftBrackets = getChildIndexFromString(text, "《");

+ 2 - 3
app/src/main/java/com/edufound/android/xyyf/application/EApplication.java

@@ -16,9 +16,8 @@ import com.edufound.android.xyyf.util.ContextUtil;
 import com.edufound.android.xyyf.util.Logger;
 import com.edufound.android.xyyf.util.OKHttpUtil;
 import com.edufound.android.xyyf.util.SPutil;
+import com.umeng.commonsdk.UMConfigure;
 
-import org.android.agoo.vivo.VivoRegister;
-import org.android.agoo.xiaomi.MiPushRegistar;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
@@ -49,7 +48,7 @@ public class EApplication extends Application {
         APP_START_TIME = System.currentTimeMillis();
         //根据appcode初始化支付sdk
 //        UMConfigure.setLogEnabled(true);
-//        UMConfigure.init(this, "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "", UMConfigure.DEVICE_TYPE_PHONE, "dfc59afd6dc6b1550ff1c2e0c7eb10fd");
+        UMConfigure.init(this, "5ffbb9e0f1eb4f3f9b58b05e", getAppCode() + "", UMConfigure.DEVICE_TYPE_PHONE, "");
 //        PushAgent mPushAgent = PushAgent.getInstance(this);
 //        mPushAgent.register(new IUmengRegisterCallback() {
 //            @Override

+ 0 - 2
app/src/main/java/com/edufound/android/xyyf/base/BaseActivity.java

@@ -22,7 +22,6 @@ import com.edufound.android.xyyf.util.ShowDevice;
 import com.edufound.android.xyyf.util.ShowSetting;
 import com.google.gson.Gson;
 import com.umeng.analytics.MobclickAgent;
-import com.umeng.message.PushAgent;
 
 public class BaseActivity extends Activity implements BaseView {
 
@@ -50,7 +49,6 @@ public class BaseActivity extends Activity implements BaseView {
             LiuHaiScreenUtil.openFullScreenModel(activity);
         }
         initBoardCastReceiver();
-        PushAgent.getInstance(this).onAppStart();
         initVew();
     }
 

+ 2 - 1
app/src/main/java/com/edufound/android/xyyf/config/DialogLandConfig.java

@@ -207,7 +207,8 @@ public class DialogLandConfig extends BaseUIConfig {
                 .setDialogHeight(dialogHeight)
                 .setDialogOffsetY(0)
                 .setScreenOrientation(authPageOrientation)
-                .setAppPrivacyOne("《隐私权限和用户协议》", "http://m-xyyf-web.ai160.com/res/protocol/protocol.htm")
+                .setAppPrivacyOne("《隐私政策》", "http://m-xyyf-web.ai160.com/res/protocol/private.htm")
+                .setAppPrivacyTwo("《用户协议》", "http://m-xyyf-web.ai160.com/res/protocol/service.htm")
                 .setStatusBarHidden(true)
                 .setPrivacyMargin(60)
                 .setPrivacyTextSize(12)

+ 1 - 0
app/src/main/java/com/edufound/android/xyyf/main/MainPersenter.java

@@ -257,6 +257,7 @@ public class MainPersenter implements MainIPersenter {
         }
 
         StringBuffer buffer = new StringBuffer();
+//        buffer.append("appCode=" + EApplication.getAppCode());
         buffer.append("appCode=" + EApplication.getAppCode());
         buffer.append("&uuid=" + preuuid);
         buffer.append("&width=" + deviceUtil.getWidth(mView.getActivity()));

+ 0 - 36
app/src/main/java/com/edufound/android/xyyf/push/MipushTestActivity.java

@@ -1,36 +0,0 @@
-package com.edufound.android.xyyf.push;
-
-import android.content.Intent;
-import android.os.Bundle;
-
-import com.edufound.android.xyyf.activity.MainActivity;
-import com.edufound.android.xyyf.bean.NotificationBean;
-import com.edufound.android.xyyf.util.Logger;
-import com.google.gson.Gson;
-import com.umeng.message.UmengNotifyClickActivity;
-
-import org.android.agoo.common.AgooConstants;
-
-public class MipushTestActivity extends UmengNotifyClickActivity {
-    String intent_url = "";
-
-    @Override
-    protected void onCreate(Bundle bundle) {
-        super.onCreate(bundle);
-//        setContentView(R.layout.activity_mipush);
-        intent_url = getIntent().getStringExtra("url");
-    }
-
-    @Override
-    public void onMessage(Intent intent) {
-        super.onMessage(intent);  //此方法必须调用,否则无法统计打开数
-        String body = intent.getStringExtra(AgooConstants.MESSAGE_BODY);
-        Logger.e("小米推送activity--body:" + body);
-        Gson gson = new Gson();
-        NotificationBean bean = gson.fromJson(body, NotificationBean.class);
-        Intent intent1 = new Intent(MipushTestActivity.this, MainActivity.class);
-        intent1.putExtra("url", bean.getExtra().getUrl());
-        startActivity(intent1);
-        finish();
-    }
-}

+ 0 - 2
build.gradle

@@ -5,7 +5,6 @@ buildscript {
         google()
         jcenter()
         mavenCentral()
-        maven { url 'https://dl.bintray.com/umsdk/release' }
         maven {url 'https://developer.huawei.com/repo/'}
     }
     dependencies {
@@ -22,7 +21,6 @@ allprojects {
         google()
         jcenter()
         mavenCentral()
-        maven { url 'https://dl.bintray.com/umsdk/release' }
         maven {url 'https://developer.huawei.com/repo/'}
     }
 }

+ 1 - 1
settings.gradle

@@ -1 +1 @@
-include ':app', ':push'
+include ':app'