Android Web应用程序清单:默认方向的设置被忽略

Android Web应用程序清单:默认方向的设置被忽略,android,web-applications,screen-orientation,Android,Web Applications,Screen Orientation,我正在尝试使用以下清单JSON文件设置Web应用程序的默认方向: { "manifest_version": 2, "version": "0.9", "short_name": "My Web App", "name": "My Web App in Portrait Mode", "icons": [ { "src": "/homescreen-icon.png", "sizes": "196x196", "type": "im

我正在尝试使用以下清单JSON文件设置Web应用程序的默认方向:

{
  "manifest_version": 2,
  "version": "0.9",
  "short_name": "My Web App",
  "name": "My Web App in Portrait Mode",
  "icons": [
    {
      "src": "/homescreen-icon.png",
      "sizes": "196x196",
      "type": "image/png"
    }
  ],
  "start_url": "/index.php",
  "display": "fullscreen",
  "orientation": "portrait",
  "theme_color": "#5a8238",
  "background_color": "#1a2a08"
}
使用Chromes developer工具,我可以检查清单是否已正确加载,并且所有外观是否良好:方向设置为
纵向
(并显示为
全屏

但是,在移动Chrome的主屏幕上添加web应用程序,然后在那里打开它,我仍然可以在景观中查看web应用程序


在此方面的任何帮助都将不胜感激。谢谢。

刚刚发现
方向属性仅在
显示设置为
独立时有效:

{
  …
  "display": "standalone",
  "orientation": "portrait",
  …
}