Posts by DecSoft

Show threads by DecSoft
3354 posts found, page 20 of 224

DecSoft (In thread: InAppBrowser URL schemes)

Hello Andrea,

I think you can got it. Just take in consideration how "executeScript" works. My fault was to assume that we can change the "code", but, we can't do that, because "code" means "what code is to be injected or executed (?)". So the point must be to prepare the right Javascript in "code".

Maybe this can work "as is":

But I am not sure... just must try it and see if in "value[0]" you can get that "object". If the above don't work, then maybe we can use the below:

And of course in your page HTML you must have a function like:

I think the above must work well. If we can directly pass the object to "code", then just do it. If not, then we can try with the function call. Since I am supposing that that function will be called and then the "value[0]" must contain the return of that function.

It's a question of try it and see if finally you can see it working as expected.


DecSoft (In thread: InAppBrowser URL schemes)

Hello Andrea,

Since in the original code "values[0]" stores a boolean value, I suppose that value is what the "window.shouldClose" stores. So in principle, if set an object to the "myVariablesObject", that object must be in "values[0]". But now I think I am wrong... we must take care about the executeScript documentation here.

Apparently this code cannot be executed "as is":

According with the documentation we cannot change the "code" with "myVariablesObject". "code" is not an arbitrary thing... but must be "as is": "code". Apparently "code" must contain the code to be injected (executed?). The rare thing to me is that the "code" originally only contains a variable name... "window.shouldClose"... so I can't understand that...

Anyway, try with the below code:

Just to see what happen... maybe the "code" can be a function, for example, who return an object like "{"shouldClose": window.shouldClose, "example": window.example}"... so try the above code "as is", and then try with something like below if the above don't work:

I hope you can get the idea that I am trying to explain. It's my fault to misunderstand how the "executeScript" works...


DecSoft (In thread: InAppBrowser URL schemes)

Hello Andrea,

I am not sure... since to me that appear something weird... I mean... the page that you run in the "in app browser" is not part of the app (are running in another context), so, probably you can't share variables "as is". So in principle I think there probably has not a solution or not an easy one.

Saying that, maybe you can try some possible things. For example, the below code take my attention:

Apparently you can get the value of "window.shouldClose" from the context of "executeScript", so, maybe you can use it to get the "example" variable value, at least if you define it as "window.example = 'my value';" That is, the idea is to execute the below code:

Another possible way can be this other approach. Looking at the below code:

... again, "code" apparently can get the "window.shouldClose" variable value. So I can imagine a code like below:

You can try the below code and investigate what the "values" variable ("values[0]" in particular) contains: if I am not wrong, that must contain the object that we set in "myVariablesObject", which contains both variables: "window.shouldClose" and "window.example", in the appropriate object properties.

P.S. Again I am not sure, however, in the above code you can see that you access to the "winRef" variable (the reference of the window opened by the "in app browser"), so maybe can be possible to reach the "example" variable like this: "winRef.example".


DecSoft (In thread: Cordova Geolocation bug)

Hello Mario,

You are right, sir. This new release fixed the bug. Thanks very much for your report!


DecSoft (In thread: New App Builder 2022.9)

Hello to all,

Here is a new DecSoft App Builder with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: New App Builder 2022.8)

Hello to all,

Here is a new DecSoft App Builder with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: New HTML Compiler 2022.6)

Hello to all,

Here is a new DecSoft HTML Compiler with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: New npUtil 2022.2)

Hello to all,

Here is a new NeoPlugin npUtil with the below changes, fixes and enhancements:

Get more information and download individual NeoPlugins and the NeoPlugins Mega Pack from here.


DecSoft (In thread: New npEdge 2022.2)

Hello to all,

Here is a new NeoPlugin npEdge with the below changes, fixes and enhancements:

Get more information and download individual NeoPlugins and the NeoPlugins Mega Pack from here.


DecSoft (In thread: New App Builder 2022.7)

Hello to all,

Here is a new DecSoft App Builder with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: New App Builder 2022.6)

Hello to all,

Here is a new DecSoft App Builder with the below changes, fixes and enhancements:

Read the entire product's history


DecSoft (In thread: Camera Fix for API 30 (AB1))

Hello Andrea,

There is no differences between AB1 and AB2 talking about Cordova plugins: we use the same Cordova plugins. I try with the sample included by AB2, and, right now, I also try with the "Camera4" sample of AB1, and, both of them work as expected. Note that the issue that you linked appear as "fixed", so, certainly there is a problem in the past, but, apparently has been fixed now.

Maybe you need to remove the "compiled" folder and compile the app from the scratch. Since the plugin work as expected here in both AB1 and AB2 (in both cases with the API 30 of Android), that must work also for you.


DecSoft (In thread: Camera Fix for API 30 (AB1))

Hello Andrea,

First of all, thanks for share your solution. However, I try with the "CordovaCamera" sample app of AB2 and the sample (and the Camera plugin) works as expected for me also using the API 30 of Android. I update the current release of AB2, because I made some minor changes to the referred sample, but, in general, the plugin work as expected.

I suppose you are using AB1, but, I am not sure about what you want exactly or what of the AB1 camera related sample are you trying to use. If you refer to me what AB1 camera related sample are you trying to use or what you want maybe I can help you. My idea is that may you finally get the plugin working as expected, but, that the above code is not exactly the solution, to say like that, since I try here with the sample of AB2, and, basically we are using the same Cordova plugin.

P.S. May you can try with the "CordovaCamera" plugin of AB2 (please, download -do not update- the current release) to see if work as expected for you, since must do it, because it's working for me here.


DecSoft (In thread: HTTP: Uncaught TypeError)

Hello Mario,

I personally commonly use the "views.view1.http1.response" way since this works as expected even if we are in another view. Certainly the "view" variable must be taken with some precaution, since we can be in another view as you said. In the control help I use the first way. And now we can use the "self" variable even if we are in another view too. In fact the help refers to the "view" (inside events) variable like below:

Stores the current app view or dialog. This variable allow us to access to that view or dialog properties and methods and also their controls properties and methods. For example, you can access to a control properties using the variable "view.yourControlName", suposing the control is named "yourControlName".

However, may you are right and I can enhance the help, even when probably, if the view is the unexpected one, may we can imagine more or less easy that that is because we are not in the view to what we want to refer. May I can take a look at the help in order to add some information about this for the "view" variable.


DecSoft (In thread: HTTP: Uncaught TypeError)

Hello Mario,

I was tempted to propose some possible workaround, even when, certainly, the issue that you describes occurs. But then I figure out that the same issue can happen with other controls like the Websocket, AudioPlayer, VideoPlayer and Timer controls. So I decide to handle this and rewrite how the DecSoft App Builder compiler set the "self" variable of all the controls. I published a new release of the product right now as you can see in this forum post, Mario.

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