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.
Related
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
I know that those kind of questions have been asked before, but I couldn't find a topic to help me.
I have been give a HTML5 game and I was asked to verify if I can run it on an Android tablet.
I'm a little bit confused with what I have to do? Should I create an Android project and import the file or is there an easier way to create an apk?
Thanks for your help.
You could look at Apache Cordova. This is a powerful environment made to support app development in HTML5. As such you should be able to literally copy your game resources over, run a build and have a full fledge Android App. Fun fact, provided you have access to OS X, Cordova will produce an iOS compatible app too.
If your game consists of HTML, CSS and JavaScript, such that it can be run off a modern web browser with no special plugins installed, rest assured it can run in an Android tablet.
You could access it directly from the tablet's browser or you can make an app (packaged in an APK and installed from it) which does essentially the same, but with a great benefit: the web page and the app can communicate (via JavaScript), enabling a richer experience.
Example of such communication: you're making an app for a web forum, and the link for "compose new message" opens an Android activity for writing that POSTs the result to the server, instead of constraining you to write in a small web browser form.
For more information on the subject, check out Android API Guides for Web Apps.
I would like to ask for some advice on this issue I am having. I am working on a website that is made with ruby on rails (along with html.slim, css, angular.js).
I would like to create an Android (and, if possible also iOS/Windows Phone) app to access a part of this website.
The website does nothing more than making some api calls to a server and it's really light, so I think that I don't need to make a native app. I would like to make this app in the fastest and easiest way possible. I thought that I would be able to make convert the site using Phonegap, but this would work if it was made only with html,css and js, not also with ruby on rails. The only thing I need is to store a small string on the device (the website stores a cookie) and then to make a few simple API calls.
Thank you for any advice on this - not so clever - question.
Bye!
PhoneGap, Cordova, Ionic, etc. - all the same. None of them will run your API (aka server side code - PHP, Ruby, .NET) without doing something dramatic.
Easiest approach - write server side services (e.g. REST services) using your favorite server side code - like Ruby, and use JS to securely call into those services.
This fits the PhoneGap/Cordova/Ionic paradigm, and will allow you to build a hybrid app (aka seemingly native app) the quickest.
Just my 2 cents.
Maybe (if you need real simple app for mobile platforms) you should create Android/iOS app with browser object inside app who will be receiving html data from your public website and show it for user. You just need to create mobile layouts in your rails application.
pros:
You can create this app real quickly;
Easy for update;
Don't need to update app if something changed in general web application layouts or logic.
When you create layouts for mobile they will be work for your applications and for mobile devices who doesn't use your app.
cons:
This is not classic application, it just browser inside your app.
It is not a bad solution for start. For most sites, and projects it will be enough.
More information about rails and mobile layouts for rails you can find here:
http://railscasts.com/episodes/199-mobile-devices
Example how looks like android app with browser (Webview) object:
http://www.mkyong.com/android/android-webview-example/
https://developer.chrome.com/multidevice/webview/gettingstarted
I'm sorry if this is not the answer you were looking for.
Is there any way of developing a mobile app as a self contained Rails/Ruby app?
The idea is to develop in Rails using the normal tools (browser, thin/WEBrick and command line) and then add the Rails app folder to a specially created Android/iOS app, from where it will be compiled to a native executable. This would be similar to the current PhoneGap creation process I guess. I know about RubyMotion but its iOS only, and its not completely Rails anyway.
Does anything like this exist currently?
What would you need to do this? Obviously you need to run a local webserver of some kind.. Do you need to run an entire stack (Apache, Ruby and Rails) inside the native app or could you take shortcuts (like JRuby for Android for example)?
What is your gut feel on how this would perform?
Any thoughts welcome.
EDIT
Gems are probably going to be a BIG issue as well.
Does anything like this exist currently?
Rhodes is in the ballpark, but it is not Rails and (last I checked) cannot use gems. It does, however, have you build so-called hybrid apps using a Rails-ish controller pattern, with partials and all that.
Obviously you need to run a local webserver of some kind
Not necessarily, and it would be an poor idea to do so for security reasons. Hybrid apps, such as Rhodes, have a Web presentation layer (WebView) displaying the HTML content generated by the back-end, without an HTTP stack.
What is your gut feel on how this would perform?
On many devices, I suspect that your app would crash on startup for having run out of memory. On the rest, I would expect mediocre performance, simply because Rails is not particularly svelte.
The strange thing is that you want to use web application as mobile application. Is there a reason to use Rails instead of just Ruby (then you have Ruboto on Android). My opinion that HTML5(+ local storage) is enough to serve mobile part and use API from somewhere on the web.
I'm working on a HTML5 cross-platform Survey application using jquery mobile, phoneGap , and sqlite database with web Storage !!!!
For Now I'm testing this App on Android Plateform using eclipse .
I'm new to the mobile world , I'm more familiar with j2ee web applications
So i'm wondering what can we call this type of architecture especially that I'm not working with a real server such glassFish ,TomCat .. or even a real SGBD and that everything is on the web browser (I'm using chrome)
Could Any one Help me with this ?
thank u :)
Here is the list of possible styles of architecture but I can't find the suitable one for my case !!!
You're building HTML5 loader apps on multiple platforms, depending on if you are storing your HTML5 locally or pulling it off a server, that's your answer for Server/Client.
You'll want object orient your javascript so you don't pollute the namespace. If you are scripting on the backend, also a good practise... I think object oriented goes without saying these days.
You can tier out your javascript to have a frontend generator, business logic layer, and data layer to handle your transactions with sqlite. Or you could also follow a MVC tiered setup.
If you are pushing data from the device to a central repository (which I think you must), you could build SOA on the server to handle the ingestion of data.