ended3월 23일· 1 sources
How can developers can automatically restart a HarmonyOS app after clearing all app data?
HarmonyOS 앱 데이터 전체 삭제 후 자동 재시작하는 방법
Why it matters
HarmonyOS's ApplicationContext.clearUpApplicationData exits the app without a callback, making automatic restart impossible directly. The workaround uses the appRecovery API to configure restart behavior and manually clears cache/data via the fs module, then calls appRecovery.restartApp() after cleanup completes.
1
Sources
+0
24h
—
Growth
174d
Active
HarmonyOSappRecoveryclearUpApplicationDataAbilityStagefs module