Jump to content
  • Advertisement
Sign in to follow this  
_WeirdCat_

bluetooth in c++

This topic is 476 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Assume that i have a c++ bluetooth library and want to implement multiplayer via bluetooth, without having to use java, 

 

Is this even possible ?

Since, android is based on linux it should be. Another problem occurs with obtaining device id without proper permissions.

 

So yes or no?

Edited by WiredCat

Share this post


Link to post
Share on other sites
Advertisement

Assume that i have a c++ bluetooth library and want to implement multiplayer via bluetooth, without having to use java, 

Why assume?  There is no need for hypothetical situations here.

If you have such a library then check the documentation for the library. Done.

Otherwise, the bluetooth libraries are built in, accessible through their Java interface. If we assume you are writing Android programs in C++ you should already have the tools to work between the two languages, perhaps using SWIG to automate building JNI calls or doing it all manually yourself.  

Each of those options are well documented. Take the one that fits your situation best.

Share this post


Link to post
Share on other sites

 

 

Why assume?  There is no need for hypothetical situations here.

 

i'm not native english, and don't use it too much these days, sometimes i have problems with writing understandable sentences,

Good to know i can use bluetooth via c++, using both languages for that seems retarded.,,

Share this post


Link to post
Share on other sites

Rewording it.

Somebody needs to write the code to interface with the system.  Either you have a library that does the work, or you write your own code using JNI that does the work. 

If you have a library (which you wrote as "assume that I have a library") then you have a library that does the work. You don't need to do that work yourself. If you have a library then look at the library's instructions.

If you do not have a library then you need to do the work yourself.  It can be done although it takes some effort and time. Tools like SWIG are a little complicated to use but can do most of the work for you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!