CySmart: device specific issues?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
ChFu_4392236
Level 1
Level 1

Installing the CySmart BLE app via source code and Android Studio, I find that it works fine with an 8.0.0 android phone but fails on a 8.1.0 tablet. Both Samsung.

When I try to read the data the tablet is throws:

E/JavaBinder: !!! FAILED BINDER TRANSACTION !!!  (parcel size = 144)

E/BluetoothServiceJni: An exception was thrown by callback 'btgattc_notify_cb'.

E/BluetoothServiceJni: android.os.DeadObjectException: Transaction failed on small parcel; remote process probably died

Are there any known issues with certain devices/OSs? Is this likely solvable through app re-development and if so how?

0 Likes
1 Solution
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

CySmart Android Source Code uses Bundles to share data between activities. Bundles are intents objects which are intended to be used across process boundaries such as with IPC/Binder transactions, between activities with intents.

The error occurs because the activity was trying to send saved state Bundles to the system OS for safe keeping for restoration later (after a config change or process death) but that one or more of the Bundles it sent were too large. There is a maximum limit of about 1MB for all such transactions occurring at once and that limit can be reached even if no single Bundle exceeds that limit.

Now I'm not sure why it is exceeding the 1MB mark in your case and crashing which is what we need to look into. Please share the complete logcat file so that we can get more insight on this. Also, what is the application you have running on the peripheral side.

A simple fix would be to just change the targetSDKVersion to 23 in the build.gradle file. In android versions lower than 7.0, this exception is just a warning and doesn't crash the application.

For more information refer: Parcelables and Bundles  |  Android Developers

Regards,

Dheeraj

View solution in original post

3 Replies
DheerajK_81
Moderator
Moderator
Moderator
First comment on KBA First comment on blog 5 questions asked

CySmart Android Source Code uses Bundles to share data between activities. Bundles are intents objects which are intended to be used across process boundaries such as with IPC/Binder transactions, between activities with intents.

The error occurs because the activity was trying to send saved state Bundles to the system OS for safe keeping for restoration later (after a config change or process death) but that one or more of the Bundles it sent were too large. There is a maximum limit of about 1MB for all such transactions occurring at once and that limit can be reached even if no single Bundle exceeds that limit.

Now I'm not sure why it is exceeding the 1MB mark in your case and crashing which is what we need to look into. Please share the complete logcat file so that we can get more insight on this. Also, what is the application you have running on the peripheral side.

A simple fix would be to just change the targetSDKVersion to 23 in the build.gradle file. In android versions lower than 7.0, this exception is just a warning and doesn't crash the application.

For more information refer: Parcelables and Bundles  |  Android Developers

Regards,

Dheeraj

Reducing the SDK to 23 does allow the application processes to complete and display our data. Although many frames are lost, so the apparent responsiveness of the app is poor.

Unfortunately the application running on the external hardware isn't available to us.

The logcat that I can read (mainly from inside Android Studio) is completely taken over by the repetition of the error I described in the first post. Can you suggest a way to stream the logcat to a PC file? Or increase the file size considerably, I have already doubled it but now I can see twice as many errors.

0 Likes

Please follow these steps to save the logcat log into a file:

  • Right-click in the logcat messages window, choose select all. Then your save will be all logcat messages in that window (including the ones scrolled out of view).
  • When focus is in logcat messages window, type control-A, this will select all messages. Then save etc. etc.

Attach it here so that we can get more insight on the error.


Regards,

Dheeraj

0 Likes