I have a few lines of code in a C file, and I like to print the value of a int variable to the screen. My source file is Here and my header file is here I want to see the value in the variable 'fd'. The relevant lines from the source file are:
{
int fd;
...
fd = open("/dev/tbtcom", O_RDWR);
...
}
My understanding is that I can use logging to get this information, and if you look at the complete source file, you see I have log statements, but I do not see any of them. I really like to see the fd result on my phone where I run the app. I just can not find the procedures for passing the int value to my Android Project's main activity. I know there are corresponding JNI primitive types; but I do not know if I have to use them for this purpose. Most JNI content I have read talks about more elaborate data structures. Do I perhaps need to pass this to an object and then point to that object with (*env)?