作者 朱振飞

add

... ... @@ -13,7 +13,11 @@ android {
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
ndk {
//选择要添加的对应cpu类型的.so库。
abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a'
// 还可以添加 'x86', 'x86_64', 'mips', 'mips64'
}
manifestPlaceholders = [
JPUSH_PKGNAME: "com.ios.yunnanfuxiao",
JPUSH_APPKEY : "37cb0b45143afb9bc796d41e", //JPush 上注册的包名对应的 Appkey.
... ...
... ... @@ -22,6 +22,16 @@
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <!-- 播音 -->
<uses-permission android:name="android.permission.WAKE_LOCK" />
<!--极光-->
<!-- 获取手机信息 -->
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION"/>
<!--2017.5.27 极光推送权限 ym start-->
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT"/>
<application
android:name=".base.MyApplication"
android:allowBackup="true"
... ... @@ -194,11 +204,11 @@
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 选择身份 -->
<activity
android:name=".ui.xspj.PjfxActivity_per"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 课程表 -->
<activity
android:name=".ui.xspj.PjfxActivity_per"
android:launchMode="singleTop"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan|stateHidden" /> <!-- 课程表 -->
<!-- <activity -->
<!-- android:name=".ui.main.activity.KcbActivity" -->
<!-- android:launchMode="singleTop" -->
... ... @@ -245,7 +255,8 @@
<!-- Since JCore2.0.0 Required SDK核心功能-->
<!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false -->
<!-- 这个是自定义Service,要继承极光JCommonService,可以在更多手机平台上使得推送通道保持的更稳定 -->
<service android:name=".push.PushService"
<service
android:name=".push.PushService"
android:enabled="true"
android:exported="false"
android:process=":pushcore">
... ... @@ -261,7 +272,7 @@
<receiver
android:name=".push.PushRecevier"
android:enabled="true"
android:exported="false" >
android:exported="false">
<intent-filter>
<action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" />
<category android:name="com.ios.yunnanfuxiao" />
... ...
... ... @@ -31,7 +31,7 @@ public class MyReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
Logger.d(TAG, "[MyReceiver] onReceive - " + intent.getAction() + ", extras: " + printBundle(bundle));
if (JPushInterface.ACTION_REGISTRATION_ID.equals(intent.getAction())) {
String regId = bundle.getString(JPushInterface.EXTRA_REGISTRATION_ID);
Log.d(TAG, "[MyReceiver] 接收Registration Id : " + regId);
... ...