
Quote from luishp on April 27, 2021, 10:13 amAs PhoneGap doesn't work anymore, I'm trying to modify the Mobile compiler option in VisualNEO Web to export for VoltBuilder and Cordova and I need your help.
I have had some success exporting to VoltBuilder but I have an strange issue:
If I upload the generated .zip file to VoltBuilder it fails with this message:UserError: Current working directory is not a Cordova-based project. Check your upload zip file for proper formatting. See https://volt.build/docs/set_up/But if I uncompress and recompress the .zip file using Windows contextual menu it works.This is the .zip file generating the error message (minimal "hello world" app):This one works with the exact same content:The Delphi command used to zip the contents is this one:FZip.Add( MemStream, DestFileName, zcDeflate )As far as I know VoltBuilder uses latest Python library to unzip the contents:
https://docs.python.org/3/library/zipfile.html @as3856 @hpw @farhad2008 @albertomeyer any idea about the Delphi / Python incompatibility regarding .zip files?
@shahram @asmat can you please confirm the linked .zip files can be compiled with local Cordova?Thank you all in advance!
As PhoneGap doesn't work anymore, I'm trying to modify the Mobile compiler option in VisualNEO Web to export for VoltBuilder and Cordova and I need your help.
I have had some success exporting to VoltBuilder but I have an strange issue:
If I upload the generated .zip file to VoltBuilder it fails with this message:
UserError: Current working directory is not a Cordova-based project. Check your upload zip file for proper formatting. See https://volt.build/docs/set_up/
FZip.Add( MemStream, DestFileName, zcDeflate )
As far as I know VoltBuilder uses latest Python library to unzip the contents:
https://docs.python.org/3/
@as3856 @hpw @farhad2008 @albertomeyer any idea about the Delphi / Python incompatibility regarding .zip files?
@shahram @asmat can you please confirm the linked .zip files can be compiled with local Cordova?

Quote from asmat on April 27, 2021, 12:22 pmHi, @liushp in Cordova for a better user experience we need only the content of the www folder. no need for zipping.
These things will be done by Cordova:
- Making config.xml.
- Adding Cordova plugin
- Running app on a mobile device for debugging
- Building .apk file
If we overwrite the config.xml of viualNEO web, Sometimes it will be a conflict with the Cordova project.
Hi, @liushp in Cordova for a better user experience we need only the content of the www folder. no need for zipping.
These things will be done by Cordova:
If we overwrite the config.xml of viualNEO web, Sometimes it will be a conflict with the Cordova project.

Quote from luishp on April 27, 2021, 12:41 pmThese things will be done by Cordova:
- Making config.xml.
- Adding Cordova plugin
- Running app on a mobile device for debugging
- Building .apk file
If we overwrite the config.xml of viualNEO web, Sometimes it will be a conflict with the Cordova project.
@asmat then, why not using Web option instead of Mobile one to compile the project?
I'm not sure about what is missing on Web compilation if we don't need config.xml at all. Just to include cordova.js?
These things will be done by Cordova:
- Making config.xml.
- Adding Cordova plugin
- Running app on a mobile device for debugging
- Building .apk file
If we overwrite the config.xml of viualNEO web, Sometimes it will be a conflict with the Cordova project.
@asmat then, why not using Web option instead of Mobile one to compile the project?
I'm not sure about what is missing on Web compilation if we don't need config.xml at all. Just to include cordova.js?

Quote from asmat on April 27, 2021, 1:24 pmHi luishp, I think there is some difference between web compilation and mobile compilation:
I just know this function exists only on mobile compilation:
document.addEventListener("deviceready", function(){ $scope.__init(); });@luishp you can search "deviceready" word in main.js of both of them, you will find some difference.
Hi luishp, I think there is some difference between web compilation and mobile compilation:
I just know this function exists only on mobile compilation:
document.addEventListener("deviceready", function(){
$scope.__init();
});
@luishp you can search "deviceready" word in main.js of both of them, you will find some difference.

Quote from albertomeyer on April 27, 2021, 3:09 pmMaybe it's the path of the files inside the zip. Some zip files preserve the structure of the folders, or not. It all depends on the creation
Maybe it's the path of the files inside the zip. Some zip files preserve the structure of the folders, or not. It all depends on the creation

Quote from shahram on April 28, 2021, 9:50 amQuote from luishp on April 27, 2021, 10:13 amAs PhoneGap doesn't work anymore, I'm trying to modify the Mobile compiler option in VisualNEO Web to export for VoltBuilder and Cordova and I need your help.
I have had some success exporting to VoltBuilder but I have an strange issue:
If I upload the generated .zip file to VoltBuilder it fails with this message:UserError: Current working directory is not a Cordova-based project. Check your upload zip file for proper formatting. See https://volt.build/docs/set_up/But if I uncompress and recompress the .zip file using Windows contextual menu it works.This is the .zip file generating the error message (minimal "hello world" app):This one works with the exact same content:The Delphi command used to zip the contents is this one:FZip.Add( MemStream, DestFileName, zcDeflate )FZip.Add( MemStream, DestFileName, zcDeflate )FZip.Add( MemStream, DestFileName, zcDeflate )As far as I know VoltBuilder uses latest Python library to unzip the contents:
https://docs.python.org/3/library/zipfile.html@as3856 @hpw @farhad2008 @albertomeyer any idea about the Delphi / Python incompatibility regarding .zip files?
@shahram @asmat can you please confirm the linked .zip files can be compiled with local Cordova?Thank you all in advance!Hi luishp
I tried to compile your app by local cordova. But even though it is compiled, the application does not run on the device or emulator.
It seems to be a problem with the config.xml file. The change I made is as follows:
<content src="./www/index.html"/> to <content src="/index.html"/>.
And after the above change, the app is installed and runs without any problems.
Quote from luishp on April 27, 2021, 10:13 amAs PhoneGap doesn't work anymore, I'm trying to modify the Mobile compiler option in VisualNEO Web to export for VoltBuilder and Cordova and I need your help.
I have had some success exporting to VoltBuilder but I have an strange issue:
If I upload the generated .zip file to VoltBuilder it fails with this message:UserError: Current working directory is not a Cordova-based project. Check your upload zip file for proper formatting. See https://volt.build/docs/set_up/But if I uncompress and recompress the .zip file using Windows contextual menu it works.This is the .zip file generating the error message (minimal "hello world" app):This one works with the exact same content:The Delphi command used to zip the contents is this one:FZip.Add( MemStream, DestFileName, zcDeflate )FZip.Add( MemStream, DestFileName, zcDeflate )FZip.Add( MemStream, DestFileName, zcDeflate )As far as I know VoltBuilder uses latest Python library to unzip the contents:
https://docs.python.org/3/library/zipfile.html@as3856 @hpw @farhad2008 @albertomeyer any idea about the Delphi / Python incompatibility regarding .zip files?
@shahram @asmat can you please confirm the linked .zip files can be compiled with local Cordova?Thank you all in advance!
Hi luishp
I tried to compile your app by local cordova. But even though it is compiled, the application does not run on the device or emulator.
It seems to be a problem with the config.xml file. The change I made is as follows:
<content src="./www/index.html"/> to <content src="/index.html"/>.
And after the above change, the app is installed and runs without any problems.

Quote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!
And after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!

Quote from shahram on April 28, 2021, 4:19 pmQuote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!Dear @luishp...
@asmat is right. The configuration file is created automatically. But with minimal default settings. I think it is very important that this file is created by the VisualNeo compiler. Because, many of the necessary settings must be made before the program is created by Cordova. For example, settings related to Cordova plugins or necessary settings that must be done in AndroidManifest.xml files, which can be done by placing the relevant tags in the config.xml file.
Quote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!
Dear @luishp...
@asmat is right. The configuration file is created automatically. But with minimal default settings. I think it is very important that this file is created by the VisualNeo compiler. Because, many of the necessary settings must be made before the program is created by Cordova. For example, settings related to Cordova plugins or necessary settings that must be done in AndroidManifest.xml files, which can be done by placing the relevant tags in the config.xml file.

Quote from shahram on April 28, 2021, 4:50 pmQuote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!In addition, the initial basis for this seems to be ready. The VisualNeo compiler currently builds the Config.xml file, but according to Cordova documents, it needs some changes. While it can be much more complete than this.
For example the changes that need to be made:
Change Widget tag and modify xmlns value from xmlns: gap = "http://phonegap.com/ns/1.0" to xmlns: cdv "http://cordova.apache.org/ns/1.0"
Modify the folder structure and placement of files and modify URLs in the Config.xml file.
As our dear friend @asmat pointed out, in the process of compiling with Cordova, there is no need to create a Zip file at all. Unless you insist that the compilation process be done by VoltBuilder as well. In this case, it is better to put a separate option for this.
One of the regular structures I've seen so far is that: The main project files, including the Index.html file and its resources, are in a folder called 'www', and the Config.xml file is next to the www folder. . Also, the main icon of the program and the splash image should be placed in a folder called 'res' next to www. Although these are not mandatory.
Quote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!
In addition, the initial basis for this seems to be ready. The VisualNeo compiler currently builds the Config.xml file, but according to Cordova documents, it needs some changes. While it can be much more complete than this.
For example the changes that need to be made:
Change Widget tag and modify xmlns value from xmlns: gap = "http://phonegap.com/ns/1.0" to xmlns: cdv "http://cordova.apache.org/ns/1.0"
Modify the folder structure and placement of files and modify URLs in the Config.xml file.
As our dear friend @asmat pointed out, in the process of compiling with Cordova, there is no need to create a Zip file at all. Unless you insist that the compilation process be done by VoltBuilder as well. In this case, it is better to put a separate option for this.
One of the regular structures I've seen so far is that: The main project files, including the Index.html file and its resources, are in a folder called 'www', and the Config.xml file is next to the www folder. . Also, the main icon of the program and the splash image should be placed in a folder called 'res' next to www. Although these are not mandatory.

Quote from shahram on April 28, 2021, 5:12 pmQuote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!But about adding Cordova plugins:
Although adding plugins <plugin ..... /> to the Config.xml file installs plugins, I have encountered this problem several times.
According to the suggestion I made before, it is better to include the commands for installing plugins in the Bat file in addition to the config.xml file.
All the necessary steps to build the program by Cordova and install the plugins have been sent in the attached file. This file will also be placed next to the www folder. All we have to do is run this file. If the basic requirements including SDK and Java ... are installed, the compilation process will take place.
Quote from luishp on April 28, 2021, 12:54 pmAnd after the above change, the app is installed and runs without any problems.
Thank you @shahram
Great! We are very close but I already need to understand if we need or not the config.xml file in order to compile with cordova.
I know we need it for VoltBuilder but according to @asmat it's not necessary for cordova as it will be automaticaly generated.
Have I understood it correctly?
Then, how do we add plugins? Are they detected and added by cordova?
Thank you all!
But about adding Cordova plugins:
Although adding plugins <plugin ..... /> to the Config.xml file installs plugins, I have encountered this problem several times.
According to the suggestion I made before, it is better to include the commands for installing plugins in the Bat file in addition to the config.xml file.
All the necessary steps to build the program by Cordova and install the plugins have been sent in the attached file. This file will also be placed next to the www folder. All we have to do is run this file. If the basic requirements including SDK and Java ... are installed, the compilation process will take place.

Quote from luishp on April 29, 2021, 10:40 amThank you @shahram and @asmat. I think I'm quite close to a solution.
George, at VoltBuilder, has fixed the problem regarding reading VisualNEO Web zipped files their side.
So, as a replacement for PhoneGap is very necessary, I will release very soon a new version using VoltBuilder instead, and later another one including a cordova option, to export uncompressed files, very similar to the PWA and NWjs options that are available right now. Allthough all these options will be placed together under "Web" platform, I think this way it will be more clear.Thanks again.
Thank you @shahram and @asmat. I think I'm quite close to a solution.
George, at VoltBuilder, has fixed the problem regarding reading VisualNEO Web zipped files their side.
So, as a replacement for PhoneGap is very necessary, I will release very soon a new version using VoltBuilder instead, and later another one including a cordova option, to export uncompressed files, very similar to the PWA and NWjs options that are available right now. Allthough all these options will be placed together under "Web" platform, I think this way it will be more clear.
Thanks again.

Quote from shahram on April 29, 2021, 10:52 amQuote from luishp on April 29, 2021, 10:40 amThank you @shahram and @asmat. I think I'm quite close to a solution.
George, at VoltBuilder, has fixed the problem regarding reading VisualNEO Web zipped files their side.
So, as a replacement for PhoneGap is very necessary, I will release very soon a new version using VoltBuilder instead, and later another one including a cordova option, to export uncompressed files, very similar to the PWA and NWjs options that are available right now. Allthough all these options will be placed together under "Web" platform, I think this way it will be more clear.Thanks again.
Excellent.
Thank you @luishp.
We are looking forward to the next versions.
Quote from luishp on April 29, 2021, 10:40 amThank you @shahram and @asmat. I think I'm quite close to a solution.
George, at VoltBuilder, has fixed the problem regarding reading VisualNEO Web zipped files their side.
So, as a replacement for PhoneGap is very necessary, I will release very soon a new version using VoltBuilder instead, and later another one including a cordova option, to export uncompressed files, very similar to the PWA and NWjs options that are available right now. Allthough all these options will be placed together under "Web" platform, I think this way it will be more clear.Thanks again.
Excellent.
Thank you @luishp.
We are looking forward to the next versions.

Quote from See_Half on June 17, 2021, 4:52 pmHi everyone
Do you have an example or sample app "APK" has been create for android that completely plugin Apache Cordova or VoltBuilder as like this :
-camera
-batery
-wifi
-hotspot
-storage utility
-file processing such as write/read on root and zip/unzip on mobile
-notification behind or silent watcher like notify WhatsApp.
-connection
-ignore version android
-sensor
-add widget
-image processing
-text processing "getCopyClipboard'
-MIUI theme editor
-backdoor root like total commander
-Anything plugin cordova.Please don't forget it, in the AppExample write guideline how to run their function or whatever you want to improve with Visualneoweb.
"Thank you all"
I hope sample App Android is not error,okay.
Hi everyone
Do you have an example or sample app "APK" has been create for android that completely plugin Apache Cordova or VoltBuilder as like this :
-camera
-batery
-wifi
-hotspot
-storage utility
-file processing such as write/read on root and zip/unzip on mobile
-notification behind or silent watcher like notify WhatsApp.
-connection
-ignore version android
-sensor
-add widget
-image processing
-text processing "getCopyClipboard'
-MIUI theme editor
-backdoor root like total commander
-Anything plugin cordova.
Please don't forget it, in the AppExample write guideline how to run their function or whatever you want to improve with Visualneoweb.
"Thank you all"
I hope sample App Android is not error,okay.

Quote from shahram on June 17, 2021, 6:20 pmQuote from See_Half on June 17, 2021, 4:52 pmHi everyone
Do you have an example or sample app "APK" has been create for android that completely plugin Apache Cordova or VoltBuilder as like this :
-camera
-batery
-wifi
-hotspot
-storage utility
-file processing such as write/read on root and zip/unzip on mobile
-notification behind or silent watcher like notify WhatsApp.
-connection
-ignore version android
-sensor
-add widget
-image processing
-text processing "getCopyClipboard'
-MIUI theme editor
-backdoor root like total commander
-Anything plugin cordova.Please don't forget it, in the AppExample write guideline how to run their function or whatever you want to improve with Visualneoweb.
"Thank you all"
I hope sample App Android is not error,okay.
Hi.
Please check https://visualneo.com/forum/topic/using-apache-cordova-plugins-and-cordova-build-apk/?part=2#postid-9141
Quote from See_Half on June 17, 2021, 4:52 pmHi everyone
Do you have an example or sample app "APK" has been create for android that completely plugin Apache Cordova or VoltBuilder as like this :
-camera
-batery
-wifi
-hotspot
-storage utility
-file processing such as write/read on root and zip/unzip on mobile
-notification behind or silent watcher like notify WhatsApp.
-connection
-ignore version android
-sensor
-add widget
-image processing
-text processing "getCopyClipboard'
-MIUI theme editor
-backdoor root like total commander
-Anything plugin cordova.Please don't forget it, in the AppExample write guideline how to run their function or whatever you want to improve with Visualneoweb.
"Thank you all"
I hope sample App Android is not error,okay.
Hi.
Please check https://visualneo.com/forum/topic/using-apache-cordova-plugins-and-cordova-build-apk/?part=2#postid-9141