-2

I need to create an app for iPhone and Android that simply opens up the phone camera, clicks and posts the pictures to the server, and retrieves them all when needed. That's it, nothing more than that.

I was thinking of using these popular HTML5 platforms. I have gone through documentations and Stack Overflow questions of jQuery Mobile, Sencha, Phonegap. And honestly I am getting more and more confused.

I am confused whether they will give me a native app or "native like" app.

My requirements:

I need a native app (NOT TO BE OPENED IN WEB BROWSER).

I am a .net programmer. I can use Xamarin as well.

halfer
  • 19,824
  • 17
  • 99
  • 186
Lakshay Dulani
  • 1,710
  • 2
  • 18
  • 45
  • if you are sure that you want native app then go for it. All HTML5 frameworks run on browsers. http://stackoverflow.com/questions/14166038/use-a-web-mobile-framework/14166593#14166593 – SachinGutte May 11 '13 at 10:17

2 Answers2

2

Fernando is very correct in that with using PhoneGap your UI will be "Native-like" but PhoneGap will expose native functions like access the camera to your Javascript.

As for using Xamarin, you can definitely use C# to create your iOS and Android apps. The major difference in using Xamarin verus PhoneGap is that you will need to write specific code for the user interface for each platform. If you app is pretty simple and straightforward this may not be too much of a hassle. Especially when you consider you can use Interface Builder for iOS and the Android Designer in Xamarin Studio.

As for the rest of your apps' code, Xamarin now provides a library that lets you use the same code to access the camera regardless of platform: http://xamarin.com/mobileapi

In addition to this, you can also share the code responsible for uploading/retrieving the photos to/from your server.

One additional benefit of C#/Xamarin is that you can use multithreading. With this in mind, you could have your uploads work in the background without taxing the main UI thread (making your app more responsive.) I don't think any of the JS solutions can do this (anybody, if I'm wrong don't hesitate to correct me.)

Ben Bishop
  • 1,414
  • 9
  • 14
1

I think your confusion comes from the fact that many frameworks like phonegap gives you native functionality but still using web views and HTML5 to create the apps so they are portable to all platforms. This is a very common approach, you will have a native app that consists on a simple wrapper that provides native functionality to a web view.

Since you need to use the camera, you will need to build a native app. If you want to go full native or use one of the frameworks previously mentioned is your decision. The wrapper approach will let you build a unique app for all platforms very quickly, while native will give you more customisation, but you will need to build a different app for each platform.

Just as a clarification, Sencha aand Jquery Mobile are WEB frameworks specialised in mobile, so they dont have by themselves the capability to use the phone camera, you would need a native wrapper around them to do this.

My recommendation is phonegap, its widely use and documented, it gives you the camera functionality in a very handy API:

http://docs.phonegap.com/en/2.5.0/cordova_camera_camera.md.html

Fernando Diaz Garrido
  • 3,995
  • 19
  • 22
  • thanks @fernando for the help If I use phonegap, users will have to use a browser to open my app? – Lakshay Dulani May 11 '13 at 10:42
  • 1
    no they won't the app is downloaded from the respective market and will be launched and will look just like any other native app, the only difference is that in the insides of the app the development is done as a web. Facebook for example heavily uses this approach, a good part of their native app is web. – Fernando Diaz Garrido May 11 '13 at 10:47
  • The Facebook app no longer uses HTML5/Web for their app: http://thenextweb.com/facebook/2012/12/13/facebook-android-app-gone-native/ LinkedIn also dropped HTML5 for their app: http://www.optimusmobility.com/2013/04/18/another-one-bites-the-dust-linkedin-drops-html5-and-goes-native/ – Ben Bishop May 11 '13 at 13:17