How to run this with Activity Starter?

Is it possible to run below code with activity starter?
After it runs this will return a result also !
Code:
Uri uri =
new Uri.Builder()
.scheme(“upi”)
.authority(“pay”)
.appendQueryParameter(“pa”, “test@axisbank”)
.appendQueryParameter(“pn”, “Test Merchant”)
.appendQueryParameter(“mc”, “1234”)
.appendQueryParameter(“tr”, “123456789”)
.appendQueryParameter(“tn”, “test transaction note”)
.appendQueryParameter(“am”, “10.01”)
.appendQueryParameter(“cu”, “INR”)
.appendQueryParameter(“url”, “https://test.merchant.website”)
.build();
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(uri);
intent.setPackage(PACKAGE_NAME);
startActivityForResult(intent,REQUEST_CODE);

Did you try something yourself? If yes what was the result. Maybe show some blocks you made.

i know how to put extra values using list, like adding a new contact. But i don’t how to build a data Uri!

Again. What have you tried? Show the blocks you made.

There you should enter a string it seems.

1 Like


I have no idea how to set those on activity starter!

Can you please create a small aia. with this activity…?
If yes then please create it & Post that aia here…

1 Like

I don’t think this will be possible…
Taifun

1 Like

if you can please tell me why it is not possible.

Uri might be like this,
upi://pay?pa=test@axisbank&pn=Test Merchant&mc=1234&tr=123456789&tn=test transaction note&am=10.01&cu=INR&url=https://test.merchant.website

I read the appinventor activity starter source code , when we call activity starter it check for a request code, but i don’t know where to put that code here?

As i said App inventory is unable to run in background so right now its impossible… You can use other payment gateway like paytm business & many other…

this something internal and not relevant for us
Taifun

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.