-
Notifications
You must be signed in to change notification settings - Fork 0
Tools Developer Guide
本文主要说明ONE商店应用的URL Scheme连接方法及各种API事项。
使用一下custom URL scheme,能在移动应用及浏览器启动ONE商店应用。通常http://、ftp://、market://称为 url scheme。通过url scheme启动应用的方式如下。
- 应用或网页中点击超链接时,将url scheme传送至系统
- 系统收到url scheme后,确认有没有可启动的应用
- 如果找到能接收相应url scheme的应用,将会在启动应用的同时传送url
- 在启动应用的过程中,参照在url所包含的内容,执行特殊功能
如果在网页通过url scheme启动ONE商店应用时,应该要体现未安装该应用时的例外处理。
各个规格详情请见 引用。.
商品查看是各家移动通信公司应用商店客户端根据相应指令跳转到对商品ID的详细画面。(单项商品的详细查看画面)
规格
onestore://common/product/{product ID = PID}?view_type={value}
示例
onestore://common/product/0000252337?view_type=1
搜索查看是ONE商店应用对相应搜索词的搜索结果画面。
规格
onestore://common/search/{query}
示例
onestore://common/search/naver app
当收到更新应用、游戏商品等的请求时,如果商品不是最新版本,将会自动下载并安装更新版本。当请求更新商品的PKG与即将要下载的商品的PKG名称相同时则会启动。
规格
onestore://common/product/bg_update/{product ID = PID}
示例
onestore://common/product/bg_update/0000252337
可使用商品ID,简短地生成应用详细页面网址。
规格
https://onesto.re/{productID}
示例
https://onesto.re/0000252337
已有规格的重定向(Redirects)处理
各家应用商店所使用的连接规格将会实现自动重定向处理。因此,商品已经处于销售中,则无需另行开发。
已有规格 重定向 新规格
如果需要intent统计,按照以下标准,在指令后面统一输入以下内容。
详情请见引用。 引用.
规格
onestore://common/{individual connection command}?refType=(Int)&referrer=(STRING)&callerType=(INT)
示例
从最终幻想1(com.square_enix.android.finalfantasy_sp)连接至最终幻想6(0000652407)下载页面时,
onestore://common/product/0000652407?refType=1&referrer=com.square_enix.android.finalfantasy_sp&callerType=7
在活动网页中连接至最终幻想6(0000652407)下载页面时,
onestore://common/product/0000652407?refType=2&referrer=http://goo.gl/tQu1mP&callerType=8
与Hungryapp(0000309884)合作,连接至最终幻想6(0000652407)下载页面时,
onestore://common/product/0000652407?refType=3&referrer=HUNGRY APP+0000309884&callerType=15
通过html hyperlink reference输入所定的custom url。构建html页面,以实现使用者选择相应链接时如以下方法处理。
如果已安装应用,则即可启动,但未安装,因为使用javascript timer而发生setTimeout,可转移到其他移动网站或谷歌应用商店(Goole play)等。(如果未安装应用,在转移页面之前,有可能显示有误的提示窗。)详细处理方式如下。
为了隐藏系统错误信息,有可能需要以 iframe处理等。如果使用intent scheme,处理起来更简单。
var url = "onestore://common/product/0000252337?view_type=1";
var ONEstoreUrl = "https://onesto.re/0000252337"
function onClickApp(url) {
var clickedAt = +new Date;
AppCheckTimer = setTimeout(function() {
if (+new Date - clickedAt < 2000){
if (window.confirm("The latest version of the ONE store app is not installed. \Move to n mobile web page"))
{ location.href = ONEstoreUrl; }
}
}, 1500);
}
location.href = url;
如果商品已面市,可以通过packgeName的openAPI确认PID以及各种信息。
详情请见引用。 引用.
请求规格
http://m.onestore.co.kr/mobilepoc/api/getAppVersion.omp?pkgNm={package name}&deviceModelCd={model name}&osVer={OS version}
请求示例
http://m.onestore.co.kr/mobilepoc/api/getAppVersion.omp?pkgNm=com.nhn.android.search&deviceModelCd=SM-N920S&osVer=6.0
回应示例
{
"menuId": "DP04202",
"game": false,
"result": {
"desc": "success",
"code": "000"
},
"verNm": "",
"verCd": "",
"topMenuId": "DP30",
"topMenuNm": "app",
"menuNm": "information/common sense",
"sellerNm": "NAVER Corp.",
"prodId": "0000030320",
"title": "naver - NAVER"
}