How to implement deeplinks in KaiOS

别说谁变了你拦得住时间么 提交于 2021-02-10 12:41:39

问题


Quite simple. A user should be able to click on a link like app:this/is/some/link?with=information and the desired app opens and does some action. Is this possible in KaiOS? Similar question to this stackoverflow question, but just the other side. Another application should be possible to link to my application.


回答1:


Deeplinks do exist on KaiOS 2.5.3 or newer, but there is no documentation on them. For example, this is from the KaiStore app manifest:

"deeplinks": {
    "regex": "^(app://)(kaios-store|kaios-plus)(.kaiostech.com)($|/$|/\\?(apps|postResult)=)",
    "action": "open-deeplink"
},
"activities": {
  "open-deeplink": {
      "href": "./index.html",
      "disposition": "window",
      "filters": {
        "type": "url",
        "url": {
          "required": true,
          "pattern": "(app|rtsp|data):.{1,16384}"
        }
      },
      "returnValue": true
  },
}

The action under deeplinks points to one of the activities, which must accept a required URL parameter. An app can then register using navigator.mozSetMessageHandler to handle this activity (see B2G's Web Activities API).

That said, there is no way to deep-link to arbitrary apps. Apps must expose Web Activities in their manifest in order to be open-able by other apps.



来源:https://stackoverflow.com/questions/63368909/how-to-implement-deeplinks-in-kaios

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!