bookmark and add to my homescreen 60x60 icon does not apprear.
Make
<link rel="apple-touch-icon" href="images/iphone.png"/>
Size: 60x60 pixels. tried 8bit and 24bit ping! Does not work. Site is on a localhost and not 'online'.
on http://news.bbc.co.uk/sport if I bookmark and add to my homescreen it works! Why?
They use: <link rel="apple-touch-icon" href="/sol/shared/img/iphone-sport.png"/>
Any help appreciated
For Android to pick up the icon you need a precomposed icon
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"/>
Also mentioned here Configuring Android Web Applications
Add 57x57 png image without any effects like glossy, transparent. Code for the bookmark icon is:
<link rel="apple-touch-icon" href="http://devw3.com/devw3-icon/57x57.png" />
We can use the same code for iphone, ipod touch and ipad but the icon sizes will differ. You can find more about options sizes and how to configure for different devices here: Adding Bookmark Icon On Home Screen IPhone, IPad, IPod Touch And Android
Related
I am making a web app, and when I "add to Home Screen" on my android device, the icon of my app is not being displayed properly. Below is the screenshot of it, and below that is what the icon really should look like:
This is the code I have inside the head tag of my website:
<link rel="shortcut icon" sizes="192x192" href="mydomain.com/img/site-icon/nice-highres.png">
Looked around the Add to Homescreen page for a while but it doesn't really mention any behavior on how the icon is scaled, but I found a tutorial about How to Add Icons and here, it mentions about creating the images available for all screen sizes:
If you don’t want to create all these images, you should at least create the larger resolution ones. That way they’ll look good on the hi-res devices. The older devices will load the closest size available to their required size and shrink them down (this works but isn’t ideal if you want complete control and the fastest download).
Based from this, you can presume that the icon MUST automatically be scaled down depending on the screen size. I'm not quite sure about this, but maybe what is causing your icon to not scale properly is because the rel attribute in your <link..> is incorrect? As per your code, it shows as rel="shortcut icon" while as per the Add to Homescreen doc, it should be rel="icon".
Also, a configuration is needed to support a homescreen launch, where you add some <meta> tags, like so (from the Add to Homescreen doc):
<!doctype html>
<html>
<head>
<title>Awesome app </title>
<meta name="viewport" content="width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="192x192" href="/icon.png">
</head>
<body></body>
</html>
Care to try it out and let me know if it works. Hope this helps somehow though. Good luck
When you size your logo with Android Studio they have a scale feature.
To size your logo:
1: Right-click app folder
2: Hover over "new" and click "create image asset"
Then resize with this tool:
as explained here (https://www.google.com/design/spec/style/icons.html#icons-system-icons), the icon dimension may be 48dp (and least for dense layout!).
After, the max size is relative to the user launcher...
I don't know what are the "perfect" dimensions in px (which are relative to the screen), but you may try to resize it by 48/48 (and also replace the "sizes" attribute)
On a specific device running Android 4.4.2 Jelly Bean, I found that the home screen icon would get cut off when the icon was larger than 92x92, even if 92x92 was also provided.
So just having this produces a great looking icon on the Jelly Bean device.
<link rel="icon" sizes="92x92" href="/favicon-92.png">
But the following will result in favicon-128.png being used on the Jelly Bean device, with the right and bottom sides being cropped. However, this does work on newer version of Android, as it should.
<link rel="icon" sizes="128x128" href="/favicon-128.png">
<link rel="icon" sizes="92x92" href="/favicon-92.png">
Since my web app is targeting a specific device running Jelly Bean, I decided to only provide the 92x92 icon. For websites in general I would recommend following Google's advice and provide low-res and high-res icons, which could cause issues on Jelly Bean devices.
My Blogger site generates the following line:
<link href='http://www.mtscollective.com/favicon.ico' rel='icon' type='image/x-icon'/>
And I've also added the following line for Android to use when the site is saved to the home screen:
<link href='http://cdn.mtscollective.com/images/android/icon-196.png' rel='icon' sizes='196x196'/>
The problem is that sometimes Chrome and Firefox use these interchangeably, but I only want them to use the first line. Is it possible to control this?
Thanks
Firefox and Chrome tend to favor PNG pictures over favicon.ico. So you should also declare a 16x16 PNG picture, along with your existing 196x196 picture.
Also note that Firefox uses the last declared PNG picture (this is bug 751712). Make sure you declare the 16x16 picture last:
<link rel="shortcut icon" href="/path/to/icons/favicon.ico">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-196x196.png" sizes="196x196">
<link rel="icon" type="image/png" href="/path/to/icons/favicon-16x16.png" sizes="16x16">
Finally, both Firefox and Chrome lack support for the sizes attribute. As a consequence, during the first visit, they will load both PNG pictures (these are bug 751712 (FireFox) and issue 324820 (Chrome)). This is not a serious issue, but good to know this.
I have a website with a mobile version and I am trying to get it so that when someone chooses to Bookmark the website or 'Add to home screen' it will save an Icon to the home screen. I have an Android Samsung Galaxy S3 and no matter what I try I cannot get it to use the icon instead of the standard ribbon with tiny preview in the middle.
Currently..The below code will get it to display the standard ribbon with tiny preview of favicon image but will not display the entire icon:
<link rel="icon" href="http://www.mydomain.com/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" href="http://www.mydomain.com/favicon.ico" type="image/x-icon"/>
I have also tried this code as well which only yields the standard ribbon icon when I add the bookmark to my homescreen. Not even a tiny preview like above:
<link rel="apple-touch-icon" href="http://www.mydomain.com/customicon.ico"/>
<link rel="apple-touch-icon-precomposed" href="http://www.mydomain.com/customicon.ico"/>
Note: I have also tried 1) Placing the icon files in the root. 2) Naming the filename to apple-touch-icon-precomposed.ico. 3) Icon is 57x57 and under 40 kb.
I know there is some way to accomplish this because I tested a couple of websites like AOL, and eBay and both save to my home screen with a normal sized icon that appears like an app.
If anyone has run into the same problem and found a solution that works please let me know. I am stumped!
The entire issue was because the website was .htaccess password protected for testing purposes during design and development. All I had to do was move the folder that contained all icons outside of the password protected directory!
The following code is what I used and is now working:
<link rel="apple-touch-icon" sizes="144x144" href="http://m.mydomain.com/touch-icon-ipad-retina.png" />
<link rel="apple-touch-icon" sizes="114x114" href="http://m.mydomain.com/touch-icon-iphone-retina.png" />
<link rel="apple-touch-icon" sizes="72x72" href="http://m.mydomain.com/touch-icon-ipad.png" />
<link rel="apple-touch-icon" href="http://m.mydomain.com/touch-icon-iphone.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
I can't find how to make Android use a custom icon (e.g. the favicon or the app-touch image that iOS uses) for a website shortcut.
Can you give me a hint?
Android uses a home screen image AND a "Shortcut icon" (like favicon). If you only specify the home screen icon, the web page will not display an icon next to the URL in the web browser.
The "shortcut icon" must be listed separately, even though it can be the same file.
<link rel="shortcut icon" href="http://yourdomain.com/path/icon57.png" />
<link rel="apple-touch-icon" href="http://yourdomain.com/path/icon57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="http://yourdomain.com/path/icon72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="http://yourdomain.com/path/icon114.png" />
<link rel="apple-touch-icon" sizes="144x144" href="http://yourdomain.com/path/icon144.png" />
Relative URLs will work for many devices, but most sources say you need to use absolute URLs.
Listing the sizes separately allows the device to download only the smallest image that meets it's needs. For the "shortcut icon", you can't list different sizes, but you can use an ICO file which may contain multiple sizes encoded in the file. Many image programs like GIMP can save ICO files with multiple sizes.
Note that if you want the shortcut icon to display in IE, it must be a real ico file.
Apparently, Android versions 2.1 and earlier only recognize the "precomposed" image link, but if you include the precomposed icon, every device that is capable of "fancifying" icons will skip their process and just use the precomposed ones. The Androids I tested can do their own fancifying, so I don't use precomposed icon links. It will depend on your compatibility needs.
<link rel="apple-touch-icon-precomposed" href="http://yourdomain.com/custom_icon.png"/>
For more information about using home screen icons...
http://developer.apple.com/library/ios/#documentation/AppleApplications/Reference/SafariWebContent/ConfiguringWebApplications/ConfiguringWebApplications.html
Android and iOS seem to use the same references for the icons on the home screen.
For the HTML link icons:
<!-- These two are what you want to use by default -->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="apple-touch-icon-precomposed" href="apple-touch-icon-precomposed.png">
<!-- This one works for anything below iOS 4.2 -->
<link rel="apple-touch-icon-precomposed apple-touch-icon" href="apple-touch-icon-precomposed.png">
The difference between the two types are that the top two don't have a space. The bottom one includes both with a space in between. The space is not recognized by iOS 4.2+. Your best bet is to use all three. If you are limited on space, use only the top two.
For Sizes:
144 × 144 pixels for an iPad Retina display.
114 × 114 pixels for an iPhone Retina display.
57 × 57 pixels for almost anything else
One thing to watch out for is that iOS 4.2+ will simply ignore the size attribute, so you can just link them with out it. I'd suggest putting the size within the icon's file name just for organizational purposes.
Another thing to note is that you don't even need to include the links for the "apple-touch-icon"s. If there is no icons defined in the html, iOS will search through the root folder for files named the following in order. Android DOES need them defined, so put them in the code anyways.
apple-touch-icon-57x57-precomposed.png
apple-touch-icon-57x57.png
apple-touch-icon-precomposed.png
apple-touch-icon.png
This looks like a good explanation.
It would appear that if you place:
<link rel="apple-touch-icon" href="/path/to/some.png"/>
<link rel="apple-touch-icon-precomposed" href="/custom_icon.png"/>
In the bookmarked page's HTML, it will appear on the desktop automagically.
This Android and iPhone icon page suggests absolute URLs for Android.
So just amend KenY-N's tags to
<link rel="apple-touch-icon" href="http://yourdomain.com/path/to/some.png"/>
<link rel="apple-touch-icon-precomposed" href="http://yourdomain.com/custom_icon.png"/>
I can confirm it works using relative (and absolute was working for me too)... but clearing caching solved what issues i was having... sample lines i used:
<!-- fj Icon for Android Chrome shortcut etc-->
<link rel="apple-touch-icon" href="/static/main/img/m3magnet-full.png">
<link rel="apple-touch-icon-precomposed" href="/static/main/img/m3magnet-full.png">
this is what worked for me. Chrome on Android:
<link rel="icon" type="image/png" href="favicon.png" />
<link rel="shortcut icon" href="favicon.ico" />
<link
rel="apple-touch-icon"
sizes="64x64"
href="http://glatocha.com/bmr/favicon.png"
/>
<link
rel="apple-touch-icon-precomposed"
href="http://glatocha.com/bmr/favicon.png"
/>
I keep getting the default Android ribbon bookmark icon, instead of my 114x114 icon for web app. Ideas?
I have tried ...
<link rel="apple-touch-icon" href="/icon.png"/>
<link rel="apple-touch-icon" href="/apple-touch-icon.png"/>
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-precomposed.png"/>
<link rel="apple-touch-icon-precomposed" href="/apple-touch-icon-114x114-precomposed.png"/>
I have also tried an approach similar to:
if (useragent == blackberry){
use precomposed/use 114x114-precomposed
}
In all variations, I continue to get the default ribbon icon, with the favicon centered in the middle of the ribbon. Isn't it possible to create a home page icon in Android that looks like a native app?
I have iOS and BlackBerry devices handled, but I am having no luck with Androids. It also doesn't seem to matter what browser I use.
Do I need to have full path including domain location? Other ideas?
take à look at this ;)
Configuring Android Web Applications
or this
http://www.mollerus.net/tom/blog/2010/06/web_app_homescreen_icons_in_android.html
this
it should work, it may not work because your path is not the right one, make sure your image is at the root of your web server because you included '/' before your path