You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-10Lines changed: 27 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,30 @@
3
3
A simple module to gracefully finish the React Native android app programatically.
4
4
It is better to finish the app with its transition/animation rather than force kill the app process.
5
5
6
+
[Check out the Example app](https://github.com/RakaDoank/react-native-android-finish/tree/main/example) with the [double back pressed to exit](https://github.com/RakaDoank/react-native-android-finish/blob/main/example/App.tsx#L67)
Reverses the Activity Scene entry Transition, triggers the calling Activity to reverse its exit Transition, and calls the `finish()` when the exit Transition completes
50
-
Mostly, RN apps only need the `finish()`
66
+
### - finishAfterTransition()
67
+
Reverses the Activity Scene entry Transition, triggers the calling Activity to reverse its exit Transition, and calls the `finish()` when the exit Transition completes
51
68
```ts
52
69
import {
53
70
Button,
@@ -104,8 +121,8 @@ export default function App(): React.JSX.Element {
104
121
You can see the [AndroidFinish.kt](https://github.com/RakaDoank/react-native-android-finish/blob/main/android/src/main/java/com/audira/lib/reactnative/androidfinish/AndroidFinish.kt)
105
122
106
123
### About BackHandler API
107
-
This is not the same as [BackHandler.exitApp()](https://reactnative.dev/docs/backhandler) which simply minimizes the application.
124
+
This library is not the same as [BackHandler.exitApp()](https://reactnative.dev/docs/backhandler) which simply minimizes the application.
108
125
109
126
## For iOS
110
127
There is no behaviour on iOS to finish the app like this module in Android. It's their own guideline and should've be done by the user manually by remove the app in their recent apps.
111
-
Probably, you can use this alternative https://www.npmjs.com/package/react-native-exit-app.
128
+
Probably, you can use this alternative https://www.npmjs.com/package/react-native-exit-app.
0 commit comments