Forums - Android applicaiton integration

2 posts / 0 new
Last post
Android applicaiton integration
harry.morris
Join Date: 26 Aug 15
Posts: 8
Posted: Mon, 2015-11-02 04:35

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.

  • Up0
  • Down0
jmay Moderator
Join Date: 11 Sep 13
Posts: 34
Posted: Tue, 2015-11-24 15:33

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.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.