question

aadel avatar image
aadel asked Bryanne Vega answered

Retrieving Device Account on Clover Mini 2nd Gen

Hi,

Running the code snippet below on Clover Mini 2nd Gen emulator connected to the sandbox:

mAccount = CloverAccount.getAccount(this);
the returned value is null

Environemnt: Sandbox
SDK version: 28 and 26

Note: building against SDK version 25 generates errors related to missing resources:

.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/77f53e7e5532d91f058879b164ac9a0d/res/values-v26/values-v26.xml:9:5-12:13: AAPT: error: resource android:attr/colorError not found.
/.gradle/caches/transforms-1/files-1.1/appcompat-v7-26.1.0.aar/77f53e7e5532d91f058879b164ac9a0d/res/values-v26/values-v26.xml:17:5-93: AAPT: error: style attribute 'android:attr/keyboardNavigationCluster' not found.
Attached build.gradle file

Any thoughts?

Thanks,
A.
SandboxEmulator
buildgradle.zip (2.6 KiB)
1 comment
10 |2000

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

Rohit Bhardwaj avatar image Rohit Bhardwaj commented ·

Can you show us your build.gradle(app) file ?

0 Likes 0 ·

1 Answer

Bryanne Vega avatar image
Bryanne Vega answered Dan Suspended commented
In second Gen devices, Android Oreo requires a different method on obtaining accounts and it's not through the Manifest's permissions.

Lower your SDK to 25 (I believe 27 is the maximum you can go with) and retry.
10 |2000

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