Code support for retrieving AddessList

I’m using the following code fragment to retrieve the AddressList:

ScwService.ScwGetAddressListCallback callback = 
new ScwService.ScwGetAddressListCallback() {
        @Override
        public void onSuccess(List<String> addressList) {
                    
        }

        @Override
        public void onFailure(int errorCode, String errorMessage) {
            //handle errors

        }
    };

String hdPath =  ScwService.getHdPath(ScwCoinType.ETH, 0);

ArrayList<String> hdPathList = new ArrayList<>();
hdPathList.add(hdPath);

ScwService.getInstance().getAddressList(callback, hdPathList);

What do I write inside the onSuccess and onFailure methods? I tried printing the values of ‘addressList’ and ‘errorMessage’ but the app won’t install in that case!

Please help me resolve this issue.

Hello @agg1582522203,

“ScwService.getInstance().getAddressList” is used for fetching your Blockchain address(es) from the SBK SDK.

You can read more about how to use this API and display the addresses in your app from our tutorial “Where’s My Crypto Coin?” Featuring Samsung Blockchain Keystore SDK. We hope, following the tutorial will help resolve your issues.

If the issue is still persistent please provide the error logs so that we can investigate your issue further.

Best Regards,
Shuvo Saha
Samsung Developer Program