Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"apple-mobile-web-app-title" on Android

is there an equivalent to iOS 6 meta tag apple-mobile-web-app-title for android web-applications? Something that gives you the possibility to define a long title and a short title.

<title>Long name</title>
<meta name="apple-mobile-web-app-title" content="Short name">
like image 490
Hannes Avatar asked Feb 26 '13 07:02

Hannes


People also ask

What is an iOS Web App?

A web application is designed to look and behave in a way similar to a native application—for example, it is scaled to fit the entire screen on iOS. You can tailor your web application for Safari on iOS even further, by making it appear like a native application when the user adds it to the Home screen.

What is mobile web app capable?

Chrome on Android now supports a meta-tag mobile-web-app-capable : Since Chrome M31, you can set up your web app to have an application shortcut icon added to a device's homescreen, and have the app launch in full-screen "app mode" using Chrome for Android's "Add to homescreen" menu item.


2 Answers

This is possible using the "application-name" meta tag. However it only appears to work with chrome. Firefox and the android browser don't use the title tag

<head> ...  <meta name="application-name" content="Awesome App!"> ...  </head>

From, Usage in web applications section
http://w3c-webmob.github.io/installable-webapps/

like image 124
rostalof Avatar answered Oct 03 '22 13:10

rostalof


Create a JSON file called site.webmanifest, that looks like this:

{
  "name": "Long name",
  "short_name": "Short name",
  "icons": [
    {
      "src": "/android-chrome-192x192.png",
      "sizes": "192x192",
      "type": "image/png"
    },
    {
      "src": "/android-chrome-512x512.png",
      "sizes": "512x512",
      "type": "image/png"
    }
  ],
  "theme_color": "#ffffff",
  "background_color": "#ffffff",
  "display": "standalone"
}

Then add it to your HTML like this:

    <link rel="manifest" href="/site.webmanifest">

The "icons" part is irrelevant to your question, but you should probably include them as well (and actually make those icon files). I got this from this article: https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7

like image 21
Boris Avatar answered Oct 03 '22 13:10

Boris