• Advertisement
Sign in to follow this  

bluetooth in c++

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Advertisement