Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am prototyping a bluetooth microcontroller. I need to be able to connect and read data from the bluetooth microcontroller with a pc, mac, iphone and android. I it possible to write one app that will work on all of these platforms instead of having to write four different apps. Thanks in advance

share|improve this question

3 Answers

You're looking for something like PhoneGap. Phonegap allows you to use HTML, CSS, and Javascript to program your application and then deploy it to virtually any mobile device or desktop OS.

share|improve this answer
2  
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Glenn Nelson Jan 6 at 0:42
1  
Description of why or how PhoneGap is what he wants would be crucial to making this answer actually helpful, right now it's unconstructively small and non-descript. Answere are expected to be comprehensive and explanatory here. – Jimmy Hoffa Jan 6 at 2:32
The original question mention PC & Mac. Is PhoneGap available for these platforms? – Johan Karlsson Mar 7 at 12:28

The answer depends on the communication interfaces that your microcontroller has and how powerful it is.

The bluetooth microcontrollers that I am familiar with have barely enough power to support the bluetooth stack itself and only support serial communication with the outside world.
If your external devices need to communicate directly with such a microcontroller, you do not really have a choice other than to different apps for each platform (although a lot of the logic in the apps can be re-used. It is mostly the UI and serial interface that are platform specific).

On the other hand, if your bluetooth microcontroller is paired with a more powerful CPU in an embedded device, it should be possible to write a 'gateway' application to run on the CPU that offers an interface to the bluetooth chip that is easier to access from outside (for example, with a lightweight webserver).

share|improve this answer

Not directly.

However...

You might be able to use a cross platform suite (such a Mono) to write one piece of code that works across all platforms (because the suite has substituted the required libraries / APIs for each platform).

If this app has any sort of UI (beyond the trivial) and / or it's for use by the general public, it's generally recommended to tailor a version of the UI for each platform (so that it's not the "worst of all worlds" for all users)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.