Push icon on mobile devices that points to a perticular url
Please help me find how to push an 开发者_JS百科icon of our application on all the mobile devices. This icon shall lead to the home page of the application.
It really depends on the mobile device.
For iPhone the process is super easy. You just create a .png icon that is 45x45 and drop it into the root of your site and name it apple-touch-icon.png. Then add a reference to the icon in your <head>
<link rel="apple-touch-icon" href="/path/to/some.png"/>
Funnily enough this same code and icon will work on Android browsers as well - as long as your application is not running under SSL.
But for other devices the process can be a bit of a nightmare. I've not tackled this on Symbian but I have created bookmark launchers for BlackBerry OS (pre-webkit versions) and the process is really quite complicated. You need to create an OTA .JAD file and .COD files, and then detect the UA version and deliver the correct file. There is a tool called create-a-jad that helps you compile the launcher files. Once you achieve that don't forget to add the .cod and .jad mime-types to your server config
精彩评论