question

Keng avatar image
Keng asked ·

How to detect bluetooth in clover go device before sleep mode?

I have a problem with clover go in sleep mode. I want awake clover go when user payment.
How to detect bluetooth in clover go device before sleep mode or How to awake clover go when sleep mode ?

Clover Go
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Mustafa avatar image
Mustafa answered ·
You can create a foreground service using a binder and connect the payment device in that service by this if your activity is killed or the device is rotated or cleared from recent apps, the service will keep on running and your connection will be still on and when you open activity again you don't need to connect again just need to get the instance and make payment.
and close the connection on your desire time.
Share
10 |2000 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community