I have made a payment app in Java Kotlin. My requirement is that a webpage can call my app for payment then after successful payment I can response back that webpage with transaction ID.
From web page, I have called app through Android's Intend feature and made payment successfully. while reverting back to chrome I am facing issue.
If I use HTTP URL intend then it opens new Tab everytime,
dataUri = Uri.parse("https://URL.com/app.php?amount=2&t_Id=123123123");
Intent intent = new Intent(Intent.ACTION_VIEW, dataUri);
Another option is to target chrome through Intend again.
dataUri = Uri.parse("//googlechrome:");
Intent intent = new Intent(Intent.ACTION_VIEW, dataUri);
It is working but issue I am getting in this is not able to send data. I understand that with intend we are just changing focus back to chrome. I tried Put extra paramteres but it didn't work.
intent.putExtra("t_Id", "12345");
Can any one suggest a better solution for it?