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
{{ message }}
This repository was archived by the owner on Nov 17, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: application-management.md
+93-78Lines changed: 93 additions & 78 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,12 +45,12 @@ application.start();
45
45
46
46
NativeScript applications have the following life cycle events.
47
47
48
-
+`launch`: This event is called when application launch.
49
-
+`suspend`: This event is called when the application is suspended.
50
-
+`resume`: This event is called when the application is resumed after it has been suspended.
51
-
+`exit`: This event is called when the application is about to exit.
52
-
+`lowMemory`: This event is called when the memory on the target device is low.
53
-
+`uncaughtError`: This event is called when an uncaught application error is present.
48
+
+`launch`: This event is raised when application launch.
49
+
+`suspend`: This event is raised when the application is suspended.
50
+
+`resume`: This event is raised when the application is resumed after it has been suspended.
51
+
+`exit`: This event is raised when the application is about to exit.
52
+
+`lowMemory`: This event is raised when the memory on the target device is low.
53
+
+`uncaughtError`: This event is raised when an uncaught application error is present.
54
54
55
55
### Example
56
56
@@ -188,53 +188,61 @@ application.start();
188
188
189
189
NativeScript applications have the following Android specific activity events:
190
190
191
-
+`activityCreated`: This event is called when activity is created.
192
-
+`activityDestroyed`: This event is called when activity is destroyed.
193
-
+`activityStarted`: This event is called when activity is started.
194
-
+`activityPaused`: This event is called when activity is paused.
195
-
+`activityResumed`: This event is called when activity is resumed.
196
-
+`activityStopped`: This event is called when activity is stopped.
197
-
+`saveActivityState`: This event is called to retrieve per-instance state from an activity before being killed so that the state can be restored.
198
-
+`activityResult`: This event is called when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it.
191
+
+`activityCreated`: This event is raised when activity is created.
192
+
+`activityDestroyed`: This event is raised when activity is destroyed.
193
+
+`activityStarted`: This event is raised when activity is started.
194
+
+`activityPaused`: This event is raised when activity is paused.
195
+
+`activityResumed`: This event is raised when activity is resumed.
196
+
+`activityStopped`: This event is raised when activity is stopped.
197
+
+`saveActivityState`: This event is raised to retrieve per-instance state from an activity before being killed so that the state can be restored.
198
+
+`activityResult`: This event is raised when an activity you launched exits, giving you the requestCode you started it with, the resultCode it returned, and any additional data from it.
199
+
+`activityBackPressed`: This event is raised when the activity has detected the user's press of the back key.
199
200
200
201
### Example
201
202
```JavaScript
202
203
var application =require("application");
203
204
204
205
application.mainModule="app/mainPage";
205
206
206
-
application.on(application.androidActivityCreatedEvent, function (args) {
0 commit comments