“Add to homescreen” button in Android does not show website as a Web App

前端 未结 2 2027
终归单人心
终归单人心 2020-12-04 11:21

I\'ve created a mobile-friendly web site with jQuery Mobile and added some meta info so that it should be pinned to iOS and Android homescreens and should be launched as a w

2条回答
  •  忘掉有多难
    2020-12-04 12:22

    As you can see here this feature is still tagged as Beta. I guess you'll need to test this feature with the latest version of Chrome. From the article:

    Supporting add to homescreen apps

    Chrome will look for the following meta tag in the element of the web-page:

    
    

    The name attribute MUST be "mobile-web-app-capable" and the content attribute must be "yes" (case in-sensitive). If there is any other value in the content attribute the web app will be added as a regular bookmark.

    Icon

    The icon that is used to install to the homescreen is determined by using the largest icon found in one of the following tags:

     (recommended)
    
    
    
    

    Caution: The 192px image format is recommended. The last two formats (apple-touch-*) are deprecated, and will be supported only for a short time.

    Icon label

    The application’s </code> element serves as the default label for the icon on the homescreen.</p> <h3>Configuration</h3> <p>The following example is the minimum required configuration to support a homescreen launch experience.</p> <pre><code><!doctype html> <html> <head> <title>Awesome app

    Comparison to iOS Safari Add to Homescreen

    Chrome will also allow Web Apps to launch in "App mode" if they embed a meta tag using the "apple-mobile-web-app-capable" name. Chrome will stop supporting this usage in an upcoming release. Chrome currently shows a deprecation warning in the Developer Tools’ console log when it detects a page with only the "apple-mobile-web-app-capable" meta tag. The warning appears as follows:

    Android vs iOS

    Whilst Chrome temporarily accepts the usage of "apple-mobile-web-app-capable", Chrome does not offer compatibility with the iOS Safari API’s including:

    window.navigator.standalone
    
    
    

    I hope it helps.

提交回复
热议问题