Closed mannueru closed 2 years ago
android.app.Application
is the android native API https://developer.android.com/reference/android/app/Application
It doesn't need to be imported - it's defined during runtime.
If you are getting type errors, you likely need to install @nativescript/types
to include the native android api types - but you can also just //@ts-ignore
the line.
thanks!!! I already understood the process
I'm starting with nativescript 8 but the documentation for version 8 is horrible, version 7 has much better documentation but they are not compatible in most cases.
The official documentation shows an example to extending the android application, but it does not show its imports:
I couldn't get the "android.app.Application" class to be recognized, even after importing the following:
import { android } from '@nativescript/core/application';
Looking at the content of "@nativescript/core/application", I see that those properties do not exist and that for example the property "android.app.Application" was changed to "nativeApp".
I don't know if I'm importing the correct class or maybe I'm missing a type import or something like that, because in the NativeScript source codes they refer to "android.app.Application" without any import that refers to it.
I know I'm missing something, but seriously the official documentation for version 8 needs to be corrected or improved