I want to create client/server offline application. Server should be hosted on a mobile device. Other devices throught a browser should get some content from serrver. Is it possible at all? Is it possible using phonegap? Could anyone give me advice about it?
I use this chrome plugin in a couple of enterprise apps:
https://www.npmjs.com/package/cordova-plugin-chrome-apps-socket
It works on Android and iOS, is very stable, and you can use it as socket server/client and also as webserver.
Update:
First: If you are developing Cordova-Apps, then make a decision what you want to use (Cordova, Phonegap, Ionic, …). Don't mix things and read the documentations.
Second: If you want to install a Cordova plugin from npm, the syntax is:
cordova plugin add [npm-name]
For installing the chrome-sockets-plugin, use:
cordova plugin add cordova-plugin-chrome-apps-socket
Before you start writing a server-client-socket app with this plugin, read the full documentation from Google. It is not a task which works out of the box and needs some lines of code and some experience in Javascript.
Related
I am new to ionic framework. I have SPA build in .net mvc, angularjs & web api which a large web application. But all form are simple data entry forms with input and dropdowns. I want to build simple mobile app for not all but some forms using the same web api. I have googled and found that Ionic framework can do the work, but where should I start from? Need guidance on what type of app (native,web or hybrid) will be best for my purpose. I am looking for these few features.
Should be available for android, iOS and windows download.
Should have push notification.
Update the app without uninstalling.
Performance
Basically ionic use basic html components + ionic components + angularjs and that can be installed across iOS, Android, and Windows mobiles.
Also push notification also supported in ionic
updates are available without uninstall
and it gaves best performance for a small and basic functionality
now a days so many application build with hybrid platform like reactjs and ionic.
For your business purpose you can go with it definitely as it is a simple form submission and saves your time.
You can refer that links to see apps build with ionic framework:
http://showcase.ionicframework.com/apps/top
Please, am a web developer. I just built a web app for a school to manage their results and fees.
Now, i intend to build an app on android and ios so its 'easier' for both staff and students to get notifications and interact better.
Is JQuery mobile the asnwer?
Thanks for your reply
jQuery Mobile doesn't create an application for Android nor for iOS, it only makes websites look better on said platforms.
To create a real, native, application for Android you should use Android Studio. To do the same for iOS you need XCode and MAC OS X.
But, if you prefer to write websites, Apache Cordova does what you need. Allows you to create apps for any platform using your usual HTML, CSS and Javascript.
I'll drop the link here so you can check it out.
https://cordova.apache.org/
Another approach is creating a basic Android and iOS app that simply opens a web page (your website), but it is most of the time lacking in performance. If this last approach interests you, just look up "WebView" for Android, "UIWebView" for iOS (Obviously you'll need Android Studio and XCode)
EDIT
This is an old answer, now a ton of different technologies exist to build multiplatform applications, without even losing out on performance (for example, see react-native)
If you have already built the app using JQuery mobile and want to make it into an app I recommend looking at Cordova (PhoneGap) https://cordova.apache.org/
For notifications etc I found https://www.pushwoosh.com/ to have the best integration
Is it possible to get a MeteorJS app onto a watch OS?
I'm asking related to either Apples or the Android version. After googling around, I think the android version can support a browser, but the apple watch doesn't (at least not if you don't jailbreak it).
It seems meteor works with browser functionality inside a native app wrapper. Is such a thing available for these watch OS's?
There are some efforts to enable iOS/OSX applications to easily connect to and communicate with Meteor servers. WatchOS runs an environment that is relatively similar to iOS and so I expect that some if not all of the libraries/extensions will work in WatchOS projects. The most popular effort that I've seen is called ObjectiveDDP: https://github.com/boundsj/ObjectiveDDP
ObjectiveDDP allows you to do the following:
Connect to and authenticate with a Meteor server.
Listen for update events on collections.
Call Meteor Methods.
Send CRUD commands to Meteor for a collection/document.
As for android, the answer is no right now (https://developer.android.com/training/wearables/apps/index.html):
Wearable apps can access much of the standard Android APIs, but don't
support the following APIs:
android.webkit
...
Hence, you cannot have a webview on an adroid-wear watch, which is what phonegap/cordova use to run meteor apps on android. Until that changes, I don't think it will be possible to "just run" meteor apps on an android-wear watch without writing your own native android app. As Patrick said, such a native app could still communicate with the meteor server using DDP, but it's not as straightforward as writing a meteor app that runs on regular android.
I am trying to build an Android (v.4.0.3) app with Phonegap (Cordova 1.7.0), Node.js (v0.6.18) and Socket.io (v0.9) on the other side. I need to do this for my school project, but I hit a wall due to my limited knowledge. I even thought that socket.io can’t be used within Phonegap (Android). Would it be possible to get some directions, link or other kind of help so that I would be able to establish connection. Connection is the main problem. The documentation is not helping me enough.
I would really appreciate some tips on how to establish a connection. I installed node inspector, but nothing. Server.js is running on an Amazon EC2 micro instance on port 8080.
I read somewhere that Android doesn't support websockets.
But isn't it true that Phonegap actually grabs the whole HTML page and packages it up to run as a native application within a UIWebView or WebView?
So in that case it is the webkit. And this one supports websockets if I am not mistaken.
Regards,
Tomaz
There's a Phonegap plugin for websockets.
This question was asked almost 3 years ago though. If you need to use node.js and cordova/phonegap together on Android or iOS see jxcore-cordova
I'm trying to get setup to do mobile development using phonegap so i can deploy my application in android store and apple store. It's my understanding that I can simply wrap my application in phonegap so I can deploy for Android, iOs, BB, etc.
My application is an ASP.Net MVC app written with VisualStudio. All of the examples I've read through in my research tells you to use Eclipse for PhoneGap and Android, use XCode for PhoneGap and iOs. My app is ASP.Net MVC that produces Html 5. Is it possible to use PhoneGap with VisualStudio to produce Android and iOS deployable phonegap apps?
One alternative I've been thinking about is creating a simple Index.html page that uses jQuery to make a call to my ASP.Net MVC app and load the resulting HTML inside a div. Then I can simply reproduce this very lightweight Index page in Eclispe, XCOde, etc to run through Phonegap. This seems like a hack though. I've tried getting this to work but have not had any luck in the Android emulator in my windows environment.
Can someone please point me in the right direction for how to incorporate PhoneGap with my ASP.Net MVC app? Thanks.
ASP.NET lives on your server, so anytime you reference any ASP.NET script, you'll have to make the URL an absolute one with a hostname: http://www.example.com/my-script.aspx. Any non-dynamic files should be stored locally on the device so they will function when there is no network connection. You can then just host the dynamic files on your server and reference them whenever you need to. To keep data transfer size as small as possible, I generally pass JSON or something similar to the app. from my server-side script and then interpret the data into HTML in the JavaScript code for the app.
You should keep as many assets as you can local on the device so it doesn't require an internet connection to use the app. So don't link to a remote version of jQuery, save it as a part of the app. package you create so it's always available.
Eclipse/Xcode are nice because they help you create your app. and package it properly for submission to app. stores. They are also nice because of how easy it is to find help using Eclipse or Xcode to create apps. Xcode is actually required, Apple makes sure you have bought the latest hardware and the latest software just to be able to submit an app. to the store.