Custom application onCreate() not getting invoked


#1

I need to customize “Application” in order to invoke registerActivityLifecycleCallbacks() method from Application onCreate(). So far, I don’t see the onCreate() getting called. I have done the following.

  1. Added application.android.ts in “app” folder. The content of the file is from this page.
    https://docs.nativescript.org/runtimes/android/advanced-topics/extend-application-activity
    Added a console.log() statement in onCreate() method.
  2. Edited AndroidManifest.xml om app\App_Resources folder to change the value of “android:name” attribute in tag.
  3. Do “tns run android”. Application is freshly launched but no console message.

Thanks for your help.