1. Are you ready for the Galaxy S20? Here is everything we know so far!

Develop in C/C++

Discussion in 'Android Development' started by giulio_actia, Jul 6, 2020.

  1. giulio_actia

    giulio_actia Lurker
    Thread Starter

    Hi everyone,

    My company has to develop an API library (.so) in C / C ++ on the Android platform. The library can be incorporated into other Apps also written with different Framework (Xamarin, Flutter, Native Java / Kotlin etc.). The library will use to communicate with our external device in Bluetooth (BLE). I have not found an example to start to set up a C / C ++ project and to be able to access Bluetooth from here.
    Do you have any suggestions?
     


  2. This link does a good job of getting native code set up. You can create a hello world c++ program from template that will get a string from the c++ side through the JNI. JNI is a bit tricky at first if you don't understand it. This spec can help: https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/jniTOC.html. I find googling what I'm trying to do works better at first. Once you get a feel for the JNI it is as easy as any other programming.

    Here is the bluetooth documentation for native code: https://source.android.com/devices/bluetooth. I have no experience with that, so that is all the help I can give.

    Hope this helps you.
     
Loading...
Similar Threads - Develop C++
  1. nixiang
    Replies:
    0
    Views:
    97
  2. jpmcosta
    Replies:
    0
    Views:
    204
  3. Janisroze
    Replies:
    0
    Views:
    430
  4. NARNIA
    Replies:
    1
    Views:
    667
  5. Samsung
    Replies:
    0
    Views:
    152
  6. Musician888
    Replies:
    0
    Views:
    235
  7. username988
    Replies:
    0
    Views:
    195
  8. Samsung
    Replies:
    0
    Views:
    224
  9. ujjawal49
    Replies:
    0
    Views:
    319
  10. Ityxtoru
    Replies:
    8
    Views:
    874

Share This Page

Loading...