bluetooth in c++

Started by
2 comments, last by frob 6 years, 10 months ago

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?

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.

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.,,

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.

This topic is closed to new replies.

Advertisement