Problem with sending usdt

Hello…
I tried to send usdt with samsungblockchain wallet.

I tried two ways of sending… Thank you for helping me.

I am developing react-native app.

One way is calling intent. but, it doesn’t work because of

com.samsung.android.sdk.blockchain.internal.coin.tron.paymentsheet.TronPaymentSheetActivity has leaked window

Intent intent = tronService
                .createTrc20PaymentSheetActivityIntent

I searched more, but I can’t solve it.

I compared my app and sample app. I just call same intent. In my app, the x button is closer to the right. and it caues window leak error.


    @ReactMethod
    public void sendUSDT(int idx, int balance, Promise successCallback) {
        Account account = mAccountsList.get(idx);
        TronAccount tronAccount1= new TronAccount(account.getNetworkType(),account.getAddress(), account.getHdPath(),
                account.getWalletId(),
                usdt_address,null);

        Intent intent = tronService
                .createTrc20PaymentSheetActivityIntent(
                        reactContext,
                        hardwareWallet,
                        tronAccount1,
                        cryptomission_receiver,
                        usdt_address,
                        new BigInteger(Integer.toString(balance))
                );
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        reactContext.startActivity(intent);

It is sample code.


    public void sendTronToken2(Application app, TronAccount selectedAccount, String toAddress, int balance) {

        SBPManager mSBPManager = SBPManager.getInstance();
        String usdt_address = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t";
        String cryptomission_receiver = "TDkMoqBFYkEzcZftQxQPVr8zYBHL8gnMnf";
        Intent intent = mTronService
                .createTrc20PaymentSheetActivityIntent(
                        app,
                        mSBPManager.getHardwareWallet(),
                        selectedAccount,
                        toAddress,
                        usdt_address,
                        new BigInteger(Integer.toString(balance))
                );
        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        app.startActivity(intent);
    }


Second way is transfer without intent. it doesn’t work because of library conflict.

I am using firebase library. firebase library might make conflict between firebase and protobuf.

it is similar problem another guy met.

I need any method for transfer usdt, but I didn’t solve it…

Could I get help?


Hello @wns1600000304

We are very sorry to hear about your issues.

com.samsung.android.sdk.blockchain.internal.coin.tron.paymentsheet.TronPaymentSheetActivity has leaked window

For the first issue of leaked window we would recommend exploring react native documentation/forum about launching Intent. Sample Java code for launching intent we recommend is:

startActivityForResult(intent, 0);

We would request you to us react native equivalent of the code above.

Second way is transfer without intent. it doesn’t work because of library conflict.
I am using firebase library. firebase library might make conflict between firebase and protobuf.

As for your second issue, ‘com.google.protobuf:protobuf-java:3.9.1’ is needed for SBP SDK to work properly. We would like to request you to not exclude protobuf as you have mentioned in the following post.

Your protobuf conflict issue might be due to the version of firebase’s firestore you are using.
Please check out this Stackflow post and other related firebase posts to find additional help for resolving your protobuf dependencies.

PS: If you find this answer helpful please press the “like” button so that others can find it more easily.

Best Regards,
Shuvo
Samsung Developer Program

1 Like