Hello,
At a first time we can expect the HTTP data are also available for GET requests, however, if we think a more in deep probably we reject such idea. If the server take the data of a HTTP GET request from the URL... then it's the URL which contains the HTTP GET data... or not.
Then, if we want to make an HTTP GET request which include some data we can just prepare our URL in the way you already know Samuel:
Doing something like the above is perfectly valid and in fact we no need to do nothing more. If we wanted to send to our server some other kind of data, for example, some app input control values, probaly it's a better idea to use an HTTP POST request instead of an HTTP GET request.
However, if we want to do an HTTP GET request in this last case, we can enter in problems if the input control values contains certain characters. For this I add the new EncodeUri action and DecodeUri action into the Strings action's category. This actions allow us to encode an input value in order to be safelly used in our request URL, for example:
Probably you no need these actions right now Samuel, but, for sure they are needed if we plain to made some HTTP GET request like the above one. Of course I insist that to send data to our app server it's probably better to made an HTTP POST request than an HTTP GET request, and, in this case we can also get beneficts of the HttpSetData action.
Hello Samuel,
This shock me a little, because I expect HTTP GET requests also accepts the values added to the HttpClient, however, this is apparently reserved for HTTP POST requests (and probably others like PUT, DELETE, etc.). In fact they have some sense, and certainly taking a look at the Firefox debugger panel we can see that the request is made without incorporating any possible data.
I want to take a look at this in more deep. However, you know we can simply preparing the right URL. On the other hand, maybe a couple of actions can be useful here in order to decode/encode such kinds of URLs, on the first time, and maybe some action(s) in order to provide us an easy way to prepare URL with some keys/values.
Just let me sometime in order to think about Samuel.
Hello Samuel,
Maybe it's more easy to you to use a couple of HttpClient controls. One for the first request and another one for the second request. But yes; the HttpClient control can assert if the HTTP request have success or not, and then allow us to react to a success or error situation. Other actions like SimpleGet or SimplePost are useful (because no need to be ready for any event) but cannot be used if we need to assert an HTTP request result.
Hello Samuel,
Don't worry: you are not crazy. That's the default behaviour for the "Watcher": their Change event is executed when the app is load, but, do not means the associated variable has changed. What we can do it's the same that the Watcher sample does in the Change event: check if the "[WatcherName.OldValue]" and "[WatcherName.NewValue]". Something like this:
I try to clarify a little this question by doing two things: add into the Watcher help the reference to these old and new variables. They are referenced before, but only in the Change event help. On the other hand, I fix a mistake and also add these variables to the variable's selector.
Said this, I am not sure if you can achieve what you wanted using a Watcher. Maybe yes, but, probably we can take another approach. In few words, the SimpleGet and SimplePost actions exists to made HTTP request mainly to app files and without worry about asynchronous issues.
For example, the SimpleGet variable can be useful to load certain content to be show in an HTML content control, for example. But if what we need is to assert than an HTTP request is made and end successfully or with an error, then the HttpClient control is for us.
You can use various HttpClient controls or just one, because you can made an HTTP GET request with such control and then establish another HTTP method and execute another HTTP POST request, for example.
Then try with the Watcher if you like Samuel and tell us if they works, or think in the use of one or more HttpClient controls.
You're welcome Walter! :)
Hello Walter,
From the app file's manager you can add CSS stylesheet files and Javascript, which are not only included along your app files but also linked into the app HTML. Then you can prepare a CSS file for your app and then add it using the app file's manager.
Note that App Builder store the added styles into the folder "\www\app\styles\", then you can use relative paths from this folder to refer, for example, to added image files, from your CSS stylesheet.
For example, suposing you add a "Background.png" image from the app file's manager. To add this image as the background for every app view we can write something like this in our CSS stylesheet:
All app views have the class "appView". Also the app views have an ID which you can use from a CSS stylesheet. Such ID is the view name, for example, you can apply styles for some "AboutView" using the "AboutView" ID.
The same can be said about the app view controls. Every control have their own ID, which is the same than the control name. For example, a "Button1" control can be matched using the "Button1" ID.
The "AddClass" action add one or more CSS classes for an app view and most commonly for app view controls. For example, if we want to add the CSS class "myClass" for a "Button1" control we can code something like:
We can also use the action to add various CSS classes at a time, separating the classes by spaces:
Remember we count with related actions like "RemoveClass" and "HasClass". The first one allow us to remove one or more CSS classes from a control and the second one tell us if some specific class exist in certain control.
Also remember that behind our apps we have available the Bootstrap CSS framework and therefore we can use all available CSS classes declared in such framework further orther great stuff.
Hello Walter,
No one stupid question! Only answers can be stupid! :)
Hello,
I rename the MediaSeekTime to MediaSeekPercent and add the new MediaSeekSeconds action. The first one can be used to set the position of a media player by percentage, and the second one can be used to set the position of a media player by seconds.
Hello Walter,
The Media player only accept seconds or a percentage to seek the position. Currently we use a percentage because, for example, the Range control value it's a percentage and then we can use such control to change the Media player position. If you think seconds can be good I will look how to add it. In other case maybe you can made the appropiate calculations to get a position percentage.
About the full screen mode, if you refer to HTML5 apps compiled by Cordova, we have an option to put their apps in fullscreen or to show the platform status bar on the top. For browser deployed apps certainly I think there is not a way to put it in fullscreen without the user interaction. Maybe I can implement some trick opening the app in a new window, however, fullscreen it's only supported by Internet Explorer.
Hello Walter,
There is not a native way to do it in Javascript, therefore you need to connect to some server (your app server or another) in order to really send the email. Searching a bit around we can found various providers which allow us to send mail from Javascript, but they finally need an HTTP post request in order to send the mail. Of course a PHP script can do the job by making an HTTP post request to such script. The "mail" PHP function can send a mail directly and we can use an App Builder HTTP client control to make the HTTP post.
If you use "mailto" they never send the email directly, but offers the user the hability to send it from their predefined program. On the other hand, how we can use the "mailto" exactly? Probably we need a pure "A" HTML tag link (using the HTML content control at this time). What you can try it's to prepare the URL using the "Value" variables of the controls contents you want to send. Maybe App Builder must implement a couple of actions to encode and decode URI's, but I am not sure if we need it to use the "mailto".
Maybe the "OpenWindow" action can do the job for the "mailto" if we provide a "mailto" URL instead of another URL. Probably they works in browsers, but I don't know if they works in a similar way in Android, for example. Remember also that App Builder include various samples related with HTTP requests. "SimplePost", "HttpClient" and others show us how we can made HTTP post request very easily.
Hello again,
I can imagine that maybe you try to use the CSS properties as is shown into the control's object inspector. That is, for example, maybe you are trying to use the "SetStyle" action like:
The above action doesn't produce the expected results. In fact the designtime CSS properties have such kind of names because, for example, they cannot contains the "-" character.
In runtime, we need to specify a real and valid CSS property name like:
A good CSS properties reference can be found here at W3 Schools.
Hello Samuel,
Don't worry, it's good to know how Cordova works for platforms that I don't tried before. Thanks for the compiler output. I found various things to consider, but didn't get good results. First of all, I note the "Warnings" who say the plugins are renamed, however, trying here with the suggestion plugin path I get a 404 error. Another thing that call my attention is the unsupported icon file size.
The App Builder default icon size is 128x128 and they works like expected in Android. Trying to compile for the Windows platform here I get the same icon size error, then I try with a 64x64 image size, and then a 48x48 image size, but the compiler error persist, so really I don't know what to do even after reading the supported icon sizes.
On the other hand, what you expect is a executable file Samuel? Probably this is not generated, but what we get compiled for the Windows platform is the "appx*" files. I want to ingestigate about the plugins warning and the unsupported icon size.
Hello,
If Visual Studio 2013 is installed, maybe the Windows version is a problem? The docs say we need Windows 8.0 to compile Windows 8.0 apps only, and we need Windows 8.1 to compile apps for all platforms Windows 8.0, Windows 8.1 and Windows Phone 8.1. Also another note to take in count is: "Apps compiled under Windows 8.1 do not run under Windows 8.0. Apps compiled under Windows 8.0 are forward-compatible with 8.1".
Hello Samuel,
According to the Cordova documentation the "windows" platform it's "to build and deploy Cordova apps for Windows 8, Windows 8.1 and Windows Phone 8.1". The requeriments are described here in the Cordova documentation. You didn't get some error during the build process or something?
Hello Walter,
Thanks for your comments. Download the latest release of the program: between other things you can view fixed the "If" action's editor error. About to register App Builder you can do it from their website using the provided Paypal form. You can choose from the three different available licenses.
Personal licenses allows you to use App Builder in your personal computers and distribute the produced apps without cost and ad free. Commercial licenses allows you to use App Builder in all your personal computers and sell the produced apps and include ads. Corporate licenses allows you to use App Builder in your personal and business computers and to sell the produced apps and include ads.
If you have any doubt or question don't hesitate to contact me.
Thanks again Walter!
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.