作者 朱振飞

add

@@ -13,7 +13,11 @@ android { @@ -13,7 +13,11 @@ android {
13 versionName "1.0" 13 versionName "1.0"
14 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" 14 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15 15
16 - 16 + ndk {
  17 + //选择要添加的对应cpu类型的.so库。
  18 + abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
  19 + // 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
  20 + }
17 manifestPlaceholders = [ 21 manifestPlaceholders = [
18 JPUSH_PKGNAME: "com.ios.yunnanfuxiao", 22 JPUSH_PKGNAME: "com.ios.yunnanfuxiao",
19 JPUSH_APPKEY : "37cb0b45143afb9bc796d41e", //JPush 上注册的包名对应的 Appkey. 23 JPUSH_APPKEY : "37cb0b45143afb9bc796d41e", //JPush 上注册的包名对应的 Appkey.
@@ -22,6 +22,16 @@ @@ -22,6 +22,16 @@
22 <uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- 播音 --> 22 <uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- 播音 -->
23 <uses-permission android:name="android.permission.WAKE_LOCK" /> 23 <uses-permission android:name="android.permission.WAKE_LOCK" />
24 24
  25 + <!--极光-->
  26 + <!-- 获取手机信息 -->
  27 + <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  28 + <uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
  29 + <!--2017.5.27 极光推送权限 ym start-->
  30 + <uses-permission android:name="android.permission.WAKE_LOCK"/>
  31 + <uses-permission android:name="android.permission.VIBRATE"/>
  32 + <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT"/>
  33 +
  34 +
25 <application 35 <application
26 android:name=".base.MyApplication" 36 android:name=".base.MyApplication"
27 android:allowBackup="true" 37 android:allowBackup="true"
@@ -194,11 +204,11 @@ @@ -194,11 +204,11 @@
194 android:launchMode="singleTop" 204 android:launchMode="singleTop"
195 android:screenOrientation="portrait" 205 android:screenOrientation="portrait"
196 android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 选择身份 --> 206 android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 选择身份 -->
197 - <activity  
198 - android:name=".ui.xspj.PjfxActivity_per"  
199 - android:launchMode="singleTop"  
200 - android:screenOrientation="portrait"  
201 - android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 课程表 --> 207 + <activity
  208 + android:name=".ui.xspj.PjfxActivity_per"
  209 + android:launchMode="singleTop"
  210 + android:screenOrientation="portrait"
  211 + android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 课程表 -->
202 <!-- <activity --> 212 <!-- <activity -->
203 <!-- android:name=".ui.main.activity.KcbActivity" --> 213 <!-- android:name=".ui.main.activity.KcbActivity" -->
204 <!-- android:launchMode="singleTop" --> 214 <!-- android:launchMode="singleTop" -->
@@ -245,7 +255,8 @@ @@ -245,7 +255,8 @@
245 <!-- Since JCore2.0.0 Required SDK核心功能--> 255 <!-- Since JCore2.0.0 Required SDK核心功能-->
246 <!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false --> 256 <!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false -->
247 <!-- 这个是自定义Service,要继承极光JCommonService,可以在更多手机平台上使得推送通道保持的更稳定 --> 257 <!-- 这个是自定义Service,要继承极光JCommonService,可以在更多手机平台上使得推送通道保持的更稳定 -->
248 - <service android:name=".push.PushService" 258 + <service
  259 + android:name=".push.PushService"
249 android:enabled="true" 260 android:enabled="true"
250 android:exported="false" 261 android:exported="false"
251 android:process=":pushcore"> 262 android:process=":pushcore">
@@ -261,7 +272,7 @@ @@ -261,7 +272,7 @@
261 <receiver 272 <receiver
262 android:name=".push.PushRecevier" 273 android:name=".push.PushRecevier"
263 android:enabled="true" 274 android:enabled="true"
264 - android:exported="false" > 275 + android:exported="false">
265 <intent-filter> 276 <intent-filter>
266 <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" /> 277 <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
267 <category android:name="com.ios.yunnanfuxiao" /> 278 <category android:name="com.ios.yunnanfuxiao" />
@@ -31,7 +31,7 @@ public class MyReceiver extends BroadcastReceiver { @@ -31,7 +31,7 @@ public class MyReceiver extends BroadcastReceiver {
31 @Override 31 @Override
32 public void onReceive(Context context, Intent intent) { 32 public void onReceive(Context context, Intent intent) {
33 Bundle bundle = intent.getExtras(); 33 Bundle bundle = intent.getExtras();
34 - 34 + Logger.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
35 if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) { 35 if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
36 String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID); 36 String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
37 Log.d(TAG, "[MyReceiver] 接收Registration Id : " + regId); 37 Log.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);