Using the getSupportedCoins function of Keystore SDK API results in Application crash

Hello, I’ve been trying to access the Keystore SDK in my application for transaction purposes.
I’m using the following code fragment to get the supported coins in the wallet:

int[] supportedCoins = ScwService.getInstance().getSupportedCoins();
            
    StringBuilder sb = new StringBuilder();
    sb.append("Supported coins").append('\n');
    for (int i = 0; i < supportedCoins.length; i++ ) {
        sb.append('[').append(i).append("] ").append(supportedCoins[i]).append('\n');
    }
        
    String s = sb.toString();

This code is available here. The applications crashes when I use this code. Please help me understand what could be the reason behind this. Is there a particular way that should be followed to use this function or is it anything else?

Hi,

The causes of the application crashes may be because of some problems that may happen in your device.

  1. Make sure your devices supports Samsung Blockchain Keystore. You can find the supported devices list here.

  2. Check your Samsung Blockchain Keystore is in Developer Mode. You can enable developer mode by following the instruction provided here.

Make sure your ScwService.getInstance() does not provide a null value.