3

I was asked to provide a tablet application with HTML5/JS/CSS which does not have dependency on any platform. Requirements:

  • Cross-platform mobile/tablet application
  • Offline capability and Storage (it should work in lack of internet connectivity and be able to synch after get connected)
  • Real-time data (it should be able to show any small changes from sensor values)
  • I should be able to connect to a CAN interface and get sensor values and ECU data. Because I have not come up with any solution for this part, I am thinking about Bluetooth. However, HTML5 doesn't support Bluetooth.

I'd appreciate to give me some vision if HTML5/JS/CSS can deal with this requirements (especially with Bluetooth)

Another question is that is it possible not to use any frameworks such as PhoneGap, RHoMobile, .... and just develop cross-platform app with raw HTML5/CSS/JS and have all requirements?

utvecklare
  • 671
  • 1
  • 11
  • 25

4 Answers4

3

Have you looked in to PhoneGap / Cordova yet?

You can easily create cross-platform mobile applications using HTML5, JS and CSS.

http://phonegap.com

The built-in API provides access to most of the device's native features and functions. You can manage offline storage using localStorage or SQLite databases, and can detect network connectivity statuses to determine if you are offline / online and what level of connection you have (Edge, 3G, 4G, WiFi). With a combination of those, you could manage your data synchronisation.

As for bluetooth, the PhoneGap API doesn't support it out of the box, but it is highly extensible so developers can create their own plugins for missing or required functionality.

The community is awesome and many of the plugins have been compiled into a central repository on GitHub: https://github.com/phonegap/phonegap-plugins

I know that there is a Bluetooth plugin for Android available on that repository.

You can also write your own plugins quite easily to add any extra features that you need:

http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-android.html

http://www.adobe.com/devnet/html5/articles/extending-phonegap-with-native-plugins-for-ios.html

** EDIT **

You posted an amendment to the question afterI'd written this answer mentioning PhoneGap. The honest answer is no, without a framework that interacts with the native device functionality, raw HTML5, CSS and JS would not be able to deal with bluetooth etc.

Matt Gifford
  • 1,268
  • 9
  • 13
  • Thanks for the reply, sounds like that Bluetooth plugin should be written for each mobile platform (iOS, BlackBerry, Windows Phone, ...), right? – utvecklare Jul 11 '12 at 17:17
  • Yes, if they weren't already available and written by someone else in the community, you would have to write your own plugin for each platform you wanted to cover. – Matt Gifford Jul 11 '12 at 20:37
1

No, you cannot. A pure web application is not able, and will likely never be able, to use bluetooth.

HTML5 Bluetooth and Audio

Having developed a Web App before, I can tell you that anything involving offline has to be simple, and using device hardware is out.

Check out the frameworks, you may be able to get something to work. But it may just be a better/more realistic bet to develop a Native Application from the get go.

Community
  • 1
  • 1
Will
  • 733
  • 8
  • 23
1

After a lot of searching I came up with MoSync which is a cross-platform SDK and is intended for developing different mobile applications. I believe MoSync can be the best answer for this question since it is really a rich SDK (C, C++, HTML, JavaScript) and has great tools and community that try their best to help you.

For further information I encourage developers to check here or visit their websites.

Community
  • 1
  • 1
utvecklare
  • 671
  • 1
  • 11
  • 25
0

Most of the future mobile apps will be developed using HTML5. HTML5 standards are getting adopted very rapidly and those standards are supporting phone features like GPS, Accelerometer, Camera, Storage etc.

I will recommend you to use PhoneGap if you want to use any device features.

seema
  • 21
  • 3