Details
Details
In the native JS code (e.g. root.react.js):
const myArray = new Uint8Array([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); const dir = temporaryDirectoryPath; console.log('temp dir:', dir); await commUtilsModule.writeBufferToFile(dir + 'temp.dat', myArray.buffer); commUtilsModule.readBufferFromFile(dir + 'temp.dat').then(data => { console.log('read:', new Uint8Array(data)); });
The read value should be the same as initial array. Also checked existence of the file
For iOS:
- open [printed temp dir path] - check if file exists
- xxd [printed temp dir path]/temp.dat - checked if hex is equal to 01 02 ... 0a (myArray)
For Android:
- adb root && adb pull [temp dir]/temp.dat - then xxd that file
- adb shell su ; ls [temp dir]
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable