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?