Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in Android 10 #49

Closed
Datafox-JCP opened this issue Jun 25, 2020 · 6 comments
Closed

Not working in Android 10 #49

Datafox-JCP opened this issue Jun 25, 2020 · 6 comments

Comments

@Datafox-JCP
Copy link

Hi, Does any one has Printooth working in Android 10?

I made an app and use this great printer function, works perfect in Android 9 but some one tested in Android 10 and does not work.

Thanks for your advice or suggestions.

@etman55
Copy link

etman55 commented Jun 25, 2020

same here and i get this error in my logcat when i exit Scanning activity

2020-06-25 18:42:01.679 21140-21140/com.mazenrashed.universalbluetoothprinter E/ActivityThread: Activity com.mazenrashed.printooth.ui.ScanningActivity has leaked IntentReceiver com.mazenrashed.printooth.utilities.Bluetooth$3@bfad86c that was originally registered here. Are you missing a call to unregisterReceiver()? android.app.IntentReceiverLeaked: Activity com.mazenrashed.printooth.ui.ScanningActivity has leaked IntentReceiver com.mazenrashed.printooth.utilities.Bluetooth$3@bfad86c that was originally registered here. Are you missing a call to unregisterReceiver()? at android.app.LoadedApk$ReceiverDispatcher.<init>(LoadedApk.java:1603) at android.app.LoadedApk.getReceiverDispatcher(LoadedApk.java:1368) at android.app.ContextImpl.registerReceiverInternal(ContextImpl.java:1539) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1512) at android.app.ContextImpl.registerReceiver(ContextImpl.java:1500) at android.content.ContextWrapper.registerReceiver(ContextWrapper.java:627) at com.mazenrashed.printooth.utilities.Bluetooth.startScanning(Bluetooth.java:198) at com.mazenrashed.printooth.ui.ScanningActivity$onStart$1.run(ScanningActivity.kt:114) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7682) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

@etman55
Copy link

etman55 commented Jun 25, 2020

After searching this solution worked for me in android 10 https://stackoverflow.com/a/58669558/7409951

@semnazri
Copy link

semnazri commented Aug 23, 2020

@etman55 hi man, can you give detail where you put ACCESS_BACKGROUND_LOCATION ? on project manifest or , library manifest?

@etman55
Copy link

etman55 commented Aug 23, 2020

@semnazri Actually i used my own bluetooth implementation after that when i found the one in library not optimized for android 10.
then i added my paired device to the library through this :
Printooth.setPrinter(printerName, printerAddress)

@mazenrashed
Copy link
Owner

Solved in v 1.2.2

@TidelxD
Copy link

TidelxD commented Nov 20, 2021

I have problem on andorid 11 when scanning for bluetooth device its hows noth but after disable bluetooth and renable it
it display the device but :
when select any device or press the back button the app crash
( meanwhile it works on andorid 8 )
any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants