Click here to Skip to main content
15,847,077 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my android app I call web brower to show a URL, I MUST do it, I am not allowed to use internal webView,
protected void browser(String javab){
try {
			String uuId = dicHelper.getDicNameByKlidValue(Constants.SETTINGS_USER_INFO, Constants.USER_INFO_GUID);
			String uri = Constants.MAIN_URL+"Payment/Default.aspx?userId="+uuId+"&&factorId="+javab;
			Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));
			startActivityForResult(browserIntent, PAY_ACTIVITY);

And as usual, use onresultactivity to detect come back and finosh job.
Browser is fired, urle viewd but on backpress ( or even close) I can not detect that it is back.

    protected void onActivityResult(int requestCode, int result, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    if (result != -1) return;
    resultCode = result;;
    if (requestCode == ADDRESS_ACTIVITY) {
    if (requestCode == MASTER_ACTIVITY) {
    if (requestCode==PAY_ACTIVITY) closeFactor();

Also I used on window focus change, but found it useless.
Please help.
Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900