Reputation: 163
I have an e-payment address that I call with the following command from an android app
Intent browserIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse(MyPaymentAddress));
startActivity(browserIntent);
If the payment is made correctly, the browser will be taken to a new page that displays this information in one line:
OK1,Tracking Code:443,Your payment is complete:XXXXX-XXXX-XXXXXXXX
And if I click the Cancel button on the payment page, the browser will show a new page with the following information:
CANCELL,0
Now I do not know how to not show these pages and read this information in Activity after successful payment or cancellation and return to first activity.
Upvotes: 0
Views: 795
Reputation: 415
In your Manifest :
<activity android:name=".HomeActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW"></action>
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:scheme="anyname" />
</intent-filter>
</activity>
Then in Server side callback URL should be "anyname://HomeActivity" For example:
<a href="anyname://HomeActivity" > go to my application </a>
Upvotes: 1