iZettle / sdk-android

Add card payments from Zettle to your own app
https://developer.zettle.com/docs/android-sdk
24 stars 20 forks source link

Query Connected Reader Details #35

Closed christhwaites closed 2 years ago

christhwaites commented 3 years ago

As part of our Android app, we would like to alert the user to the fact that they are (or are not) connected to a zettle reader.

I understand I can open the CardReadersActivity to show the connected reader with the following code:

val intent = CardReadersActivity.newIntent(context)
startActivity(intent)

But what I would like to do is just to get the details of the connected reader in code, and display the name/number of the connected reader in our header on every activity.

Is there a method in the sdk to get the name/number of the connected reader? Or a handle to the connected reader that might return a null if there is no reader connected?

Also, is there any documentation for the SDK apart from this github page? Any class/method reference?

Thanks, Chris

dmilovanovi commented 2 years ago

Hi!

Sincere apologies for the delay in getting back to you! Unfortunately, there isn't a method/handle in the SDK that would in an easy way provide you with such reader info. I'll make sure to provide feedback to the team for future considerations!

Regards