Skip to content

Commit 8fad8f8

Browse files
authored
fix(android): application.android outside src folder (#82)
1 parent 5324357 commit 8fad8f8

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

advanced-concepts.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ NativeScript provides a way to create custom `android.app.Application` and `andr
5959

6060
### Extending the Android Application
6161

62-
1. Create a new TypeScript file in your app folder - name it `application.android.ts` or `application.android.js` if you are using plain JS.
62+
1. Create a new TypeScript file in the root of your project folder - name it `application.android.ts` or `application.android.js` if you are using plain JS.
6363
::: tip Note
6464
Note the \*.android suffix - we want this file packaged for Android only.
6565
:::
@@ -139,7 +139,7 @@ module.exports = env => {
139139
// is relative to the webpack.config.js
140140
// you may need to use `./app/application.android if
141141
// your app source is located inside the ./app folder.
142-
config.entry('application').add('./src/application.android')
142+
config.entry('application').add('./application.android')
143143
}
144144
})
145145

@@ -1223,17 +1223,14 @@ SomeObject.myMethod(arr) // assuming the method is accepting an array of primiti
12231223
However there are some other helpful classes we can use to create a few other arrays of primitive types
12241224

12251225
```js
1226-
const byteArray = java.nio.ByteBuffer.wrap([1]).array();
1227-
const shortArray = java.nio.ShortBuffer.wrap([1]).array();
1228-
const intArray = java.nio.IntBuffer.wrap([1]).array();
1229-
const longArray = java.nio.LongBuffer.wrap([1]).array();
1230-
const floatArray = java.nio.FloatBuffer.wrap([1]).array();
1231-
const doubleArray = java.nio.DoubleBuffer.wrap([1]).array();
1226+
const byteArray = java.nio.ByteBuffer.wrap([1]).array()
1227+
const shortArray = java.nio.ShortBuffer.wrap([1]).array()
1228+
const intArray = java.nio.IntBuffer.wrap([1]).array()
1229+
const longArray = java.nio.LongBuffer.wrap([1]).array()
1230+
const floatArray = java.nio.FloatBuffer.wrap([1]).array()
1231+
const doubleArray = java.nio.DoubleBuffer.wrap([1]).array()
12321232
```
12331233

1234-
1235-
1236-
12371234
##### Two-Dimensional Arrays of Primitive Types
12381235

12391236
The above scenario gets more tricky with two-dimensional arrays. Consider a Java method that accepts as an argument a two-dimensional array:

0 commit comments

Comments
 (0)