Component that needs to communicate with a local js file

Forum to discuss the new web client version of Servoy.

Component that needs to communicate with a local js file

Postby edwin.boon » Wed Jun 07, 2017 9:47 am

Hi there,

we are developing a web component for our mobile app. We build the app with phoneGap for the login page and the iframe our Servoy app is running in. Now we use a phoneGap plugin which allows us to share stuff with a native socialshare option. The challenge we have right now is that our component needs to talk to a cordova.js file that exist locally on the phone. Servoy don't know about it. Is there any way we can connect this file to our webcomponent in Servoy?

Thanks in advance
edwin.boon
 
Posts: 19
Joined: Fri Jul 29, 2016 11:40 am

Re: Component that needs to communicate with a local js file

Postby tnguyen » Wed Jun 07, 2017 3:43 pm

Hi,

If you need to talk to a phonegap plugin you will need a bridge of sorts between the iframe and phonegap native wrapper. There is one web service that's in development (https://github.com/Servoy/svyPhonegap) that details how to connect to a camera/location plugin.

There also exists a mobile sample solution that uses it. (https://github.com/Servoy/svyMobile)

Basically - in order to connect your particular plugin, you will have to write a simple web service api to communicate to it from within Servoy.
tnguyen
 
Posts: 16
Joined: Mon Sep 29, 2014 8:40 am

Re: Component that needs to communicate with a local js file

Postby edwin.boon » Wed Jun 07, 2017 4:46 pm

Hi,

Thanks for the advice. With a service we got it up and running
edwin.boon
 
Posts: 19
Joined: Fri Jul 29, 2016 11:40 am

Re: Component that needs to communicate with a local js file

Postby Thomas.shuttleworth » Thu Jun 08, 2017 2:26 pm

Hi,

i'm fairly new to Servoy and i'm trying to use the Phonegap plugin, i've followed the link posted further up that directed me towards a mobile sample of github. The sample readme mentioned that additional libraries are needed to run the sample. I was hoping you could tell me if i'm able to just search github for those libraries or whether I might need to look further afield.

Thanks
Thomas.shuttleworth
 
Posts: 24
Joined: Wed Apr 05, 2017 5:08 pm

Re: Component that needs to communicate with a local js file

Postby tnguyen » Thu Jun 08, 2017 7:41 pm

Although most of the software is open source and a few of them might be on Github, it's easier to just get to the binaries from their respective websites:

Phonegap cli:
http://docs.phonegap.com/references/pho ... i/install/

Node.JS
https://nodejs.org/en/

Git
https://git-scm.com/
tnguyen
 
Posts: 16
Joined: Mon Sep 29, 2014 8:40 am

Re: Component that needs to communicate with a local js file

Postby Thomas.shuttleworth » Fri Jun 09, 2017 9:56 am

Thanks, that's just what I needed.
Thomas.shuttleworth
 
Posts: 24
Joined: Wed Apr 05, 2017 5:08 pm


Return to Servoy NGClient

Who is online

Users browsing this forum: No registered users and 10 guests

cron