为什么升级新的SDK?
官网2.9.0.0更新日志:
1.兼容android6.0系统;
2.安全性提升;
3.布局文件优化,通知展示效果提高;
4.增加setTag回执,返回成功与否;
动手升级
1.布局文件替换:
新的SDK对布局文件做了优化,需要删除原来layout目录下的布局文件getui_notification.xml、notification_inc.xml,放入优化后的布局文件getui_notification.xml
SDK包目录如下
![](https://img.haomeiwen.com/i2591655/b3974cecd002c88d.png)
保险起见可以将所有的资源文件重新替换一遍
2.jar和so库替换
先删除原来项目中的GetuiSDKxxx.jar、GetuiExt.xxx.jar和libgetuiext.so, 然后加入新的GetuiSDKxxx.jar和需要cpu平台的libgetuiext2.so
so资源如下
![](https://img.haomeiwen.com/i2591655/d718c1f34eab1e4d.png)
android安装apk的时候会检测机器的cpu架构,根据cpu架构去检测apk有没有提供对应cpu架构的文件夹,如果有则copy这个文件夹安装,如果这个文件夹只包含工程所需的部分so库则运行会报错,所以so库的加入应当根据自身工程和第三方SDK综合考虑加入,确保每个平台都包含运行所需要的所有so库
3. AndroidManifest.xml 修改
删除以下3个配置
<receiver
android:name="com.igexin.getuiext.service.PayloadReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.igexin.sdk.action.7fjUl2Z3LH6xYy7NQK4ni4"/>
<action android:name="com.igexin.sdk.action.WDRtfrJBuS8vdjf1UHmAS9"/>
</intent-filter>
</receiver>
<service
android:name="com.igexin.getuiext.service.GetuiExtService"
android:process=":pushservice"/>
<activity
android:name="com.igexin.getuiext.activity.GetuiExtActivity"
android:configChanges="orientation|keyboard|keyboardHidden"
android:excludeFromRecents="true"
android:exported="false"
android:process=":pushservice"
android:taskAffinity="android.task.myServicetask" />
以下配置项增加action
<service
android:name="com.igexin.sdk.PushService"
android:exported="true"
android:label="NotificationCenter"
android:process=":pushservice" >
<intent-filter>
<action android:name="com.igexin.sdk.action.service.message"/>
</intent-filter>
</service>
<service
android:name="com.igexin.sdk.PushServiceUser"
android:exported="true"
android:label="NotificationCenterUser">
<intent-filter>
<action android:name="com.igexin.sdk.action.user.message"/>
</intent-filter>
</service>
网友评论