Square Reader SDK not compatible with Android SDK 34

Google Play requires that all apps start targeting SDK 34 before August 31st. The Reader SDK appears to not be compatible with this SDK version.

Steps to reproduce:

  1. Update your Android App to target SDK 34
  2. Build and run
  3. Attempt to Authorize your device
  4. Immediate Crash → No ANR or submit bug alert

This also affects existing apps that get updated. For example, if a user was using an app that did target v33, then updated to v34. When they attempt to make a purchase the app will crash loading the Square UI.

Does Square plan to support or update Android SDK 34?

If not, the reader SDK will not be usable on any updated apps after August 31st.

Stack Trace

07-15 14:21:02.084 16223 16223 E AndroidRuntime: java.lang.RuntimeException: Unable to resume activity {com.picthrive.instore/com.squareup.ui.main.ApiMainActivity}: java.lang.SecurityException: com.picthrive.instore: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5244)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:5277)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:60)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeLifecycleItem(TransactionExecutor.java:282)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.executeTransactionItems(TransactionExecutor.java:150)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:93)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2595)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:107)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8592)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: Caused by: java.lang.SecurityException: com.picthrive.instore: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Parcel.createExceptionOrNull(Parcel.java:3183)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Parcel.createException(Parcel.java:3167)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3150)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:3092)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.IActivityManager$Stub$Proxy.registerReceiverWithFeature(IActivityManager.java:5860)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at shadow.leakcanary.ServiceWatcher$install$4$2.invoke(ServiceWatcher.kt:93)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at java.lang.reflect.Proxy.invoke(Proxy.java:1006)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at $Proxy3.registerReceiverWithFeature(Unknown Source)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1853)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1793)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ContextImpl.registerReceiver(ContextImpl.java:1781)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:757)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.squareup.ui.MediaButtonDisabler.onResume(MediaButtonDisabler.java:38)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.squareup.ui.SquareActivity.onResume(SquareActivity.java:470)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.squareup.ui.main.MainActivity.onResume(MainActivity.java:205)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1722)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.Activity.performResume(Activity.java:9118)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.ActivityThread.performResumeActivity(ActivityThread.java:5234)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	... 14 more
07-15 14:21:02.084 16223 16223 E AndroidRuntime: Caused by: android.os.RemoteException: Remote stack trace:
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.android.server.am.ActivityManagerService.registerReceiverWithFeature(ActivityManagerService.java:14469)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:2648)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:2822)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Binder.execTransactInternal(Binder.java:1500)
07-15 14:21:02.084 16223 16223 E AndroidRuntime: 	at android.os.Binder.execTransact(Binder.java:1444)

Related github ticket : Reader SDK crashes on target SDK 34 · Issue #55 · square/reader-sdk-android-quickstart · GitHub

Google Play’s requirements to target SDK 34 - Meet Google Play's target API level requirement  |  Android Developers

The team is aware of this new requirement and are working on support for SDK 34. :slightly_smiling_face:

1 Like

Any update on this issue, it is getting pretty close to the Google requirement to support SDK 34 and the release of OS 15.

The team is working on an update for Reader SDK and they are very aware of the pressing time frame. We appreciate your patience. :slightly_smiling_face:

Is there any progress on the Square Reader SDK update for Android SDK 34?

The latest version of Reader SDK is 1.7.7 which supports 34 and if you run into any issues with that version you may have to implement this workaround when targeting Android 34. :slightly_smiling_face:

1 Like

I also face the issue on SDK update for Android SDK 34. It will take how many time to resolve it.

Ok i accept your message. It helps me a lot.