Easiest way to launch webpage in android with an icon

后端 未结 8 720
北荒
北荒 2021-02-03 11:02

We have a website that offers an e-mail service. We would like to create a fully fledged app for this but cannot afford this right now. In the mean time it would be great if we

8条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-03 12:03

    The only easier way is to put instructions on your site (directly, or as a contextual pop-up) on how to add the bookmark as an icon on your home screen. This can be slightly more complicated on Android, and depends on the browser. A simpler option for your potential users is to provide a wrapper app via the Marketplace.

    It is not overly complicated to create a simple wrapper Android app in Java that launches the browser, using Intents. The essential browser launch code is basically this:

    Uri uriUrl = Uri.parse("http://www.yourwebpage.com");
    Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
    startActivity(launchBrowser);
    

    A more detailed tutorial for creating this is available here: http://mobile.tutsplus.com/tutorials/android/launch-android-browser/

提交回复
热议问题