getAppIdByName
Start from API_LEVEL
3.6
. Please refer to API_LEVEL.
Fuzzy match the English name of installed Mini Programs on the device by name.
Type
function getAppIdByName(name: string): Result
Parameters
Result
Type | Description |
---|---|
number | Matched Mini Program ID, returns invalid ID when match fails |
Example
import { getAppIdByName } from '@zos/router'
const appId = getAppIdByName('calculator')
console.log(appId)