
Quote from asmat on March 9, 2020, 6:57 pmNew Session of VisualNEO Web start!
VisualNEO Web now able to create an app that use native functionality. I have test different functionality of device for instance: Accessing Camera, writing file, detecting location, push notification and much more...there are done successfully. I have made a sample plugin of BarCodeScanner that use scanner of mobile. you can see in this video how it work.
Note: add this snippet to confing.xml
<plugin name="cordova-plugin-barcodescanner" source="npm" spec="~0.7.4"/>
New Session of VisualNEO Web start!
VisualNEO Web now able to create an app that use native functionality. I have test different functionality of device for instance: Accessing Camera, writing file, detecting location, push notification and much more...there are done successfully. I have made a sample plugin of BarCodeScanner that use scanner of mobile. you can see in this video how it work.
Note: add this snippet to confing.xml
<plugin name="cordova-plugin-barcodescanner" source="npm" spec="~0.7.4"/>Uploaded files:

Quote from luishp on March 9, 2020, 7:53 pmThank you @asmat!
Just in time with the new version XML editor :)To everyone willing to use this plugin please note it's only for compiling into Mobile (PhoneGap)
Thank you @asmat!
Just in time with the new version XML editor :)
To everyone willing to use this plugin please note it's only for compiling into Mobile (PhoneGap)
Quote from Ronnie on March 25, 2020, 8:48 amHi @asmat,
I tried your barcode function in my sample project, compiled to PhoneGap, and it works fine. LocalStorage, while OK, is not good for long-term records... I'm exploring Cordova/PhoneGap's FILE api.
Any advice to get the read and write to file function working is appreciated. I added
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
and try the sample read/write but nothing happens. Only your barcode function is working.
Hi @asmat,
I tried your barcode function in my sample project, compiled to PhoneGap, and it works fine. LocalStorage, while OK, is not good for long-term records... I'm exploring Cordova/PhoneGap's FILE api.
Any advice to get the read and write to file function working is appreciated. I added
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
and try the sample read/write but nothing happens. Only your barcode function is working.

Quote from asmat on March 25, 2020, 3:13 pmHi Ronnie you are not need to add this
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />This plugin already added by default.
I made a sample for reading and writing file to the file system of mobile take a look at the attachment.
Hi Ronnie you are not need to add this
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
This plugin already added by default.
I made a sample for reading and writing file to the file system of mobile take a look at the attachment.
Uploaded files:
Quote from Ronnie on March 26, 2020, 4:16 amHi @asmat, it works after I removed below script from my sample project. Yes, no need for that script...
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
Will explore further on the file api since you've provided a great head-start on the possibilities. Thanks again!
Hi @asmat, it works after I removed below script from my sample project. Yes, no need for that script...
<plugin name="cordova-plugin-file" source="npm" spec="~6.0.2" />
Will explore further on the file api since you've provided a great head-start on the possibilities. Thanks again!
Quote from Ronnie on March 26, 2020, 8:59 amHi @asmat, here's my feedback after testing for a while...
The cordova file plugin also relies on LocalStorage which, technically means, there is no difference from using GetItem/SetItem functions in VNW directly.
I checked and found:
cordova-plugin-nativestorage (https://www.npmjs.com/package/cordova-plugin-nativestorage)
Maybe, this could be the one allowing reading/writing to permanent file...
Hi @asmat, here's my feedback after testing for a while...
The cordova file plugin also relies on LocalStorage which, technically means, there is no difference from using GetItem/SetItem functions in VNW directly.
I checked and found:
cordova-plugin-nativestorage (https://www.npmjs.com/package/cordova-plugin-nativestorage)
Maybe, this could be the one allowing reading/writing to permanent file...
Quote from Ronnie on March 27, 2020, 4:00 amHi @asmat,
I'm still learning JS... I tried using the cordova nativestorage plugin but just couldn't get it to work. I've attached a modified version of your working sample fileWriteRead to include the extra buttons
I added "plugin name="cordova-plugin-nativestorage...." in the Platform>Mobile section as I noticed this plug-in was not installed by default. After adding them, I checked and noticed it's included in the phonegap build package.
I might have missed something somewhere to read/write the file where I took the scripts from the web. Any advice is appreciated
Regards, Ronnie
Hi @asmat,
I'm still learning JS... I tried using the cordova nativestorage plugin but just couldn't get it to work. I've attached a modified version of your working sample fileWriteRead to include the extra buttons
I added "plugin name="cordova-plugin-nativestorage...." in the Platform>Mobile section as I noticed this plug-in was not installed by default. After adding them, I checked and noticed it's included in the phonegap build package.
I might have missed something somewhere to read/write the file where I took the scripts from the web. Any advice is appreciated
Regards, Ronnie
Uploaded files:
Quote from asmat on March 28, 2020, 3:10 pmHi Ronnie lets try this
set this code for write:
BEGINJS var obj =document.getElementById('area1').value; NativeStorage.setItem("reference", obj,()=> alert('Success'),()=> alert('error')); ENDJSand this code for read:
BEGINJS NativeStorage.getItem("reference", (obj)=>document.getElementById('area2').value=obj , ()=>alert('error')); ENDJS
Hi Ronnie lets try this
set this code for write:
BEGINJS
var obj =document.getElementById('area1').value;
NativeStorage.setItem("reference", obj,()=> alert('Success'),()=> alert('error'));
ENDJS
and this code for read:
BEGINJS
NativeStorage.getItem("reference", (obj)=>document.getElementById('area2').value=obj
, ()=>alert('error'));
ENDJS
Uploaded files:
Quote from Ronnie on March 30, 2020, 3:09 amHi @asmat, as always, thanks for the guidance. Appreciate the time and effort you've provided.
May I know where the data is stored? Is it in LocalStorage or in a file folder (ideal)? Reason I asked is that after successfully saving the file, i uninstall the program, and then reinstall. Then I tap on READ but there was an error.
Hi @asmat, as always, thanks for the guidance. Appreciate the time and effort you've provided.
May I know where the data is stored? Is it in LocalStorage or in a file folder (ideal)? Reason I asked is that after successfully saving the file, i uninstall the program, and then reinstall. Then I tap on READ but there was an error.

Quote from asmat on March 30, 2020, 6:42 amHi @Ronnie
The Data store in the apps root folder(it is hide if you did not root your phone). I have test in android studio the file created in this path: android/data/Application id/cache/example.txt you can see better in the attach file.
when you uninstall app, the apps root folder will remove.
Hi @Ronnie
The Data store in the apps root folder(it is hide if you did not root your phone). I have test in android studio the file created in this path: android/data/Application id/cache/example.txt you can see better in the attach file.
when you uninstall app, the apps root folder will remove.
Uploaded files:Quote from Ronnie on March 30, 2020, 3:44 pmHi @asmat, that’s great. I could see both files and cache folders created using EFS Explorer. But didn’t get to see the actual file, and as you said, it’s hidden unless the phone is rooted.
I noticed that if I reinstall the apk without uninstall, I could install successfully on my Sony Xperia XZ. However, if I rebuild the apk again from PhoneGap, I cannot install as it reported error. I could only install after I uninstall the existing one. That would remove the saved file too, which is sad.
Some years back, I was developing an Android app using some development tools, and regardless of whether there is a new build of my app, users can install them without affecting the user records (SQLite) saved in <app id>/files/ folder.
I hope to reproduce this with VisualNeoWeb. Is there any specific commands or scripts that can be added into CONFIG.XML to enable, read/write storage, and to overwrite previous builds?
Hi @asmat, that’s great. I could see both files and cache folders created using EFS Explorer. But didn’t get to see the actual file, and as you said, it’s hidden unless the phone is rooted.
I noticed that if I reinstall the apk without uninstall, I could install successfully on my Sony Xperia XZ. However, if I rebuild the apk again from PhoneGap, I cannot install as it reported error. I could only install after I uninstall the existing one. That would remove the saved file too, which is sad.
Some years back, I was developing an Android app using some development tools, and regardless of whether there is a new build of my app, users can install them without affecting the user records (SQLite) saved in <app id>/files/ folder.
I hope to reproduce this with VisualNeoWeb. Is there any specific commands or scripts that can be added into CONFIG.XML to enable, read/write storage, and to overwrite previous builds?

Quote from asmat on June 11, 2021, 9:24 amHi, @Ronnie, I have found a solution to your problem. add this line code in config.xml:
<preference name="AndroidPersistentFileLocation" value="Compatibility" />whenever you uninstall and reinstall the application the saved data will not be removed.
Hi, @Ronnie, I have found a solution to your problem. add this line code in config.xml:
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
whenever you uninstall and reinstall the application the saved data will not be removed.

Quote from See_Half on June 17, 2021, 5:28 pmQuote from asmat on March 25, 2020, 3:13 pmI made a sample for reading and writing file to the file system of mobile take a look at the attachment.
Do you have sample Android APK for this ?
I'm very interesting to try on my mobile device.
Quote from asmat on March 25, 2020, 3:13 pmI made a sample for reading and writing file to the file system of mobile take a look at the attachment.
Do you have sample Android APK for this ?
I'm very interesting to try on my mobile device.

Quote from asmat on June 18, 2021, 2:15 pmHi See_Half, making android APK is not hard with Cordova it takes around 5 minutes.
Be careful when you compile your app with Cordova you must change phonegap.js to cordova.js from index.html:
<script src="phonegap.js"></script> //Change to this: <script src="cordova.js"></script>if you do not do this, you will not use any Cordova plugin.
See the attachment, I have made APK.
The attached zip file is the .apk file, you just change the extension to .apk and then install it on your phone.
Hi See_Half, making android APK is not hard with Cordova it takes around 5 minutes.
Be careful when you compile your app with Cordova you must change phonegap.js to cordova.js from index.html:
<script src="phonegap.js"></script> //Change to this: <script src="cordova.js"></script>
if you do not do this, you will not use any Cordova plugin.
See the attachment, I have made APK.
The attached zip file is the .apk file, you just change the extension to .apk and then install it on your phone.
Uploaded files:

Quote from luishp on June 18, 2021, 5:30 pmBe careful when you compile your app with Cordova you must change phonegap.js to cordova.js from index.html:
@asmat @see_half this is not necessary anymore when working with last VisualNEO Web version
Be careful when you compile your app with Cordova you must change phonegap.js to cordova.js from index.html:
@asmat @see_half this is not necessary anymore when working with last VisualNEO Web version
