Member-only story
Baidu Push Notification on Android Pie
You might have noticed that the frequency of receiving notifications has been decreased.
Starting with Android 9 (API level 28), cleartext support is disabled by default.
But Baidu Push Notification uses HTTP request to bind service.
So we need to :
(1)Create network_security_config.xml
(2)Add domain, for example: baidu.com
(3)Point android:networkSecurityConfig which is in AndroidMenifest.xml to network_security_config.xml
Since we had issues in the past on GooglePlay with Baidu, we do not want any Baidu related items inside worldwide build. So we create network_security_config for china build separately and move the original one to folder ‘vanilla’.