I have developed a small JavaScript game and I'd like to extend it outside webbrowser, making desktop and mobile versions available. What is the best way to do so reutilizing existing JavaScript code?
My answer is to make use of Phonegap. See the PhoneGap documentation. It supports the mobile Platforms.
Related
I'm developing a prototype of an Android app in HTML/CSS/JS, so that I can experiment with the UX of the app.
As a part of that I want to be able to style HTML elements as Android elements and (preferably) have them behave as if they're native Android UI elements.
Is there a JavaScript or CSS library that will do this for me? I've Googled, but nothing has come up.
I would recommend to take a look at the following Frameworks and Browserplugins. Maybe you will decide afterwards to regret using the native android toolkit at all, because it can be a big advantage to develop the application platform independent using HTML5 and Javascript techniques. Than later, if you want to port it to another platform you won't have to change a lot / almost nothing on the code base.
Phonegap
Ripple Browser Plugin (Phone Emulator)
JQuery Mobile
which is completely themeable: Jquery native android theme
The whole thing can finaly look like the following:
jpHolo
I am trying to make use of a few visualization libraries for a mobile app I am making (with phonegap).
The libraries are: https://github.com/jsantell/dancer.js and http://www.michaelbromley.co.uk/blog/42/audio-visualization-with-web-audio-canvas-and-the-soundcloud-api
However, they do not seem to work in mobile. Is there a way you could integrate these into an app? Or is the support for some of the tech these make use of now supported yet. I have only tested on iOS.
Thanks.
The problem as for right now is that the Web Audio API is not supported in mobile other than iOS 6+
Check this:
http://caniuse.com/#feat=audio-api
This API is the base for building an audio visualizer.
If you are working with Phonegap you could make part of the application web and the visualizer part native and use ir as a Phonegap plugin. It is justified to do this depending how much % of the application the visualizer is.
You might be able to use the Intel XDK for this. It allows you to make mobile applications using jQuery/JS/HTML5. Assuming you have all the code, it shouldn't be too difficult to port.
HTH.
I have been asked to create a webapp and native apps using HTML5/CSS/JS.
I should make some research, but i remember I heard about PhoneGap.
My basic question is this:
if i write a HTML5/CSS/JS that somehow interacts with a server backend (through webservices for example), this is a web application that a user can reach with a browser (or mobile browser) at a specific IP addresss.
If I "phonegap" the same code do I obtain an Android od iOS application that is already working or is there some more work in between? IF there is some more work this is not clear to me.
I am aware this is a generical question, anyway it is a programming question because I need to know if going for this single code base is an option or not.
Thanks!
I have recently built a hybrid web application using the same codebase that had to work on all major desktop browsers (down to IE8), mobile browsers and be installed as a "native-like" app on iOS and Android. For this I used jQuery Mobile and PhoneGap Build.
You can only use HTML, CSS and JavaScript for PhoneGap applications, so any data being retrieved from the server needs to be done via AJAX, but it works just fine.
I have a existing website in rails 2.3.8 which i want to develop for mobile phones(andriod,iphone), something like facebook's mobile site.
I found that creating the view pages with extension .mobile.erb will do the job.
But the problem is i am unable to call existing javascript functions on mobile site which i used for the main site.
I want to know if it is possible to call js or is there any alternative way.
Of course, you can use javascript on you mobile web pages. For iOS and Android. For other mobile i don't know.
Doc for safari ios : http://developer.apple.com/devcenter/safari/index.action
For iPhone you can use the iUI framework http://code.google.com/p/iui/ which consists of a JavaScript library, and CSS similar to that of native iOS apps.
Which javascript framework is most compatible with mobile phones and desktop both?
javascript disabled user of desktop are very low but mobile phone users are high and i heard not all javascript functions work in mobile phones.
See this question (Available iPhone Web Application JavaScript UI Library/Frameworks) for some ideas. Several answers refer to JQTouch (a jQuery plugin), which implies that jQuery may work for you.
there is no js-framework that works on all mobile phones:
if your target is iphone, jqtouch does offer nice iphone-specific stuff on top of jquery
if you want to reach iphone and android (and possibly some other high-end handsets) you could try xui, which is a jquery-like lightweight js-framework (by one of the phonegap-guys)
if your goal is to work on as many phones as possible, you might want to consider building the core of you site/app in standard html and progressively enhancing it with javascript for those
hope this helps,
frank
PhoneGap is an open source development tool for building fast, easy mobile apps with JavaScript.
PhoneGap
Another option you can go for:
baseJS
As for desktop, you know you can use any jquery, prototype, etc
You may want to start with looking at this to get an idea what is supported on the phones you want to support.
http://www.quirksmode.org/m/table.html
On mobile phones you are going to be most concerned with download size, unless you are only targeting phones with a 3G connection, so you may want to write your own framework that is geared toward what you want, specifically.
You will want to write your phone page to work without javascript, then, if there is javascript, then you may want to have it d/l your new framework, so the basic thing that is downloaded is just a bootstrap javascript file that can d/l the real javascript file that will be used.
Your bootstrap file can look at what is available, and if, for example, onfocus is available on a div element then it is probably a desktop, so you d/l the versions that use jquery and d/l the jquery files themselves.