简体   繁体   中英

published android app differs from test environment

Ive made an app, and published it now. I'm facing a weird problem where the app downloaded from market behaves differently than if i run a test-run through eclipse.

My app launches a maps.google.com url in a webview like so :

 if (url != null && url.startsWith("http://maps.google.com")) {
        mWebView.getContext().startActivity(
            new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
        return true;
    } else {
            view.loadUrl(url);
        return false;        }

with this as intent:

<intent-filter>
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="helloworld" /> 
</intent-filter>

Now when i hit the back button so google maps closes, in my test environment it goes straight back to the page it was on in my main activity. but on the published app, it restarts the entire app, showing splash screen and all.

Ive tried exporting it 4 times now, but can't figure out where the problem lies... anyone have any pointers ? Just really weird concidering it works as should locally through eclipse ( running on the same physical device).

Turns out this was phone related, not a code-error. This approach is valid for people trying to do this, but if you encounter any similar bad behaviour on your test device - REBOOT it :)

Big thanks to stackoverflow for having such a friendly, active community.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM