1

I'm new to the mobile space.

Currently, I'm developing a website wherein users can register and create a profile. A search feature is provided so that users can find other users. It's very similar to a dating site.

In the very near future, I'd like to offer my users a mobile app that they can run on their smart phones. The goals of this mobile are:

  • authentication/authorization, hopefully using the website's authentication/authorization feature where users enter an email address/password (or log in via Google/Yahoo OpenId or FB's OAuth). I don't want to try to implement my own OpenId/OAuth system. I want it to be like the user is logging into the website. That simple.
  • obtain the user's geolocation information. This way, I can return a list of other users using the mobile app along with their computed distances (will use simple Haversine formula)
  • possibly send notifications to the user via a buzz or beep, just something to catch the user's attention so that they'll look at their smart phone

Since HTML5 has geolocation support, is this something I can just do as part of my website? For example: if geolocation information is avalable, then do these, else just be the normal website. Any way I can buzz or beep a user's smart phone from a website?

If doing this as part of my website is not possible, should I be looking at PhoneGap, Titanium, or something else?

StackOverflowNewbie
  • 39,403
  • 111
  • 277
  • 441

2 Answers2

3

You have access to all three of these feature with Phonegap and Titanium.

Authentication / authorization - PhoneGap would function pretty much the exact same way as your current website, since PhoneGap just wraps HTML and lets you access the native features. Titanium you would have to set up a web service that could then be called using an HTTPClient. There are a lot of resources freely available on how to use this, like this link.

Vibration and beep alerts - Phonegap has navigator.notification.vibrate() and navigator.notification.beep(). Titanium has an API call for both of these as well, Titanium.Media.vibrate( [Number[] pattern] ) and Titanium.Media.beep().

Geolocation - Phonegap geolocation is very easy to use as well through this call geolocation.getCurrentPosition. Titanium is also very easy, check out this video on how to do it.

The bigger question is whether you should even use these, since geolocation is actually possible just using HTML5, and audio is also very easy to do especially with HTML5.

Really you should only use one of these technologies if you plan to have an app, that has different functionality than your website. If you do want to make an app, It sounds like Phonegap would be best for you want to wrap some of your current websites code.

Community
  • 1
  • 1
Josiah Hester
  • 6,065
  • 1
  • 24
  • 37
  • 1
    If I keep it as a website, then authentication & geolocation is taken cared of. Perhaps I can notify the user by just playing a beeping sound. Thanks for the clarification. Will be studying PhoneGap and Titanium a bit more, but this definitely puts things into perspective. – StackOverflowNewbie Sep 14 '12 at 05:11
  • Yes, HTML5 audio API's are very robust, and of course you can always have a flash fallback. [Check this great answer on SO out](http://stackoverflow.com/a/1934325/874257) – Josiah Hester Sep 14 '12 at 19:51
2

The answer to this question is relative but one this is clear that.

If you want push notification to the users who uses the mobile application without opening their application. You must have Native application installed on their device.

Now the question between the PhoneGap & Titanium. The basic different is

Titanium - Generate the Native look and feel controls using Java Script code and user can enjoy the animation and graphics much more than PhoneGap. Titanium support IPhone & Android for now.

PhoneGap - Generate the controls through rendering it in to the web view of the mobile. this might be not that much good in look as titanium but the advantage this is its supporting 7 platforms.

Now you have to think based on UI element.

AvtarSingh Suchariya
  • 1,992
  • 1
  • 20
  • 25