sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
107 stars 28 forks source link

BLUETOOTH_SCAN permission missing #189

Open towsif-hossain opened 2 years ago

towsif-hossain commented 2 years ago

I am getting following crash on Android 12 devices while bluetooth scan screen is open to take payments.

Fatal Exception: java.lang.SecurityException: Need android.permission.BLUETOOTH_SCAN permission for AttributionSource { uid = 10258, packageName = com.example.app, attributionTag = null, token = android.os.BinderProxy@1885f77, next = null }: GattService registerScanner
       at android.os.Parcel.createExceptionOrNull(Parcel.java:2437)
       at android.os.Parcel.createException(Parcel.java:2421)
       at android.os.Parcel.readException(Parcel.java:2404)
       at android.os.Parcel.readException(Parcel.java:2346)
       at android.bluetooth.IBluetoothGatt$Stub$Proxy.registerScanner(IBluetoothGatt.java:1886)
       at android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper.startRegistration(BluetoothLeScanner.java:519)
       at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:305)
       at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:161)
       at com.sumup.merchant.reader.bluetooth.ModernBtSmartScanner.start(SourceFile:78)
       at com.sumup.merchant.reader.bluetooth.BaseBtSmartScanner.handleMessage(SourceFile:12)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loopOnce(Looper.java:226)
       at android.os.Looper.loop(Looper.java:313)
       at android.os.HandlerThread.run(HandlerThread.java:67)

SDK version 3.4.0

spectrumIG commented 2 years ago

Welcome to the club. This issue is here since at least 1-1,5 year and no one, NO ONE has at least taken the time to give an answer. The sdk is stuck with targetSdk 29. That's the reason.

OliverHoffmann commented 1 year ago

Hello, I get the same issue. Is it still not fixed?

What can I do to get the SDK to work? Or to help in fixing this issue?

Thank you :)