Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

Commit b271bbb

Browse files
committed
test(AngularApp): extend android application
1 parent 8c196ff commit b271bbb

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

demo/AngularApp/app/App_Resources/Android/AndroidManifest.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<uses-permission android:name="android.permission.INTERNET"/>
2020

2121
<application
22-
android:name="com.tns.NativeScriptApplication"
22+
android:name="org.myApp.Application"
2323
android:allowBackup="true"
2424
android:icon="@drawable/icon"
2525
android:label="@string/app_name"
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// the `JavaProxy` decorator specifies the package and the name for the native *.JAVA file generated.
2+
@JavaProxy("org.myApp.Application")
3+
class Application extends android.app.Application {
4+
onCreate(): void {
5+
super.onCreate();
6+
7+
// At this point modules have already been initialized
8+
9+
// Enter custom initialization code here
10+
}
11+
12+
protected attachBaseContext(baseContext: android.content.Context) {
13+
super.attachBaseContext(baseContext);
14+
15+
// This code enables MultiDex support for the application (if needed)
16+
// android.support.multidex.MultiDex.install(this);
17+
}
18+
}

demo/AngularApp/webpack.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module.exports = env => {
6767
target: nativescriptTarget,
6868
entry: {
6969
bundle: entryPath,
70+
application: "./application.android",
7071
},
7172
output: {
7273
pathinfo: false,

0 commit comments

Comments
 (0)