microsoft / react-native-code-push

React Native module for CodePush
http://appcenter.ms
Other
8.98k stars 1.47k forks source link

On Android mandatoryInstallMode and minimumBackgroundDuration don't work #2446

Closed wanderson-ra closed 1 year ago

wanderson-ra commented 1 year ago

Steps to Reproduce

  1. Setup React-native-codepush on latest version 7.1.0
  2. Add settings in root app:
export default CodePush({
  mandatoryInstallMode: CodePush.InstallMode.ON_NEXT_SUSPEND,
  minimumBackgroundDuration: 30,
  checkFrequency: CodePush.CheckFrequency.ON_APP_RESUME,
})(App);

Expected Behavior

Checking for updates should happen whenever the user goes back into the foreground and mandatory updates should be installed 30 seconds after the user has returned to the background.

Actual Behavior

Checking for updates happens whenever the user goes back to foreground and stops and mandatory updates are being installed immediately.

Captura de Tela 2023-02-17 às 16 54 12

Environment

Is there something wrong with my settings? On IOS works fine.

ah584d commented 1 year ago

Hi I have a similar issue, how did you manage to see the logs in release mode?

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

microsoft-github-policy-service[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs within 15 days of this comment.

microsoft-github-policy-service[bot] commented 1 year ago

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

microsoft-github-policy-service[bot] commented 1 year ago

This issue will now be closed because it hasn't had any activity for 15 days after stale. Please feel free to open a new issue if you still have a question/issue or suggestion.

ajitaro commented 11 months ago

happened in my app too. minimumBackgroundDuration didn't work, app was restarted immediately. Working fine when deployed in appcenter (testing). But sometimes in productions it happens (immediate restart)

MikhailSuendukov commented 9 months ago

Hi @wanderson-ra @wanderson-ra Could you please confirm what this issue still persist on latest version (8.2.1)