Morphing PHP driven site functionality into an Android App? - android

I'm completely new to Android DEV.
I want to make an app for a client that sells music, the idea is that it will be an alternate front end to the PHP site but will use some of the phone functionality such as locality etc.
Could anyone recommend the best approach to this? Would I look at developing via the Android SDK or via Flex/Flash? Is it possible to use php connections to retrieve dynamic data via android?
Any advice very gratefully received.
Thanks
Paul

Your best bet would be developing your app using Android SDK as you can use all the available native features. From a Flex perspective, you have a limited set of existing android API functionality that is supported.
As long as your PHP backend supports all your HTTP requests, you are good with both Flex as well as Android way.
Hope it helped.

I highly recommend you check out jQuery touch. It is a simple UI, but you get features like access to location (I believe through the html5 geolocation api (if they allow you to know their location)) and the list layout would work perfectly for purchasing music.
Obviously this is just my opinion. The Android API can be a little overwhelming at times but you will obviously have the most control over the phone and hardware, but jQuery touch keeps it simple. http://jqtouch.com

Related

Building Mobile Apps out of HTML5, with motion tracking?

This is an open question and I was really hoping for advice...
I am planning on creating a mobile app which will track your steps and distance (based on GPS), while sitting in your pocket.
I was planning to make the app out of html5 as I know you can calcualte the motion of the device using this
So, I am really asking if people think this is possible on HTML5?
Thanks
Assuming you know JavaScript, you should be able to accomplish this with PhoneGap's Geolocation object.
Appcelerator has Titanium.Geolocation as well.
If you plan to do it with HTML5 and PhoneGap is probably your best option. But you'll still need to program a background service* in order to handle tracking the location while the app isn't actively in use.
It sounds like the real work will need to be done in Java either way so I think you should just make a regular Android application. But as I said PhoneGap is still an option for the interface if that's what you really want.
* The background service will still need to be done with Android API's. Which would then need to be hooked into PhoneGap. It might just be simpler to make a native app.

Phone Gap or native Android wrapper?

I want to develop an application which works both in a regular browser and as an Android app. Both seem suitable but would I be right in saying if I went with Phone Gap, deploying the same html content as a regular, server hosted website is not trivial and would require modification? Also, are multi page applications not desirable in a Phone Gap wrapper?
Are there any alternatives I should consider? I'm surprised someone hasn't already written an Android wrapper with all the hardware access wiring done already. Or have they?
There are few things you should know,
If you are going to publish your app also on iOS, you can't use server hosted website for your app.
All of your basic functionality must stand on your app assets, is one of the iOS guidelines, and its also make-sense for best ui performance (both iOS & Android).
Use server-side wisely, when you want to fetch data which have to be up-to-date.
there are some new mobile browser features which will be available in the future, that allow your website to use the device hardware functions:
Device API on W3C
Good luck dude ;)
You can try with jquery mobile framework:
http://www.jquerymobile.com
It is jquery based framework for developing web apps that works on standard web and on multiple mobile devices (with cordova)

What can't you do with an HTML5/Javascript mobile app that you can do with a native mobile app?

I have just started researching creating mobile apps and from what I understand one big advantage of using HTML5/Javascript is that you can write one application that works with both Android and iOS.
I have also read that one of the drawbacks is that there are certain things that you can't do with HTML5/Javascript that you can with a native mobile app.
Is what I stated above correct? What will I not be able to do if I decide to go the HTML5/Javascript route?
While both native and web have their own positives and negatives, the one main advantage that native apps had over web apps was "Offline Access"
However that is now changing as HTML5 has support fo Offline Web Applications.
Some things for iOS:
Background audio/sound effects
Address book
Leverage CoreGraphics & OpenGL for advanced drawing
Camera access
Accelerometer
Limited Calendar Access
It all depends on what you are going to do. If your app needs GPS, the accelerometer, or is very graphics intensive, then a native app is the only way to go.
Otherwise, I would go with something like Sencha Touch for your app for a couple reasons. First off, if you release an update with a HTML5 app, you don't need to force everyone to download it, it will update automatically. Also, as you mentioned, you only need to write one application for all mobile platforms, which expands the potential user base. Lastly, I think the internet on phones is getting fast enough to support internet applications very well, and this is only going to improve in the days to come.
Basically, it all depends on the specific needs of the application. Personally, I would go with HTML5 whenever possible, due to the mobility it gives you with platforms.
I think we can separate this into two lists...
What can be done on a mobile device that is not possible in HTML5:
Push Notifications
Advanced Graphics (3d, OpenGL)
File Uploads (possible on Android but not iOS)
Connect to Address Book
Connect to Calendar
What can be done in HTML5 but is easier or implemented better on mobile devices:
Camera Access
Offline Use
Device Location Services
Sound
Accelerometer
Speed / Slickness of UI (hard to quantify, but apps typically still feel nicer when native)
(Please note the date this was answered on, this landscape could be quite different in 6-12 months or more.)
In theory not much, if you use titanium. http://www.appcelerator.com/products/titanium-mobile-application-development/
Unlimited Extensibility
Titanium’s plug-in architecture allows you code modules in Objective-C or Java to
extend your mobile app with custom native functionality and then call those
modules using Javascript in Titanium.
Though i have never used Titanium and dont know how well this works. I would stick with native development anyhow ... for now.

CouchDB Replication to Android ... for Android Applications, or Android Browser or?

My goal is to replicate my CouchDB to Android to allow offline access & reduced latency.
I watched this video:
http://www.youtube.com/watch?v=3RdcKWYGqig
One fundamental point I don't get is:
Does CouchDB replication work only
for Android Applications?
Or, can it work for a web application
running in the Android browser (this
is what I am shooting for)? If so, how?
you would need to install the CouchDB software on the Android device in order to get it to work.
Once that is installed, the user can visit your app via the browser at http://localhost:5984/path/to/my/app
You could create one of those bookmarks that looks like an app, and point it to the local couch url.
Chris
Ofcourse you can create browser based applications.
Either try creating a couchapp and loading it with the browserview in android or club it with something like Sencha to wrap it around and making it a hybrid native web app!
If you know how to create couchapps, then it should be pretty straight forward, else, take a look into how to create simple couchapps. Ofcourse, i'm going under the assumption that you already know a bit of Android!

How should I approach making server-side software for an Android application?

In the past I have used Python for backend stuff along with Django for frontend stuff, but I don't know how well those two work with Android.
Can anyone recommend a good way to go about making server-side software that works well with Android?
Please take into account that I also want a web application as a frontend, so the backend should work with both the web app and the Android app.
Thanks for the help!
You might start by developing an HTTP API using Django, tornado, cherrypy, or any other web framework. This API may then be used by both your web frontend and your Android application.
In general, separating out the API from the application serves to clean up the code and make future changes easier. In this case, it also makes it easy for you to have multiple frontends without having to replicate the backend functionality.
If it's possible to create a web application version of your project, consider that it may be easiest just to create a version of that application which is formatted for the android screen, and allow Android users to use the same web application with appropriate styling.

Categories

Resources