IAssistanceChannel, IAbilityContinuation, ILifecycle, Contextpublic class AceServiceAbility extends AceAbility
Ability. Any class specific to application running
should derive from AceServiceAbility.Ability.LayoutParamsHelper, Ability.WindowAttributeHelperFORM_INVISIBLE, FORM_VISIBLECONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESOUCE_ONLY, CONTEXT_RESTRICTED, MODE_APPEND, MODE_PRIVATE| 构造器 | 说明 |
|---|---|
AceServiceAbility() |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
protected FormState |
onAcquireFormState(Intent intent) |
on acquire state
|
protected void |
onCastTempForm(long formId) |
cast a temp form by the given formId
|
protected void |
onCommand(Intent intent,
boolean restart,
int startId) |
Called back when Service is started.
|
protected IRemoteObject |
onConnect(Intent intent) |
Called back when a Service ability is first connected to an ability.
|
protected ProviderFormInfo |
onCreateForm(Intent intent) |
Form ability on create form
|
protected void |
onDeleteForm(long formId) |
update a form by the given formId
|
protected void |
onDisconnect(Intent intent) |
ability onDisconnect
|
protected void |
onEventNotify(Map<Long,Integer> formEvents) |
on form notify
|
void |
onReconnect(Intent intent) |
ability onReconnect
|
void |
onStart(Intent intent) |
Called back when an ability is started for initialization (it can be called only once in the entire lifecycle of
an ability).
|
void |
onStop() |
Called back before an ability is destroyed.
|
protected void |
onTriggerFormEvent(long formId,
String message) |
on form event
|
protected void |
onUnloadForm() |
destroy form
|
protected void |
onUpdateForm(long formId) |
update a form by the given formId
|
void |
setInstanceName(String name) |
Sets an instance name.
|
addActionRoute, batchInsert, call, cancelBackgroundRunning, connectAbility, continueAbility, continueAbility, continueAbilityReversibly, continueAbilityReversibly, createPipeFile, delete, denormalizeUri, disconnectAbility, dispatchAccessibilityEventInfo, executeBatch, executeOperation, findComponentById, getAbilityName, getAbilityPackage, getAdmissionTransitionConcurEnabled, getAdmissionTransitionObject, getAVController, getBackTransitionConcurEnabled, getBackTransitionObject, getContinuationRegisterManager, getContinuationState, getCurrentFocus, getFileTypes, getIntent, getLayoutParams, getLifecycle, getOriginalDeviceId, getQuitTransitionObject, getReadmissionTransitionObject, getSharedItemAdmissionTransitionObject, getSharedItemBackTransitionObject, getSharedItemQuitTransitionObject, getSharedItemReadmissionTransitionObject, getState, getType, getVolumeTypeAdjustedByKey, getWindow, hasWindowFocus, insert, isTemporary, isTerminating, keepBackgroundRunning, normalizeUri, onCommand, onCreateForm, onDeleteForm, onEventDispatch, onHotkeyTriggered, onInitialized, onKeyPressAndHold, onLeaveForeground, onMissionDeleted, onNewDescription, onOrientationChanged, onPostActive, onPostStart, onSetCaller, onStoreDataWhenConfigChange, onTopActiveAbilityChanged, onTriggerFormEvent, onUpdateForm, onWindowFocusChanged, openFile, openRawFile, parsePredictionArgsReference, parseValuesBucketReference, postTask, query, reload, reverseContinueAbility, setAbilitySliceAnimator, setAdmissionTransitionConcurEnabled, setAdmissionTransitionObject, setAVController, setBackTransitionConcurEnabled, setBackTransitionObject, setFormNextRefreshTime, setIntent, setIsAmbientMode, setLayoutParams, setMainRoute, setQuitTransitionObject, setReadmissionTransitionObject, setResult, setSharedItemAdmissionTransitionObject, setSharedItemBackTransitionObject, setSharedItemQuitTransitionObject, setSharedItemReadmissionTransitionObject, setSwipeToDismiss, setUIContent, setUIContent, setVolumeTypeAdjustedByKey, setWindowBackgroundColor, shutdown, startAbility, startAbility, startAbility, startAbility, startAbilityForResult, startAbilityForResult, startAssistAbility, stopAbility, stopAssistAbility, supportHighPerformanceUI, terminateAbility, update, updateForm, updateForm, updateForm, updateFormattachBaseContext, canRequestPermission, compelVerifyCallerPermission, compelVerifyCallerUriPermission, compelVerifyPermission, compelVerifyPermission, compelVerifyUriPermission, compelVerifyUriPermission, compelVerifyUriPermission, createBundleContext, createParallelTaskDispatcher, createSerialTaskDispatcher, deleteFile, displayUnlockMissionMessage, getAbilityInfo, getAbilityManager, getAbilityPackageContext, getApplicationContext, getApplicationInfo, getAppType, getBundleCodePath, getBundleManager, getBundleName, getBundleResourcePath, getCacheDir, getCaller, getCallingAbility, getCallingBundle, getClassloader, getCodeCacheDir, getColor, getColorMode, getContext, getDatabaseDir, getDataDir, getDir, getDisplayOrientation, getDistributedDir, getElementName, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getGlobalTaskDispatcher, getHapModuleInfo, getIntArray, getLastStoredDataWhenConfigChanged, getLocalClassName, getMainTaskDispatcher, getNoBackupFilesDir, getPattern, getPreferencesDir, getProcessInfo, getProcessName, getResourceManager, getResourceManager, getString, getString, getStringArray, getTheme, getThemeId, getUITaskDispatcher, init, isCredentialEncryptedStorage, isDeviceEncryptedStorage, isUpdatingConfigurations, lockMission, printDrawnCompleted, requestPermissionsFromUser, restart, setColorMode, setDisplayOrientation, setPattern, setShowOnLockScreen, setTheme, setTransitionAnimation, setWakeUpScreen, startAbilities, startAbility, startAbility, startAbility, switchToCredentialEncryptedStorageContext, switchToDeviceEncryptedStorageContext, terminateAbility, terminateAbilityResult, unlockMission, verifyCallingOrSelfPermission, verifyCallingPermission, verifyPermission, verifySelfPermissiononAbilityResult, onActive, onBackground, onBackPressed, onCompleteContinuation, onConfigurationUpdated, onConnected, onConnectFailed, onDisconnected, onForeground, onInactive, onKeyDown, onKeyUp, onMemoryLevel, onNewIntent, onNewWant, onRemoteTerminated, onRequestPermissionsFromUserResult, onRestoreAbilityState, onRestoreData, onSaveAbilityState, onSaveData, onStartContinuation, onTouchEvent, pushPage, setPageParamsonFailedContinuationprotected void onUnloadForm()
onUnloadForm 在类中 Abilitypublic void onStart(Intent intent)
AbilityMost initialization operations should be performed by calling this method. For example, you can use the
current method to call Ability.setMainRoute(java.lang.String) and
Ability.addActionRoute(java.lang.String,java.lang.String) to set the main router and action router for a Page ability.
onStart 在类中 AceAbilityintent - Indicates information carried when this ability is started. Note: For a Service ability,
null is passed.public void onStop()
AbilityThis method indicates the end of the ability lifecycle. It can be executed after the ability calls the
Ability.terminateAbility() method or the last ability slice of the ability calls the
AbilitySlice#terminate() method. Generally, this method is used to clear resources.
onStop 在类中 AceAbilityprotected void onCommand(Intent intent, boolean restart, int startId)
onCommand 在类中 Abilityintent - Indicates the intent of Service to start.restart - Indicates the startup mode. The value true indicates that Service is restarted after being
destroyed, and the value false indicates a normal startup.startId - Indicates the number of times the Service ability has been started. The startId is
incremented by 1 every time the ability is started. For example, if the ability has been started
for six times, the value of startId is 6.protected IRemoteObject onConnect(Intent intent)
AbilityThis method is called only on Service abilities. You can override the method to return the proxy of a Service ability.
protected void onDisconnect(Intent intent)
onDisconnect 在类中 Abilityintent - Indicates the intent of Service to disconnectpublic void onReconnect(Intent intent)
onReconnect 在类中 Abilityintent - Indicates the intent of Service to reconnectpublic void setInstanceName(String name)
setInstanceName 在类中 AceAbilityname - Indicates the instance name. The value cannot be an empty string.
Otherwise, your application cannot run properly.protected ProviderFormInfo onCreateForm(Intent intent)
onCreateForm 在类中 Abilityintent - intent infoprotected void onUpdateForm(long formId)
onUpdateForm 在类中 AbilityformId - the form to updateprotected void onDeleteForm(long formId)
onDeleteForm 在类中 AbilityformId - the form to updateprotected void onCastTempForm(long formId)
onCastTempForm 在类中 AbilityformId - the form to castprotected void onTriggerFormEvent(long formId,
String message)
onTriggerFormEvent 在类中 AbilityformId - the given formmessage - the given messageprotected void onEventNotify(Map<Long,Integer> formEvents)
onEventNotify 在类中 AbilityformEvents - the given eventsprotected FormState onAcquireFormState(Intent intent)
onAcquireFormState 在类中 Abilityintent - the given form data