Does anyone have any examples or advice on how to run the Hexagon C/C++ code from an android application? I'd like to pass data from an android application to the C/C++ hexagon application to run on the DSP, I know I can run the application from the android code but can I pass it my data's memory without writing to a file for it to read? writing to hard drive would take too long for the processing I'm doing and I can only get the data in Java as I did not write the Driver that is outputting it.
Any help would be greatly appreciated,
Harry.
Yes, you can call over and run code on the hexagon dsp from android. We don't have any full examples from java to hexagon but here is what you need:
- define the native interface between android native (c/c++) and the dsp
- implement that interface on the dsp
The calculator example will show you how to the do the following and also how to call it from android native application (shell)
Then you need to connect your java app to this native interface.
- write a jni binding to a native c interface
- your android application will call the jni java interface
There is information online about how to write the java to native jni interface.