question

ryanram avatar image
ryanram asked Jacob Abrams answered

CloverAccount.getAccount(context) return null

Clover Android SDKClover MiniRemote Pay Android
10 |2000

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

1 Answer

·
Jacob Abrams avatar image
Jacob Abrams answered

After API level 25 it doesn't matter what permission you have you won't be able to access accounts of other apps, hence your error. See
https://developer.android.com/about/versions/oreo/android-8.0-changes#aaad

We are working on changes that will allow you to target API levels higher than 25 and retrieve the auth tokens you need without the Account object.

Watch this class for changes: https://github.com/clover/clover-android-sdk/blob/master/clover-android-sdk/src/main/java/com/clover/sdk/util/CloverAuth.java

Maybe next year this class will be updated but in the mean time you need set your API target to 25 or lower. Note that just because your target is 25 or lower doesn't mean you cannot invoke APIs on higher levels (of course most Clover devices are lower than 25 anyway).

10 |2000

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