Posts by DecSoft

Show threads by DecSoft
3355 posts found, page 160 of 224

DecSoft (In thread: How do i download a download a file from app servicer?)

Hello Kasito,

Certainly, in general terms, a Success event means the resource or file exists. The "problem" can be in the Error event, that is, we must determine if the HTTP request has been completed or if we have the expected (for example a 404) error code. You can try it and post here if you have any further question.


DecSoft (In thread: How do i download a download a file from app servicer?)

Hello Kasito,

We can check an online resource or file using the HttpClient control. This control has two events: Success and Error. The Error event is reaised, for example, if a resource or file can't be located. However, this also may depend a bit on our app's server.

For example, if we try to get a resource like "http://www.nonexisting.com/myfile.html", the HttpClient's Error event is fired, but the HTTP status code variable is "-1", that can appear a bit confusing if we expect a 404 error code in that variable.

An HTTP "-1" status code means the HTTP request can't be completed. We must remember here our HTTP requests requires the Cross-origin resource sharing (CORS) enable in the server side, and then our above requests fail in the first stage and can't be completed.

So our problem to determine if a resource or file really exists probably can be handle better if certain script in our server do the job (examining if the requested file exists) and offer to us the appropiate HTTP status code: a 404 status code, for example.

In conclusion we can use an HttpClient control with an URL like: "http://www.our-app-server.com/checkFiles.php" passing the name of the file as a param in a GET HTTP request. The "checkFiles.php" then do their job and prepare the appropiate response.

If after execute the GET HTTP request the "Success" event is fired, then we can understand the resource or file we looking for really exists. If after execute the request the "Error" event is fired, we can examine the error code, but, anyway, the file do not exists.

Maybe this all appear a bit complicated... but in fact all of them can be resumed in this: we can made an GET HTTP request in order to determine if a resource or file exists or not.


DecSoft (In thread: How to load JSON object into variable from Httpresponse)

Hello fakie,

I think this:

Must be something like this:

Anyway, your JSON response is an Array, and you must deal with that using the Array related actions. Apparently your response contains only one JSON object in the Array, so probably you can use the "ArrayGetItem" action like below:

Once you do that you can access the JSON object's properties using the specified variable like below:

On the other hand, if we are talking about your server and then you control the response, try to send a JSON object directly, not inside any Array, then you can access the JSON data in a more easy way. In fact you no need JSON at all, that is, you can also use another kind of response.

For example, a possible response can be certain string ready to be passed as the argument of the "ParseVariables" action. Then your response can be directly put inside your desired app's variables. Take a look if you wanted at the "LoadVars*" and "ParseVars" samples.


DecSoft (In thread: Set the [App.TextDirection] & [App.LanguageCode] variables in runtime)

Hello starin,

I think that understand what the problem is. I update App Builder right now in order to fix a mistake that doesn't allow us to change the values of the [App.LanguageCode] and [App.TextDirection] in runtime. Now you can change such variables and therefore the appropiate changes are applied to the application.

So update your App Builder copy starin and, please, consider to buy one or more App Builder licenses!


DecSoft (In thread: How do i download a download a file from app servicer?)

Hello.

But David. is there anywhere a file can be download to in the app? i just want a file to be download to a location on the app then i can do something with it.

i also want to know if i can check if the file does exist.

Is all this possible?

and how do i do it.

Of course it's possible! In this other post I place all the appropiate links in order to start.


DecSoft (In thread: How to make a video call over ip(LAN) in an AB application?)

Hello tin,

This means we advance something in this point? Honestly I am a not experience in that. On the other hand (maybe this is stupid, so please just go ahead if them) there is not a better approach to "simply" use the device's phone application? For sure some Cordova's plugins allow us to launch such application with a specific number, for example...


DecSoft (In thread: How do i download a download a file from app servicer?)

Hello Kasito,

I am not sure if you can download a file in that place, since they are part of the application's resources. However, if you can do it, you must use (at least until this plugin are not implemented out of the box) the FileTransfer and the Files Cordova's plugins, as I explain you in this other post. Look at the possible app's directories we can use to store the downloaded files.

P.S. Why you need to download such file? You can't simply put their URL in an IFrame control in order to show it?


DecSoft (In thread: Custom app icons and splash screens not working in cordova-android v6)

Hello to tall,

My trick is after build project with cordova first time.I copy "res" folder in compile folder to "platforms\android\res" folder.
Then build with cordova again.It fix this bug.

Then maybe it's possible to use the "xcopy" command in the Extra BAT file option in the Cordova tabs of the app's options dialog in order to copy or move the icons... but anyway this bug was fixed in the next Apache Cordova release, or maybe we can downgrade to a 5.x version in order to avoid the problem.


DecSoft (In thread: Custom app icons and splash screens not working in cordova-android v6)

Hello edunt,

Apparently there is a bug in the latest version that causes the problem. The solution probably is to downgrade Apache Cordova into a previous version. Look also here for possible workarounds and and other solutions edunt.


DecSoft (In thread: How do I check if a particular date then do something)

Hello,

Ok. Will try and get back to you. David

Just post here if you have any further question Kasito.


DecSoft (In thread: How do I download a folder from app server)

Hello Kasito,

Talking about Cordova's build applications, right now the only way to do something like you wanted is to use the Cordova's File plugin in addition to the Cordova's FileTransfer plugin. The "problem" is that right now these plugins are not included "out-of-the-box" in App Builder (we use the File plugin to support the FileRead and FileWrite actions however) and you must use it as any other non included "out-of-the-box" Cordova's plugin, that is, by directly use their Javascript APIs.

You can found various application samples that shown us how to use Cordova's plugins in our applications: SendSMS and CordovaPlugins are just a couple of them. There is a tutorial in the program's help file that talking about too. Then just go ahead and try it: if you need any further help don't hesitate to post it here or open a new forum's thread Kasito.


DecSoft (In thread: How to Set an various Image's Popover Text in runtime)

Hello starin,

First of all update your AB copy starin (please consider to buy a license if App Builder is useful for you) because I upgrade the UI Bootstrap library that, between other things, enhance the tooltips and popovers with new possible position and event values.

On the other hand, after a hard research I finally remember that certainly "Image" is not Array, but "RootScope" it is. Then the below code works as expected and may you can adapt to your requeriments. Of course post here if you have any further question.

* The above code changes the "PopoverText" variable of the (suposed) "Image1", "Image2", "Image3" and "Image4" controls.


DecSoft (In thread: How to Set an various Image's Popover Text in runtime)

Hello starin,

No problem. Just now I am working to upgrade the UI Bootstrap library to the latest version (lot of internal changes must be made) in order to assert we are using it. Then I will to do some other tests in order to achieve what you wanted. I will inform here on any news.


DecSoft (In thread: How do I check if a particular date then do something)

Hello Kasito,

Sorry, but I think the above code is exactly what you means... we get the "now" date and compare it with your provided one. Then we do something if the date is equal or other thing when not.

Maybe I am missunderstanding something?


DecSoft (In thread: How to Set an various Image's Popover Text in runtime)

Hello starin,

Looking at the code I think the scope is not the correct: must be something like "window.App.RootScope.Image". On the other hand, we can't mix AB variables with JS variables in the same JS code. However, I think we meet another problem starin, because follow my previous notes you can thinking on write something like this:

But the above code can't work as expected, because "Image" is not an Array of objects, so we can't use any kind of "index" property here. Then in order to achieve what you wanted, I think we must iterate over all the images, and then assign their appropiate "uib-popover" attribute. This can be does by a code like the below one:

However, that code doesn't work as expected... Certainly the appropiate "uib-popover" is set (we can see it in the Firefox Inspector, for example) but the popover doesn't works as expected. I am try by upgrading the UI Bootstrap library behind the popovers but without success.

I will investigate a little more about this because I am not sure about what can happend here. Maybe I can open an issue into the UI Boostrap project page in order to get some possible help. I am sorry starin but right now you must look for some possible alternative or approach. I will inform here on any news.

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.

This website uses cookies only to store your preferences.

Ok! Hide this note More information