bill.damage wrote:
> Hi, the code is really simple, just the standard launch of a local
> webpage in the asset folder:
>
> @Override
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
>
> mWebView = (WebView) findViewById(R.id.webview);
> mWebView.getSettings().setJavaScriptEnabled(true);
>
> mWebView.loadUrl("file:///android_asset/index.html");
> }
>
> For this test index.html just contains a link to an external site.
> What I find is that the app shows this page in the WebView ok, the
> user can select the link, and they are taken off to that site in the
> "real" onboard android browser. But I want them to be able to press
> the back button then and be taken back to my app - they are not, the
> "real" browser just shuts down and they are left at the home screen.
> When this happens on a G1 I find I can then long press the home button
> and switch to my app as it was still running all along. I need this to
> be automatic - what have I missed please?
I can't reproduce your problem. I have a very similar app, loading a
page out of assets/ into a WebView. In that page, I added a link to an
external site. When I click on the link, it pops up the Browser activity
as it should. When I back-arrow out of it, it returns me to my application.
--
Mark Murphy (a Commons Guy)
http://commonsware.com
Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---