I have created a mobile app for Android and iOs, it used some parts of the Phonegap API (connection, FileAPI, FileTransfer, camera, audio)
The mobile app is responsive and works offline, my plan is to create a Desktop version for Windows, Linux and Mac using NodeWebkit https://github.com/rogerwang/node-webkit so I'm looking for an implementation or ideas of how to implement the Phonegap API using Node.js
As far as I know, it will be possible to implement this APIs:
Connection: Using Node dns module
FileAPI: Using Node file implementation
FileTransfer: Using the http module
Camera: Using WebRTC Chrome APIS
Audio: Using WebRTC Chrome media APIs
Do you think that the node modules mentioned are the appropriate ones? Do you know any current implementation of Phonegap APIs using Node.js?
I found this one: https://github.com/xverges/cordova-nodewebkit
The problem is that it's not active.
Try using the sails.js framework, built on node.js. You can use phonegap and bootstrap both with sails.
Related
Im trying to use webRTC API such as getUserMedia and RTCPeerConnection for my app which is built with the cordova framework.
I am wondering if its possible for webRTC to work on both Android and iOS since my video chat app is a hybrid app (js and html) which is supposed to manage the entire p2p video chat by itself, unlike pc versions which require a web browser for the webRTC communication.
Yes, It is possible to get them to work. Keep in mind, the architecture of cordova application is reliant on a Web View rendering of your application. That web view will need to provide the WebRTC APIs to consume in JavaScript. This thread suggest the web view in iOS 11 does not support it. In fact, it is pretty new to Safari all together. This documentation says that the latest versions of Android Web Views do have support. WebRTC is a collection of technologies that enables RTC, and there are native libraries for accomplishing this. I have seen a couple of plugins for Cordova that enable access to native code so you are not as reliant on the Web View.
cordova-plugin-iosrtc
phonertc
Good luck!
I have a study project which consists in using the webrtc for a web audio video chat application and also its mobile version android ios. I have seen many different tutos, but I have to build my own server and use it locally. So you have some tutorial or technical advice? thank you
If you want to make an hybrid app means in cordova then try this link in this u can get all your answers
https://www.webrtc-experiment.com/
and if u want to make a native app in android and ios then you should try this links
https://tokbox.com/
https://github.com/webrtc/apprtc
Take a look at this repo: webrtc as well as this boilerplate: https://github.com/webrtc/apprtc - helped me a quite a lot.
I need some help in order to interface a native Android/iOS app with my Cordova Hybrid Application and send messages from each to other.
Can I use in total freedom cordova.exec command to send messages to the native application?
Must I create a plugin to embed it?
May you suggest me an example that fits with Cordova 5.0 version?
How can I wrap cordova.exec into an Angular service?
Cordova exec is not a function to execute anything on your device.
It's a function to call native code from the javascript but the function you call has to be either from the cordova framework, or from a plugin.
If you want to communicate between apps, you will have to either make your plugin using native code or maybe you can find a plugin already doing it.
For android you can communicate between apps using intents, for ios I have no idea.
You can have a look at the app launcher plugin, it covers the launching an app from an other app part.
For the passing parameters and receiving result part, on android it's easy, you just have to add parameters to the intent.
For IOS, you can read this document.
I have a Node.Js app running on a publicly accessible server.
I want to make it possible for users to access it as a native iOS app.
Is there a simple way of simply making an iOS app and having it show my Node.Js app running from the server? Or it's more complicated than that?
I looked into PhoneGap but maybe some other recommendations also?
Thanks!
PS I know the question is broad but that's why I'm asking – to focus my question and to know what to do next.
Node.js - this is a server side application. So you need to build client application which can communicate with your node.js server by Rest api or so...
As you mentioned you can build hybrid html5/js app with PhoneGap, Cordova, Ionic "wrappers/libraries" which will pack it into native iOS/Android/... application and that app can talk to your node.js server and transfer data you need.
Also, as Daniel Larsson mentioned for some specific pages you can use webview to display page straight from the web, but webview can be a part of your application but not an entire application, because Apple will reject it during review process.
If you want to port your existing web-app over to being a native app on the app store, I can positively recommend PhoneGap having developed multiple apps with it after completing the same research you are doing now.
As NYS said, you'll need to package all your web-app design (HTML/CSS+images/JS) inside the PhoneGap app, any other way simply wouldn't be responsive enough.
As for what to do next, I would dive straight into creating a PhoneGap application and see how your app runs inside the Cordova wrapper out of the box. The issues I faced were with scrolling on divs holding content, and non-responsive click events, both were easily solved with javascript libraries.
Cheers Chris!
You may use Socket.io for native option.
http://socket.io/blog/socket-io-on-ios/
https://github.com/socketio/socket.io-client-swift/
https://github.com/pkyeck/socket.IO-objc/
https://github.com/square/SocketRocket/
I have two different apps, one is a native android app and other is a web app built using sencha and javascript.
I need to get some information from the web app to my native app.
Any idea how this communication can be done ? I am not using any webview since both are two different apps.
Please let me know. I even tried cookies, local storage etc.. But seems to be the native android app cannot access the browser cookies or local storage..
Please help.
You can try the following:
Run an httpd at your app. If you use cordova, you can take a look at org.chromium.socket plugin. There is an example of how to set up a local http server:
https://github.com/MobileChromeApps/mobile-chrome-app-samples/blob/master/webServer/server.js
At your webapp you issue AJAX calls (replacing html with JSON would fit very well) to localhost, where your app is running at the background. Your app will respond the requests, using JSON for instance.
In the other way around, your app can make AJAX calls to the server, that can update your html/js app using websockets.
If you are not using cordova, it is even easier to build an httpd in Java:) just google around.