There are similar questions on StackOverflow but none of them worked for me.
List of Questions
Somehow I managed to open Uri starting with upi://pay
using startActivity(new Intent(ACTION_VIEW).setData(Uri.parse(upi_string)));
However when I try to use createChooser, no app is detected which can handle UPI payments.
How do I create a chooser for UPI apps?
I am using flutter and in my app when i tap on google pay or any upi app icon a url launcher is launched the function is:
_launchgooglepay() async {
const url =
'upi://pay?pa=kechamadavipul@okhdfcbank&pn=Payee Name&tn=Payment Message&cu=INR';
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
The url
upi://pay?pa=kechamadavipul@okhdfcbank&pn=Payee Name&tn=Payment