Baidu provide android SDK for push notification in eclipse project. It run well but no in android studio. I get errorCode 10101 (Integrate Check Error) Anyone know ?
1 Answers
Error 10101 indicated that there's something wrong with the core libs of baidu push services. From what i've experienced, it usually means that one of the .so libraries isn't loaded right, or isn't correlate with your definitions. For example, if you have a device which goes to armeabi-v7a folder, and the libbdpush_.so file there isn't right, then that device won't be able to connect to baidu's push services.
Baidu's guide : http://push.baidu.com/doc/android/api
Have you imported all the required libraries and made all the configurations ? If you've made all the following steps, and still, you're receiving error 10101 it means that the specific phone you have doesn't have the right .so lib under its correlate core lib folder.
- Download the baidu sdk http://boscdn.bpc.baidu.com/channelpush/14/dZoOygdDPxB7SecReFnwNDDG/com.neura.weave/PushDemo.zip
- Import the core libs (PushDemo -> libs) to your project (project -> src -> main -> jniLibs)
- Import the push service library (pushservice-_.jar) to your project (project -> libs)
Adjust your manifest
<receiver android:name="com.baidu.android.pushservice.PushServiceReceiver" android:process=":bdservice_v1"> <intent-filter> <action android:name="android.intent.action.BOOT_COMPLETED" /> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> <action android:name="com.baidu.android.pushservice.action.notification.SHOW" /> <action android:name="com.baidu.android.pushservice.action.media.CLICK" /> <action android:name="android.intent.action.MEDIA_MOUNTED" /> <action android:name="android.intent.action.USER_PRESENT" /> <action android:name="android.intent.action.ACTION_POWER_CONNECTED" /> <action android:name="android.intent.action.ACTION_POWER_DISCONNECTED" /> </intent-filter> </receiver> <receiver android:name="com.baidu.android.pushservice.RegistrationReceiver" android:process=":bdservice_v1"> <intent-filter> <action android:name="com.baidu.android.pushservice.action.METHOD" /> <action android:name="com.baidu.android.pushservice.action.BIND_SYNC" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.PACKAGE_REMOVED" /> <data android:scheme="package" /> </intent-filter> </receiver> <service android:name="com.baidu.android.pushservice.PushService" android:exported="true" android:process=":bdservice_v1"> <intent-filter> <action android:name="com.baidu.android.pushservice.action.PUSH_SERVICE" /> </intent-filter> </service> <service android:name="com.baidu.android.pushservice.CommandService" android:exported="true" /> <meta-data android:name="api_key" android:value="put_your_baidu_api_key_here" />

- 4,052
- 5
- 30
- 49
-
It was (project -> src -> main -> jniLibs) for me – Alex Zaitsev Aug 03 '16 at 16:07