Create a Android launch icon for Website

旧时模样 提交于 2019-12-29 05:07:07

问题


I have a responsive website which can be accessed across multiple devices, our design and application is mainly targeted for mobile users.

To ease access to the site, we want to create a launch icon which will apear on the mobile home screen and user can access the site using one touch, as against launching the browser and typing the url / opening the bookmarked page.

I found a solution for it in IOS, which is also supported by the safari browser using which you can save the page url as a launch icon, can a similar feature be found on a android device? I would also be interested in prompting the users to create the launch icon if they are accessing it from a mobile phone /tablet.


回答1:


Default Android

This is the preferred way since this is all based on default Android options and doesn't add any maintenance.

As a widget from bookmarks

If on android you long press the home screen and then select the widget option you can create a bookmark. This will let you select a bookmark from your chrome bookmarks to be linked on the desktop. If that works for you you're all set with default Android features. The icon from the bookmark is used on the desktop.

Directly from Chrome

Similar to this approach is selecting the "Add to homescreen" option in the chrome settings menu.

The icon is the icon from the website.

Custom alternative

As stated before the alternative is to create an app that only serves the purpose of being a link to your mobile website. Then you have 2 options:

Using default browser of user

An app that uses intents to open the default browser of the user with your URL. This should be the way to go since the user can now keep on using his favorite browser.

In app browser

An app that contains a single webview loading the URL of your webapp. This last option gives you more control over the browsing experience (blocking scripts, overriding requests, ...). However the user can no longer use his preferred browser.

About the icon

In both cases the Icon will be the icon configured and distributed within the app. This also introduce the need of a new app release if the icon or the URL should change.

About the code

Code examples and information about this webapp in app approach can be found at http://developer.android.com/guide/webapps/webview.html

Another good resource is https://developers.google.com/chrome/mobile/docs/webview/overview where mobile app development using a native android app with webview is covered with several aspects like tools, css tricks and more.




回答2:


Some webBrowsers like chrome enable the user to make a bookmark for a specific URL as an icon in the home screen, but I did not get evolved in a project like that. So it is possible.

You can make it simple by creating an application that contain only a webview to open your url and you can then create an icon for your app that hold the website on the home screen as the following in this answer




回答3:


If I have understood your issue exactly then you would want to show a launcher icon for your website without creating any activity (screen) or doing any programming in android.

If this is the case then my answer is YES, as depicted in snap Google chrome provides this functionality to create a launcher/app icon on home screen.




回答4:


In my 3 years on Android I have never seen a website ask me to make a shortcut on my homescreen, however, the standard Android browser as well as Dolphin can create shortcuts from bookmarks.

While researching this with a quick search I found this thread states that Chrome allows this as well, and there's even a way to specify a homescreen icon for your users.



来源:https://stackoverflow.com/questions/22167594/create-a-android-launch-icon-for-website

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!