1- console . log ( "####### ------ APP MODULES START " )
1+ console . log ( "####### ------ APP MODULES START " ) ;
22
33import * as application from "tns-core-modules/application" ;
44import * as trace from "tns-core-modules/trace" ;
5+ trace . addCategories ( trace . categories . NativeLifecycle ) ;
6+ trace . addCategories ( trace . categories . Navigation ) ;
7+ trace . addCategories ( trace . categories . Transition ) ;
58trace . enable ( ) ;
6- trace . setCategories ( trace . categories . concat (
7- trace . categories . NativeLifecycle ,
8- trace . categories . Navigation ,
9- trace . categories . Transition
10- ) ) ;
119
1210var countResume = 0 ;
1311var countSuspend = 0 ;
@@ -25,7 +23,7 @@ application.on("uncaughtError", args => {
2523 }
2624} ) ;
2725
28- application . on ( application . launchEvent , function ( args : application . ApplicationEventData ) {
26+ application . on ( application . launchEvent , function ( args : application . LaunchEventData ) {
2927 if ( args . android ) {
3028 // For Android applications, args.android is an android.content.Intent class.
3129 console . log ( "### Launched application with: " + args . android + "." ) ;
@@ -35,7 +33,7 @@ application.on(application.launchEvent, function (args: application.ApplicationE
3533 }
3634} ) ;
3735
38- application . on ( application . suspendEvent , function ( args : application . ApplicationEventData ) {
36+ application . on ( application . suspendEvent , function ( args : application . ApplicationEventData ) {
3937 if ( args . android ) {
4038 // For Android applications, args.android is an android activity class.
4139 console . log ( "#" + ++ countSuspend + "# SuspendEvent Activity: " + args . android ) ;
@@ -45,7 +43,7 @@ application.on(application.suspendEvent, function (args: application.Application
4543 }
4644} ) ;
4745
48- application . on ( application . resumeEvent , function ( args : application . ApplicationEventData ) {
46+ application . on ( application . resumeEvent , function ( args : application . ApplicationEventData ) {
4947 if ( args . android ) {
5048 // For Android applications, args.android is an android activity class.
5149 console . log ( "#" + ++ countResume + "# ResumeEvent Activity: " + args . android ) ;
@@ -55,7 +53,7 @@ application.on(application.resumeEvent, function (args: application.ApplicationE
5553 }
5654} ) ;
5755
58- application . on ( application . exitEvent , function ( args : application . ApplicationEventData ) {
56+ application . on ( application . exitEvent , function ( args : application . ApplicationEventData ) {
5957 if ( args . android ) {
6058 // For Android applications, args.android is an android activity class.
6159 console . log ( "### ExitEvent Activity: " + args . android ) ;
@@ -65,7 +63,7 @@ application.on(application.exitEvent, function (args: application.ApplicationEve
6563 }
6664} ) ;
6765
68- application . on ( application . lowMemoryEvent , function ( args : application . ApplicationEventData ) {
66+ application . on ( application . lowMemoryEvent , function ( args : application . ApplicationEventData ) {
6967 if ( args . android ) {
7068 // For Android applications, args.android is an android activity class.
7169 console . log ( "### LowMemoryEvent Activity: " + args . android ) ;
@@ -75,12 +73,15 @@ application.on(application.lowMemoryEvent, function (args: application.Applicati
7573 }
7674} ) ;
7775
78- application . on ( application . uncaughtErrorEvent , function ( args : application . UnhandledErrorEventData ) {
79- console . log ( "### NativeScriptError: " + args . error ) ;
80- console . log ( "### nativeException: " + ( < any > args . error ) . nativeException ) ;
81- console . log ( "### stackTace : " + ( < any > args . error ) . stackTrace ) ;
82- console . log ( "### stack: " + args . error . stack ) ;
76+ application . on ( application . uncaughtErrorEvent , function ( args : application . UnhandledErrorEventData ) {
77+ console . log ( "### NativeScriptError: " + args . error ) ;
78+ console . log ( "### nativeException: " + ( < any > args . error ) . nativeException ) ;
79+ console . log ( "### stackTrace : " + ( < any > args . error ) . stackTrace ) ;
80+ console . log ( "### stack: " + args . error . stack ) ;
8381} ) ;
8482
8583application . setCssFileName ( "ui-tests-app/app.css" ) ;
84+
8685application . start ( { moduleName : "ui-tests-app/main-page" } ) ;
86+ // application.run({ moduleName: "ui-tests-app/app-root" });
87+ // application.run();
0 commit comments