Skip to content

Commit b09fce6

Browse files
federicobartolimeta-codesync[bot]
authored andcommitted
Clarify Android AppState background API docs (#56779)
Summary: Syncs the in-package AppState API documentation with the Android AppState clarification added in react/react-native-website#5079. Android AppState `background` was already documented as including another `Activity`. This clarifies that temporary system activities, such as autofill credential pickers, are included too. ## Changelog: [GENERAL] [CHANGED] - Clarify Android AppState background API documentation. Pull Request resolved: #56779 Test Plan: Documentation-only change. Verified with: - `git diff --check` - `prettier --check packages/react-native/Libraries/AppState/AppState.js packages/react-native/Libraries/AppState/AppState.d.ts` Reviewed By: cortinico Differential Revision: D104810583 Pulled By: huntie fbshipit-source-id: 17d2ec312c65c91b8086bd382f733f3cceb4da8a
1 parent 74b1a4d commit b09fce6

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

packages/react-native/Libraries/AppState/AppState.d.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ import {NativeEventSubscription} from '../EventEmitter/RCTNativeAppEventEmitter'
2323
*
2424
* App States
2525
* active - The app is running in the foreground
26-
* background - The app is running in the background. The user is either in another app or on the home screen
26+
* background - The app is running in the background. The user is either in another app,
27+
* on the home screen
28+
* [Android only] on another Activity, including temporary system
29+
* activities such as autofill credential pickers (even if launched by your app or the system)
2730
* inactive [iOS] - This is a transition state that happens when the app launches, is asking for permissions or when a call or SMS message is received.
2831
* unknown [iOS] - Initial value until the current app state is determined
2932
* extension [iOS] - The app is running as an app extension

packages/react-native/Libraries/AppState/AppState.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import NativeAppState from './NativeAppState';
1919
* background - The app is running in the background. The user is either:
2020
* - in another app
2121
* - on the home screen
22-
* - @platform android - on another Activity (even if it was launched by your app)
22+
* - [Android only] on another Activity, including temporary system activities such
23+
* as autofill credential pickers (even if launched by your app or the system)
2324
* @platform ios - inactive - This is a state that occurs when transitioning between foreground & background, and during periods of inactivity such as entering the multitasking view, opening the Notification Center or in the event of an incoming call.
2425
*/
2526
export type AppStateStatus =

0 commit comments

Comments
 (0)