Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best way to develop a cross-mobile app with bluetooth support?

I've read about the native feature-support of Phonegap here. Clearly, it makes no mention of Bluetooth support. I've failed in finding or locating any other platform with cross-mobile platform development support. As a result, I'm currently faced with two choices.

  1. Build independently for all the platforms (very painful option)

  2. Find a suitable cross-platform development solution (which I've not found yet).

My question is; for mobile developers out there, which option would you suggest I take, one not listed here? If possible also help with details of pros and cons.

Thank you very much.

like image 895
Chibueze Opata Avatar asked Oct 01 '12 16:10

Chibueze Opata


People also ask

Can I develop a cross-platform app?

Conclusion. Cross-platform apps are popular as it eliminates the effort to develop different apps for different platforms. A cross-platform app can run across devices and platforms seamlessly. To develop this universally compatible app, a cross-platform framework is essential.

Which technology is used for cross-platform mobile apps?

Xamarin. Xamarin can be considered as one of the main and highly-rated tech used to build cross-platform apps. Notably, developers have the alternative of writing or rewriting the code in other languages such as C, C#, and .


2 Answers

Build independently for all the platforms (very painful option)

In my experience, this is by far the least painful option, and not just for Bluetooth. The overhead of dealing with leaky cross-platform abstractions tends to outweigh the benefits by the time you get to a real, production product. Build an excellent iPhone app. Build an excellent Android app. You can share a lot of the UI design (though not all of it). You can share much of the data structure design. You can share some of the internal architecture. You can share any network protocols (particularly if you design them in JSON). But avoid code sharing and avoid shooting for the least-common-denominator. It's pretty far down....

For some kinds of projects it makes sense to share some C++ code between platforms. Trying to develop this stuff in JavaScript is a recipe for frustration the moment you go beyond the most basic of applications. It's easy to hack up something in mobile JavaScript that kind of works. It's very hard to get it to look and work great on all platforms; much harder than just writing them natively in the first place.

Some more discussions on this:

  • Mobile development - Native VS Cross Platform VS JavaScript
  • How to code sharing between Android and iOS (Where I discuss how to share large, established C++ code bases. But this isn't applicable for new development.)
like image 68
Rob Napier Avatar answered Sep 21 '22 00:09

Rob Napier


You list iOS as one of your desired platform. On iOS, any generic Bluetooth communication (other than Bluetooth LE or communication via Gamekit, headset or keyboard) is available only to Apple MFi program licensees. To get any details about this license, you need to apply to Apple's MFi program first. AFAIK, no 3rd party or cross platform tool chain can help you with this for iOS.

like image 24
hotpaw2 Avatar answered Sep 21 '22 00:09

hotpaw2