Hello to all,
Here is a new DecSoft App Builder with the below changes, fixes and enhancements:
Hello to all,
Here is a new DecSoft App Builder with the below changes, fixes and enhancements:
Hello Bryce,
About your first question, honestly I need to take a look at HTC 1 in order to see if that option really exists... and why? Because the idea is that the output file must be the same than the "index.html" file of our apps. And why? Because we app may need files, not included in the compiled executable, in order to properly work. For that reason HTC 2 do not include that specific option.
About your second question, certainly it's the system and the "icons cache" who determine the behaviour that you describes. However, if the icon is certainly changed (there is no error when compile the executables), then the real icon of the executable is what you provides, and, you can see that "real icon" if you copy or move the executable into another folder or another computer.
P.S. A possible workaround for the first question can be to use the DecSoft HTML Compiler CLI compiler. From DecSoft HTML Compiler is it possible to create a BAT file who uses the CLI compiler to compile our apps. It's possible then to edit this BAT file (or create a new one from the scratch) who compile the app and then move the executable file to another location.
Hello Bryce,
The local storage is managed by the app browser itself: is not saved in a file or internally managed by DecSoft HTML Compiler, but by the used chromium based browser itself. The user is not able to get it, but your app yes. I mean, the local storage is not removed when the app is closed, so, previously stored information it's available when the user starts the app again.
Hello Andrea,
For the case of AB1, you can certainly establish a timeout for the request like below:
So the above establish 10 seconds of timeout, means if after 10 seconds the server did not respond the Error event of the Http Client is fired with a "Status = -1" and "Response = null".
Hello Andrea,
The problem with CORS is not to place the right header in the client side, but in the server side. So it's the server who must set the appropriate CORS permissions. You can find more information at this web page, which explain how to set the CORS permissions in various servers. If you can't handle this using your server's, but, your server can run PHP scripts (for example), then you can try to set the CORS permissions from a PHP script, so you can call to that script, who can also make the appropriate reading of the URL that you wanted, something similar like below:
Hello Andrea,
I am not sure... probably it's not solve the error, but, look at your "nscameraUsageDescription"... maybe it's case sensitive and you must use "NSCameraUsageDescription". On the other hand, iOS 12... sounds old to me... and may you are right and that problem is related with that version of iOS.
Hello Andrea,
The point is that the error that you shown is procuded in the compiled Swift code: we commonly no need to edit nor modify that code, but the Javascript code of our apps.
Apparently you solve the problem, however, maybe with "Capture=True" you can get the things worked as expected, but, if you add the below XML in the Config XML option of the app:
Basically, when we need to use the Camera or the Library, we need to establish certain strings in order to properly use that resources at iOS. So you can try with that XML, or, just leave the Capture = False, if you solve with this and you no need to go ahead.
Hello Andrea,
You must lost the fear to use an HTTP client control: in fact when you set an URL to the Report, internally an HTTP call is made, so, using an HTTP call to retrieve the data is just a simple step. If you use an HTTP client control you can work with the response before assign it to the "Report.Data" variable.
Suppose the report's source (which will be assigned to the Report's Data variable) contains properties like this: "date_created": "2022-03-15 13:00". You can use an HTTP client control to get the source, and, in the HTTP client control Success event, you can write a code like below:
Doing that you can use a code like below in the Report HTML:
Hello Andrea,
There are various ways to do it. I prefer to do these things in the server side, so, our records can have a property like "IsToday", so we can simply prepare a code like below:
If you prefer to rely on the client side, you can prepare a variable in the Show event of the view in wich you place your Report control, a variable like below:
Doing that you prepare a code inside the Report like below:
Of course, we suppose that "Record.MyDate" contains date values like "YYYY-MM-DD". If there is other formatted date string in "Record.MyDate", then you must change the "TodayFormatted " variable accordingly.
Hello Andrea,
You can use the "ng-show" directive in a way like below:
Hello Paolo,
Glad to know that you got it. Anyway, take a look at the documentation of the InAppBrowser plugin. In particular to the available events, and, more in particular, to the "message" event. I did not test it (like I test the above code) but I think the "message" event can be a good thing to be considered.
Hello Paolo,
I am not sure if what you wanted is what is shown in this stackoverflow answer. I use that answer's code with good result in one of my apps. The idea is simple, we call to app.cordova.inAppBrowser.open and save a reference to the opened window, that is:
Therefore, inside "your-page.php", you can place a button and a "click" event listener for that button. In the "click" event listener the only thing that you must do is to set the variable "window.shouldClose" to true. So when the user click on that button the the code after "if(values[0])" will be executed: you can then close the "InAppBrowser" window and/or do anything else.
Hello Paolo,
But is there a solution with listening events? of the type I create a button on the web page with an id or class, which when pressed closes the InAppBrowser, and at that point a button appears in the app to send the confirmation via whatsapp
I am not sure if can understand. If you open an URL in the system browser, yes, there is a way to make some kind of communication between the opened URL and the app. However, what I did not understand is that, if I am not wrong, you don't want to open an URL, but, a "special" URL with the "whatsapp:" scheme, which apparently have his own behaviour (open the Whastapp app). So I am not sure if can understand what you mean by "listening events".
If what you are thinking is to open a certain URL (a file, for example, "my-file.php") who receives the right arguments indicating the user's phone, the order details, etc., and then, in that "my-file.php" place a couple of buttons, one to open the Whatsapp, and another to close the opened window, then yes, it's possible to do something, that is, it's possible to place a button in "my-file.php" to close the opened window. But again, I am not sure if this is what you wanted or not.
On the other hand, if when you open the "whastapp:" URL in the system browser, then the system browser automatically opened Whatsapp... why you need to go ahead? I mean... if I am not wrong, what the user see is the Whatsapp app opened, and therefore can continue the order... then he can go back to the app if he wanted. Remember that when you opened the system browser your app is not closed, just placed at the background: it's still available for the user if he want to go back to the app.
Hello Paolo,
Maybe you can think in a possible way to avoid the usage of Whatsapp? I mean... apparently you use Whatsapp for some kind of order confirmation, but, this can have various problems: the first one what you already see, you must leave the app in order to use the system browser. This is not a real problem to me, even more, if we can't go it working using the InAppBrowser plugin. But another additional problem can be that the user must have installed the Whastapp app in his phone.
So, maybe you can plan another possible way to confirm the user order? I can think in three possible alternatives at this moment. The first one can be to send an EMail to certain account. You can make an HTTP call to some of your server script with the right information and then send an EMail from the server to a certain EMail address. The second alternative that I can think is the usage of push notifications. Again, you can use an HTTP call to some of your server script in order to send a push notification. Who receives that push notification? Another app... who must be installed by the "manager of the orders".
Lastly maybe the "sms:" URL scheme can be used like described here (I am not tested it). The problem with this can be that probably we can't use the InAppBrowser plugin, in the same way that we can't use it with the "whatsapp:" URL scheme. The advantage can be that the "sms:" realy on the system SMS app, which is available by default, that is, the user no need to install it like in the case of the Whastapp app.
What do you think about it, Paolo? Note that the first two possible alternatives do not require that the user leaves the app at all, since you can do it by using HTTP calls to your server, so, you have the control all the time.
Hello to all,
I post here this because may can be useful for other customers. Finally Mario and me discover (after some mails interchange and tests) that the problem is caused due to feed the "items" of the Select control with numbers and not strings. Apparently in this case the "itemIndex" property is certainly set to "-1" and not contain the expected value, that is, the index of the selected item. The solution, for now, is to feed the Select control's items property with strings and not with numbers. Doing that the "itemIndex" always returns the correct index of the selected item in the Select control.
If what we certainly have is an Array of numbers, we can use the "map" function to feed the Select items property with strings instead of numbers: just take a look at the below code:
By doing that the "itemIndex" property work as expected, since what we really assign to the items property is an array of strings and not an array of numbers.
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.