question

zaven avatar image
zaven asked sam Deactivated commented

The app is not getting the clover account so can connect to the inventory

Clover is installed on my virtual device, also I've followed the dev docs to create the simple application given by clover. However, the account is returning null value which will not connect to the Inventory to read from it. Below is the code where it gets the clover account.
How this can be done?

@Override
protected void onResume() {
    super.onResume();
    mTextView = (TextView) findViewById(R.id.activity_main_text_view);
    // Retrieve the Clover account
    if (mAccount == null) {
        mAccount = CloverAccount.getAccount(this);
        if (mAccount == null) {
            mTextView.setText("Not Founds");
            return;
        }
    }
Clover Android SDKInventory
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.

sam avatar image sam commented ·

I assume you followed these directions to setup your emulator:

https://docs.clover.com/build/android-emulator-setup/

Did you add <uses-permission android:name="android.permission.GET_ACCOUNTS"/> to the AndroidManifest?

Can you share your debug log from CloverAccount.getAccount(this);?

0 Likes 0 ·

0 Answers

Welcome to the
Clover Developer Community