문제

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.

도움이 되었습니까?

해결책

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.

Adding a screenshot to desktop from Chrome

The icon is the icon from the website.

Icon as shown on the desktop

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.

다른 팁

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.

enter image description here

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

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top