1# AutoStartupInfo (系统接口) 2 3定义开机自启动应用组件信息。 4 5> **说明:** 6> 7> 本模块首批接口从API version 11 开始支持。后续版本的新增接口,采用上角标单独标记接口的起始版本。 8> 本模块接口仅可在Stage模型下使用。 9> 本模块接口为系统接口。 10 11## 属性 12 13**系统接口**:此接口为系统接口。 14 15**系统能力**:SystemCapability.Ability.AbilityRuntime.Core 16 17| 名称 | 类型 | 必填 | 说明 | 18| ------------------------- | ------ | ---- | --------- | 19| bundleName | string | 是 | 应用程序的Bundle名称。 | 20| moduleName | string | 否 | 应用程序的Module名称。 | 21| abilityName | string | 是 | 应用程序的Ability名称。 | 22| abilityTypeName | string | 否 | 应用程序的Ability类型。 | 23| appCloneIndex | number | 否 | 分身应用索引。 | 24 25**示例:** 26 27```ts 28import { autoStartupManager, common } from '@kit.AbilityKit'; 29 30autoStartupManager.setApplicationAutoStartup({ 31 bundleName: 'com.example.autostartupapp', 32 moduleName: 'entry', 33 abilityName: 'EntryAbility', 34 abilityTypeName: 'ServiceExtension' 35} as common.AutoStartupInfo, (err, data) => { 36 console.info('====> err: ' + JSON.stringify(err) + ' data: ' + JSON.stringify(data)); 37}); 38``` 39