目录

Why Does the Update on AppGallery Feature Throw an Exception Indicating that the App Is Not Running in the Foreground?

Problem

When I call an API related to the Update on AppGallery feature, an exception is thrown, indicating that the app is not running in the foreground.

Solution

Call APIs of the Update on AppGallery feature only when the app is running in the foreground.