Issues using ResultReceiver with PrintConnect (Android 13)

// Expert user has replied.
S S Solbeck 4 months 1 week ago
61 1 0

Hello,

We have an Android app which uses the PrintConnect app to handle connecting to receipt printers. After the recent update to support Android 13, we are finding that the callback function associated with the passthrough service intent (com.zebra.printconnect.PrintService.RESULT_RECEIVER) is no longer being called. We are registering this callback as described in the Zebra PrintConnect User Guide and examples there, but I do note that guide is dated 2015, so perhaps that interface has changed with the latest updates.

Are there changes to how service intent callbacks are registered with PrintConnect? And if so, can we get updated documentation that reflects that?

Thank you!

 

 

 

 

 

Please register or login to post a reply

1 Replies

S Steven Si

Since Android Oreo (Android 8), it is required to use the startForegroundService() to send an intent to another app. Starting with the PrintConnect v1.2.95, please replace all the occurrences of the startService() in your app with the following code, and your app should work as expected.

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
    activity.startForegroundService(printerStatusIntent);
} else {
    activity.startService(printerStatusIntent);
}
CONTACT
Can’t find what you’re looking for?