所有可用方法和设置 - 实时管理您的 __CAPGO_KEEP_0__ 应用程序更新,无需商店麻烦,5 分钟即可安装 Over-the-Air (OTA)...

功能和设置

GitHub

查看 Github README 为了获取更多信息。

CapacitorUpdater可以通过以下选项进行配置:

属性类型描述默认值
appReadyTimeoutnumber配置native插件在等待更新失败之前等待的毫秒数。可用于Android、iOS和Electron。10000 // (10 seconds)
responseTimeoutnumber配置native插件在等待API超时之前等待的毫秒数。可用于Android、iOS和Electron。20000 // (20 seconds)
autoDeleteFailedboolean配置是否应自动删除失败的捆绑包。可用于Android、iOS和Electron。true
autoDeletePreviousboolean配置是否应在更新成功后自动删除之前的捆绑包。可用于Android、iOS和Electron。true
autoUpdateboolean | ‘off’ | ‘atBackground’ | ‘atInstall’ | ‘onLaunch’ | ‘always’ | ‘onlyDownload’配置如何使用自动更新通过更新服务器。true与“atBackground”相同;false与“off”相同。- off:禁用自动更新- atBackground:在应用程序移动到后台时检查并下载,然后在后台应用程序更新时应用- atInstall:仅在新安装或原生应用程序更新后立即应用,否则使用atBackground- onLaunch:在启动时立即应用,否则在启动检查后使用atBackground- always:在自动更新运行时立即应用- onlyDownload:检查并下载自动,发出updateAvailable,永不设置下一个捆绑包自动。可用于Android、iOS和Electron。”atBackground” // true is still accepted
resetWhenUpdateboolean自动删除之前下载的包文件,当设备安装新版本的原生应用包时。可用于Android、iOS和Electron。true
updateUrlstring配置更新检查的URL/端点。可用于Android、iOS和Electron。https://plugin.capgo.app/updates
channelUrlstring配置频道操作的URL/端点。可用于Android、iOS和Electron。https://plugin.capgo.app/channel_self
statsUrlstring配置更新统计信息的URL/端点。可用于Android、iOS和Electron。设置为""来禁用统计信息报告。https://plugin.capgo.app/stats
publicKeystring配置端到端实时更新加密的公钥(版本2)。可用于Android、iOS和Electron。undefined6.2.0
versionstring配置应用的当前版本。这将用于第一次更新请求。如果未设置,插件将从原生code中获取版本。可用于Android、iOS和Electron。undefined4.17.48
directUpdateboolean | ‘always’ | ‘atInstall’ | ‘onLaunch’已弃用。使用“atInstall”、“onLaunch”或“always”模式代替:- false:永不进行直接更新- atInstall:与autoUpdate:“atInstall”相同- onLaunch:与autoUpdate:“onLaunch”相同- always:与autoUpdate:“always”相同- true:与“always”相同,用于向后兼容性。可用于Android、iOS和Electron。false5.1.0
autoSplashscreenboolean自动处理启动屏幕隐藏,当使用即时应用模式时。启用后,插件将在更新应用或无需更新时自动隐藏启动屏幕。这消除了手动监听appReady事件并调用SplashScreen.hide()的需要。仅在autoUpdate设置为“atInstall”,“onLaunch”或“always”时才有效。为了保持向后兼容,仍支持Legacy直接更新值。需要安装并配置@capacitor/splash-screen插件,launchAutoHide设置为false。需要启用自动更新。适用于Android和iOS。false7.6.0
periodCheckDelaynumber配置周期性更新检查的延迟时间。单位为秒。适用于Android、iOS和Electron。不能小于600秒(10分钟)。600 // (10 minutes)
localS3boolean配置CLI使用本地服务器进行测试或自托管更新服务器。undefined4.17.48
localHoststring配置CLI使用本地服务器进行测试或自托管更新服务器。undefined4.17.48
localWebHoststring配置CLI使用本地服务器进行测试或自托管更新服务器。undefined4.17.48
localSupastring配置CLI使用本地服务器进行测试或自托管更新服务器。undefined4.17.48
localSupaAnonstring配置CLI使用本地服务器进行测试。undefined4.17.48
localApistring配置CLI使用本地api进行测试。undefined6.3.3
localApiFilesstring配置CLI使用本地文件api进行测试。undefined6.3.3
allowModifyUrlboolean允许插件动态从JavaScript侧修改updateUrl、statsUrl和channelUrl。false5.4.0
defaultChannelstring设置应用程序的默认频道在配置中。大小写敏感。这将设置将覆盖云中设置的默认频道,但仍将尊重云中设置的覆盖。undefined5.5.0
appIdstring配置应用程序ID在配置中。undefined6.0.0
keepUrlPathAfterReloadboolean配置插件以在重新加载后保留URL路径。警告:当重新加载时,‘window.history’将被清除。false6.8.0
disableJSLoggingboolean禁用JavaScript插件的日志记录。如果为true,插件将不会在JavaScript控制台中记录。只有本机日志会被执行。false7.3.0
shakeMenuboolean启用抖动手势以显示更新菜单(用于调试/测试目的)。false7.5.0

示例

示例

capacitor.config.json:

{
"plugins": {
"CapacitorUpdater": {
"appReadyTimeout": 1000 // (1 second),
"responseTimeout": 10 // (10 second),
"autoDeleteFailed": false,
"autoDeletePrevious": false,
"autoUpdate": "onlyDownload",
"resetWhenUpdate": false,
"updateUrl": https://example.com/api/auto_update,
"channelUrl": https://example.com/api/channel,
"statsUrl": https://example.com/api/stats,
"publicKey": undefined,
"version": undefined,
"directUpdate": undefined,
"autoSplashscreen": undefined,
"periodCheckDelay": undefined,
"localS3": undefined,
"localHost": undefined,
"localWebHost": undefined,
"localSupa": undefined,
"localSupaAnon": undefined,
"localApi": undefined,
"localApiFiles": undefined,
"allowModifyUrl": undefined,
"defaultChannel": undefined,
"appId": undefined,
"keepUrlPathAfterReload": undefined,
"disableJSLogging": undefined,
"shakeMenu": undefined
}
}
}

capacitor.config.ts:

import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
plugins: {
CapacitorUpdater: {
appReadyTimeout: 1000 // (1 second),
responseTimeout: 10 // (10 second),
autoDeleteFailed: false,
autoDeletePrevious: false,
autoUpdate: 'onlyDownload',
resetWhenUpdate: false,
updateUrl: https://example.com/api/auto_update,
channelUrl: https://example.com/api/channel,
statsUrl: https://example.com/api/stats,
publicKey: undefined,
version: undefined,
directUpdate: undefined,
autoSplashscreen: undefined,
periodCheckDelay: undefined,
localS3: undefined,
localHost: undefined,
localWebHost: undefined,
localSupa: undefined,
localSupaAnon: undefined,
localApi: undefined,
localApiFiles: undefined,
allowModifyUrl: undefined,
defaultChannel: undefined,
appId: undefined,
keepUrlPathAfterReload: undefined,
disableJSLogging: undefined,
shakeMenu: undefined,
},
},
};
export default config;

方法

方法

notifyAppReady()

notifyAppReady()
notifyAppReady() => Promise<AppReadyResult>

Notify Capacitor Updater that the current bundle is working (a rollback will occur if this method is not called on every app launch) By default this method should be called in the first 10 sec after app launch, otherwise a rollback will occur. Change this behaviour with {@link appReadyTimeout}

返回值 Promise<AppReadyResult>


setUpdateUrl(…)

setUpdateUrl(…)
setUpdateUrl(options: UpdateUrl) => Promise<void>

设置应用更新URL,用于检查更新

参数类型描述
optionsUpdateUrl用于检查更新的 URL。

自: 5.4.0


setStatsUrl(options: StatsUrl) => Promise<void>

设置应用的 statsUrl,用于发送统计数据。传入空字符串将禁用统计数据收集。

参数类型描述
optionsStatsUrl用于发送统计数据的 URL。

自从: 5.4.0


setChannelUrl(…)

标题:setChannelUrl(…)
setChannelUrl(options: ChannelUrl) => Promise<void>

设置应用程序的 channelUrl,这将用于设置 channel。

参数类型描述
optionsChannelUrl用于设置 channel 的 URL。

自从: 5.4.0


download(options: DownloadOptions) => Promise<BundleInfo>

从提供的 URL 下载一个新的包,应该是一个 zip 文件,包含文件或一个唯一 id 内部包含所有文件

ParamType描述
optionsDownloadOptionsThe {@link} 下载选项} for downloading a new bundle zip.

Returns: Promise<BundleInfo>


next(options: BundleId) => Promise<BundleInfo>

在应用程序重新加载时设置下一个要使用的捆绑包。

参数类型描述
optionsBundleId包含下一次应用程序启动时设置的捆绑包 ID。 {@link} 捆绑包信息.id}

返回: Promise<BundleInfo>


set(options: BundleId) => Promise<void>

设置当前捆绑包并立即重新加载应用程序。

参数类型描述
optionsBundleId一个 {@link} 对象,包含要设置为当前的新包 ID。 delete(…)标题:delete(…)

delete(options: BundleId) => Promise<void>

类型

delete(…)Section titled “delete(…)”简介
optionsBundleId一个 {@link} BundleId} 对象,包含要删除的包的 ID(注意,这是包 ID,而不是版本名称)

list(options?: ListOptions | undefined) => Promise<BundleListResult>

获取本地下载的所有包

ParamType简介
optionsListOptionsThe {@link} ListOptions}用于列出捆绑包

返回: Promise<BundleListResult>


reset(options?: ResetOptions | undefined) => Promise<void>

重置应用到捆绑包(苹果应用商店/谷歌商店发送的那个)或最后成功加载的捆绑包。 builtin 参数

类型描述包含{@link}
optionsResetOptionsreset(…) ResetOptions.toLastSuccessful}, true 重置为内置的捆绑包并 false 会重置为最后一次成功加载的捆绑包。

current() => Promise<CurrentBundleResult>

获取当前捆绑包,如果没有设置则返回 builtincurrentNative是设备上安装的原始捆绑包

返回: Promise<CurrentBundleResult>


reload() => Promise<void>

重新加载视图


setMultiDelay(…)

标题:setMultiDelay(…)
setMultiDelay(options: MultiDelayConditions) => Promise<void>

设置一个 {@link} 延迟条件} date 延迟条件 background } nativeVersion 延迟条件 kill }

延迟条件(版本号) 当所有条件都满足时,更新过程将重新启动,更新将在后台或杀死应用后安装。 对于 "kind",值应为 ISO8601 日期字符串。 对于 "kind",值应为毫秒数。 对于 "kind",值应为版本号。 对于 "kind",值不用于。 该函数在选项 kill 时会触发更新,但在其他选项中不会触发更新。这个问题将在未来的重大版本中得到解决。类型描述
optionsMultiDelayConditions包含 {@link} MultiDelayConditions} 数组的条件,用于设置

自从: 4.3.0


cancelDelay() => Promise<void>

取消 {@link} DelayCondition} 以立即处理更新。

自从: 4.0.0


getLatest(options?: GetLatestOptions | undefined) => Promise<LatestVersion>

获取最新的可用更新包

参数类型
optionsGetLatestOptions

返回: Promise<LatestVersion>

自从: 4.0.0


setChannel(options: SetChannelOptions) => Promise<ChannelRes>

设置此设备的插件管理本地频道。频道必须 allow_device_self_set 必须启用才能正常工作。

setChannel() 验证频道与后端,存储设备本地选择的频道。它不会创建或更新后端设备覆盖,因此设备不会在Capgo控制台中显示为覆盖。只有从控制台或公共API创建的 assignments 才会在设备覆盖 UI 中显示。

重要注意事项:

  • 不要在启动时使用此方法设置频道。请在__CAPGO_KEEP_0__配置中使用 defaultChannel in your Capacitor config instead.
  • 公共频道不能自行分配。
  • 如果一个频道被标记为 ,调用 public会返回错误。要使用公共频道,请调用 setChannel() 设备将自动切换到匹配的公共频道。 unsetChannel() instead - the device will automatically fall back to the matching public channel.
  • 使用 listChannels() 来发现可用的频道以及它们是否允许自我赋值。
参数类型描述
optionsSetChannelOptions是否是 {@link} 设置频道选项}频道设置

返回值: Promise<ChannelRes>

4.7.0


unsetChannel(options: UnsetChannelOptions) => Promise<void>

清除本地设备的插件管理的频道。该操作仅清除本地存储的频道, setChannel()不删除仪表板或公共API设备覆盖记录。

调用此方法后,正常频道顺序适用:存在仪表板或公共API设备覆盖记录时仍然有效;否则设备可以回落到匹配公共/默认频道的条件(平台、设备类型、构建类型)。

此功能有以下用途:

  • 您想将设备移回默认更新轨道
  • 您想使用公共频道(由于公共频道无法自行分配至__CAPGO_KEEP_0__设备覆盖记录) setChannel())
参数类型
optionsUnsetChannelOptions

4.7.0


getChannel() => Promise<GetChannelRes>

获取此设备的频道

返回: Promise<GetChannelRes>

自: 4.8.0


listChannels() => Promise<ListChannelsResult>

列出此设备可用的所有频道。返回与设备当前环境(平台、模拟器/真实设备、开发/生产构建)兼容的频道,并且是公共频道或允许自我赋值。

结果中的每个频道包括:

  • public如果 true,这是一个 默认频道.您无法自行将其分配给它使用 setChannel().请勿使用 unsetChannel(),如果您移除您的频道分配使用
  • allow_self_set,设备将自动从公共频道接收更新。 true如果 ,这是一个自分配频道 setChannel().

.您可以显式将设备分配到此频道使用 Promise<ListChannelsResult>

返回: 7.5.0


setCustomId(options: SetCustomIdOptions) => Promise<void>

设置自定义设备 ID

参数类型描述
optionsSetCustomIdOptions是设置自定义 ID {@link} SetCustomIdOptions} 自定义 ID

自从: 4.9.0


getBuiltinVersion() => Promise<BuiltinVersion>

获取本机应用程序版本或在配置中设置的内置版本

返回值: Promise<BuiltinVersion>

自: 5.2.0


getDeviceId()

getDeviceId()
getDeviceId() => Promise<DeviceId>

获取设备的唯一 ID(用于自动更新服务器)

返回值: Promise<DeviceId>


getPluginVersion()

getPluginVersion()
getPluginVersion() => Promise<PluginVersion>

获取本地 Capacitor Updater 插件版本(用于自动更新服务器)

返回值: Promise<PluginVersion>


isAutoUpdateEnabled()

isAutoUpdateEnabled()
isAutoUpdateEnabled() => Promise<AutoUpdateEnabled>

获取自动更新配置的状态。

返回: Promise<AutoUpdateEnabled>


removeAllListeners()

removeAllListeners()
removeAllListeners() => Promise<void>

addListener('download', …) 1.0.0


addListener(eventName: 'download', listenerFunc: (state: DownloadEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听包下载事件。触发一次下载开始、下载中和下载完成时。 此方法将返回下载百分比

参数类型
eventName’download’
listenerFunc(state: DownloadEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.0.11


addListener(‘noNeedUpdate’, …)

标题:addListener(‘noNeedUpdate’, …)
addListener(eventName: 'noNeedUpdate', listenerFunc: (state: NoNeedEvent) => void) => Promise<PluginListenerHandle>

监听不需要更新事件,适用于每次启动应用时强制检查

参数类型
eventName’noNeedUpdate’
listenerFunc(state: NoNeedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘updateAvailable’,…)

标题:addListener(‘updateAvailable’,…)
addListener(eventName: 'updateAvailable', listenerFunc: (state: UpdateAvailableEvent) => void) => Promise<PluginListenerHandle>

监听可用更新事件,适用于每次启动应用时强制检查更新

参数类型
eventName’updateAvailable’
listenerFunc(state: UpdateAvailableEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘downloadComplete’,…)

标题:addListener(‘downloadComplete’,…)
addListener(eventName: 'downloadComplete', listenerFunc: (state: DownloadCompleteEvent) => void) => Promise<PluginListenerHandle>

监听下载完成事件。

参数类型
eventName’downloadComplete’
listenerFunc(state: DownloadCompleteEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘majorAvailable’,…)

标题:addListener(‘majorAvailable’,…)
addListener(eventName: 'majorAvailable', listenerFunc: (state: MajorAvailableEvent) => void) => Promise<PluginListenerHandle>

监听App中Major更新事件,告知您何时发生重大更新被禁用设置disableAutoUpdateBreaking

参数类型
eventName’majorAvailable’
listenerFunc(state: MajorAvailableEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘updateFailed’,…)

标题:addListener(‘updateFailed’,…)
addListener(eventName: 'updateFailed', listenerFunc: (state: UpdateFailedEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听更新失败事件,让你知道下次启动 App 时更新安装失败

参数类型
eventName’updateFailed’
listenerFunc(state: UpdateFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 2.3.0


addListener(‘downloadFailed’,…)

标题:addListener(‘downloadFailed’,…)
addListener(eventName: 'downloadFailed', listenerFunc: (state: DownloadFailedEvent) => void) => Promise<PluginListenerHandle>

在 App 中监听下载失败事件,告诉你一个包下载失败了

参数类型
eventName’downloadFailed’
listenerFunc(state: DownloadFailedEvent) => void

返回值: Promise<PluginListenerHandle>

自: 4.0.0


addListener(‘appReloaded’,…)

标题:addListener(‘appReloaded’,…)
addListener(eventName: 'appReloaded', listenerFunc: () => void) => Promise<PluginListenerHandle>

在 App 中监听重载事件,告诉你重载已经发生

参数类型
eventName’appReloaded’
listenerFunc() => void

返回值: Promise<PluginListenerHandle>

自: 4.3.0


addListener(‘appReady’,…)

标题:addListener(‘appReady’,…)
addListener(eventName: 'appReady', listenerFunc: (state: AppReadyEvent) => void) => Promise<PluginListenerHandle>

监听 AppReady 事件,让你知道 App 已经准备好使用

参数类型
eventName’appReady’
listenerFunc(state: AppReadyEvent) => void

返回值: Promise<PluginListenerHandle>

自: 5.1.0


isAutoUpdateAvailable()

标题:isAutoUpdateAvailable()
isAutoUpdateAvailable() => Promise<AutoUpdateAvailable>

获取是否有自动更新可用(不受serverUrl禁用)。

返回: Promise<AutoUpdateAvailable>


getNextBundle()

getNextBundle()部分
getNextBundle() => Promise<BundleInfo | null>

获取下一次将在应用重载时使用的包。

如果没有下一个包,则返回 null。 Promise<BundleInfo | null>

返回: 6.8.0


setShakeMenu(options: SetShakeMenuOptions) => Promise<void>

启用或禁用shake菜单用于调试/测试目的

参数类型描述
optionsSetShakeMenuOptions包含启用或禁用的布尔值以启用或禁用shake菜单

自: 7.5.0


isShakeMenuEnabled() => Promise<ShakeMenuEnabled>

获取shake菜单的当前状态

返回: Promise<ShakeMenuEnabled>

自: 7.5.0


属性类型
bundleBundleInfo
属性类型
idstring
versionstring
downloadedstring
checksumstring
statusBundleStatus
属性类型
urlstring

统计URL

统计URL
属性类型
urlstring

频道URL

频道URL
属性类型
urlstring

下载选项

下载选项

此 URL 和版本用于从服务器下载捆绑包,如果您使用后端,所有信息都将通过方法 getLatest 提供。如果您不使用后端,则需要提供捆绑包的 URL 和版本。SessionKey 如果您使用命令 CLI 加密捆绑包,则需要提供它们,您应该从命令的结果中接收它们。

属性类型描述默认值
urlstring捆绑包 zip 文件的 URL (例如: dist.zip)。(这可以是任何 URL。例如: Amazon S3,一个 GitHub 标签,您托管的任何其他捆绑包。)
versionstringThe version code/name of this bundle/version
sessionKeystring更新的会话密钥,当捆绑包使用会话密钥加密时undefined4.0.0
checksumstring更新的校验和,它应该是 sha256,如果捆绑包加密,则应该使用私钥加密undefined4.0.0
manifestManifestEntry[]Delta (manifest) 多文件下载的清单undefined6.1.0
属性类型
file_namestring | null
file_hashstring | null
download_urlstring | null
属性类型
idstring
属性类型
bundlesBundleInfo[]
属性类型描述默认值
rawboolean是否返回原始包列表或清单。如果为真,列表将尝试读取内部数据库而不是磁盘上的文件。false6.14.0
属性类型
toLastSuccessfulboolean

当前包结果

当前包结果
属性类型
bundleBundleInfo
nativestring

多延迟条件

多延迟条件
属性类型
delayConditionsDelayCondition[]

延迟条件

延迟条件
属性类型描述
kindDelayUntilNext设置延迟条件在 setMultiDelay 中
valuestring

最新版本

最新版本
属性类型描述
versionstringgetLatest 方法的结果4.0.0
checksumstring6
majorboolean
messagestring
sessionKeystring
errorstring
oldstring
urlstring
manifestManifestEntry[]6.1

获取最新选项

获取最新选项
属性类型描述默认
channelstring获取最新版本的渠道必须允许 '自行分配'undefined6.8.0

渠道Res

渠道Res
属性类型描述
statusstring设置的渠道当前状态4.7.0
errorstring
messagestring
属性类型
channelstring
triggerAutoUpdateboolean
属性类型
triggerAutoUpdateboolean
属性类型描述自从
channelstring获取频道的当前状态4.8.0
errorstring
messagestring
statusstring
allowSetboolean

ListChannelsResult

标题:ListChannelsResult
属性类型描述自从
channelsChannelInfo[]可用的频道列表7.5.0
属性类型描述
idnumber数字频道 ID7.5.0
namestring频道名称7.5.0
publicboolean如果为 true,则这是一个默认/备份频道。设备无法自行将其分配到公共频道。相反,当设备使用 unsetChannel()移除其频道覆盖时(使用 7.5.0
allow_self_setboolean),它将自动从匹配的公共频道接收更新。 setChannel()如果为 true,则设备可以使用 7.5.0

explicitly 将其分配到此频道。通常用于 beta 测试、A/B 测试或优惠升级跟踪。 name频道命令使用频道 id.

,而不是数字频道 ID

Section titled “SetCustomIdOptions”
属性类型
customIdstring
属性类型
versionstring
属性类型
deviceIdstring

插件版本

插件版本
属性类型
versionstring

自动更新

自动更新
属性类型
enabledboolean

插件监听器句柄

属性
类型下载事件
remove() => Promise<void>

PluginVersion

下载事件
属性类型描述
percentnumber下载进度,范围为 0 到 100。4.0.0
bundleBundleInfo

无需事件

属性
类型描述protectedTokens
bundleBundleInfo下载进度,范围为 0 到 100。4.0.0

UpdateAvailableEvent

更新可用事件
PropType描述Since
bundleBundleInfo下载进度,范围为 0 到 100。4.0.0

DownloadCompleteEvent

下载完成事件
PropType功能描述
bundleBundleInfo当有新版本可用时触发。4.0.0

MajorAvailableEvent

标题:MajorAvailableEvent
属性类型功能描述
versionstring当有新主版本包可用时触发。4.0.0
属性类型描述
bundleBundleInfo安装更新失败时触发。4.0.0

下载失败事件

标题:下载失败事件
属性类型描述
versionstring下载失败时触发4.0.0

AppReadyEvent

AppReadyEvent
属性类型描述
bundleBundleInfo当应用程序准备好使用时发出。5.2.0
statusstring

AutoUpdateAvailable

AutoUpdateAvailable
属性类型
availableboolean
属性类型
enabledboolean
属性类型
enabledboolean

pending: 等待安装的包 设置 作为下一个捆绑包。 下载中:捆绑包正在下载中。 成功:捆绑包已下载并准备好

‘success’ | ‘error’ | ‘pending’ | ‘downloading’

‘background’ | ‘kill’ | ‘nativeVersion’ | ‘date’

错误:捆绑包下载失败。

延迟到下一个

标题:延迟到下一个 继续从功能和设置 to plan dashboard and API operations, connect it with Using @capgo/capacitor-updater 为使用 @capgo/capacitor-updater 的原生能力 API 概述 为 API 概述 的实现细节 介绍 为介绍 的实现细节 API 密钥 为 API 密钥 的实现细节, 设备 为设备 的实现细节。