I have compiled my application for android it works .
But I have a file js configuration under app/config/Constants.js for my application.
Is it possible to have this file and these parameters in android application ? or in options when I install file apk ?
What you need to do is make sure that the file is required using Ext.require. In the past I've done this right at the top of my app.js file, not sure if this is best practice.
The issue is, that if you don't do Ext.require, an app may still survive during testing - because when it comes across a reference to this config class, it will load in the file during runtime with Ext.loader.
However, the production builder doesn't have the luxury of being able to load files in at runtime, as of course it's building one single minified file up front. So the Ext.require('Class name'); line tells the build script to also include this class definition in the single minified file.
so then it is probably best to install the files without javascript compilation and run it from the navigator of the tablet. if the "person responsible" wants to change settings on the shelves of these users it goes into the configuration file ....
Not sure I understand... do you want the end user to be able to modify these constants? If so you should look at setting them up as a record in the localstorage or something similar.
You should always combine and minify your code into one file unless you absolutely have to do it differently. The load times and offline storage advantages are too big to ignore.
in fact it is an application with constants that the administrator will be able to change (I work with
openlayers.org , vectors layers can change the outline color, etc .....), the administrator must go in this file and then edit these constants, redeploy application that uses these variables.
The Users can not configure it.
So I still wouldn't like having the Constants class dynamically loaded at runtime. I've tried similar arrangements and the reason I don't like it is because I want my app executing as similarly as possible between my testing, development and production environments.
I would setup the Constants as a model, and also give them a store, that loads them in from a JSON file. Your admins can then edit the JSON file, and you can still get Sencha Cmd to build all of the code of the app into a single minified file.
One gotcha here is you need to make sure, as with all other local JSON stores, to require the JSON file in the app.json file.