Reputation: 8986
I cant get a native app install banner to display on android. I've added the following masifest.json
:
{
"name": "My native app",
"description": "balh blah blah",
"short_name": "myapp",
"icons": [
{
"src:": "/Assets/app-install-banner-logo.png",
"type:": "image/png",
"sizes:": "144x144"
}
],
"prefer_related_applications": true,
"related_applications": [
{
"platform": "play",
"id": "com.my.app"
}
]
}
When I look at the application tab in chrome dev tools is see:
Why isn't are the fields begin populated? The json is valid, I can click on the /Assets/manifest.json
link and see the contents. What am I missing here?
Upvotes: 2
Views: 1386
Reputation: 11
Use below example in manifest.json
{
"short_name": "Name Of Website",
"name": "The Website",
"icons": [
{
"src": "launcher-icon-0-75x.png",
"sizes": "36x36",
"type": "image/png"
},
{
"src": "launcher-icon-1x.png",
"sizes": "48x48",
"type": "image/png"
},
{
"src": "launcher-icon-1-5x.png",
"sizes": "72x72",
"type": "image/png"
},
{
"src": "launcher-icon-2x.png",
"sizes": "96x96",
"type": "image/png"
},
{
"src": "launcher-icon-3x.png",
"sizes": "144x144",
"type": "image/png"
},
{
"src": "launcher-icon-4x.png",
"sizes": "192x192",
"type": "image/png"
}
],
"display": "browser",
"prefer_related_applications": true,
"related_applications": [
{
"platform": "play",
"id": "com.the.appid"
}
]
}
Upvotes: 1
Reputation: 8986
Got it working, two things needed to be done:
Open up manifest in sublime and change encoding from UTF8 with BOM
to UTF8
Unable to test in chrome or android emulator(as it cannot access the play store). You need to add a proxy to your dev machine on an actual android device and access the running site over https (in my case it involved creating a https iis binding to route through)
Upvotes: 2