Questions tagged as 'jni'

2
answers

Using Java together with C

I'm working on a micro controller project. My source is all in C though I would like to interact with that program using Java. Is this possible? For example: The C program executes microcontroller control commands and through a graphical interfa...
asked by 15.01.2015 / 13:52
2
answers

Why does the char * argv [] statement work in the main arg, but not in the code body?

Because when I use the char *argv[] statement in int main(int argc,char *argv[]) it works, but when I try to use it inside the code body with char *argv[]; does it not work? The error below is returned at the console when...
asked by 18.07.2016 / 21:12
1
answer

Integration error "Java" and "C" through JNI

I am not able to consume functions of a "C" lib using Java with JNI. Here are my artifacts and the error generated. Class CalculadoraJNI : public class CalculadoraJNI { // Declaração do método nativo: public native int calcula...
asked by 01.11.2015 / 20:01
1
answer

How to get the Package Name of an Android application in a C library?

I'd like to know how I can get the Package Name from my Android APP via a library written in C . What I want to get is the following com/meu_app/mainframe/MainActivity or com.meu_app.mainframe.MainActivity of the class that is...
asked by 07.08.2016 / 04:36
1
answer

What's the difference between these two means of getting the PackageName?

I have these two code snippets, the two display the same result, so I would like to know what the difference is between them. 1 jclass cls = (*env)->FindClass(env, "android/content/ContextWrapper"); jmethodID mid = (*env)->GetMethodID...
asked by 15.08.2016 / 23:51
0
answers

Android - How to properly loop in an activity and pause it and summarize it

I have a project of a CHIP-8 emulator that I'm trying to port to android, the whole emulator is written in C ++ I just created a C ++ library in android studio and added it to my project, the problem is, I need to manipulate he would see activit...
asked by 19.09.2018 / 20:42
0
answers

Display array during debug with android NDK

In android, when debugging my program I can see the vector and its contents: Ihavetopassthisvectorfromandroid(java)toC++andI'musingNDK.publicnativevoidtesteVetor(double[]vetorDados);testeVetor(vetorDados);testVetorisafunctioninC++: Currentlywhe...
asked by 14.10.2017 / 21:13
0
answers

Error reading .jar; error in opening zip file

I have a Java desktop application that uses JasperReport for reporting, the application normally runs on my machine, but on my client's machine it does not perform. Below is Stack Trace when the application runs on my client machine. Does anyone...
asked by 12.11.2015 / 12:24
0
answers

Android - How to draw pixels using OpenGL ES 2.0

I have a CHIP8 emulator written in C ++, and I am making a port for android, the desktop version uses SDL and the pixels are drawn with SDL_Texture , however I do not have this feature within my reach, looking this source code I noticed...
asked by 03.01.2019 / 15:37
0
answers

C ++ Editor does not work in Android Studio

I have 2 android projects that use C ++, one of them uses 100% C ++ using NativeActivity and an emulator that uses JNI, the question is simply the android studio's C ++ editor no longer works as an example of the images below: p> Basica...
asked by 23.10.2018 / 14:07