How to add i2c function through android sensor

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to add i2c function through android sensor

1,591件の閲覧回数
weishangHsu
Contributor I

Hi!, I using imx515 and 535 processor now, i need to use I2C function. I write a jni libray and it works on android activity. But when i load this .so file and use the function inside the libray in a service. The service always crash and  get "UnsatisfiedLinkError: myi2c" error message. I contact the FAE, he said he doesn't familiar with JNI and suggest me to use android sensor to simulate I2C interface. Is there anybody meet this problem or know how to solve the problem? thank you!

0 件の賞賛
返信
3 返答(返信)

1,336件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee

great ;)

 

thaks for sharing!

0 件の賞賛
返信

1,336件の閲覧回数
weishangHsu
Contributor I

hello Daiane:

        thanks for your reply, the problem is solved. I make a stupid error, i should write the correct jni function define in the .c file:
        jstring Java_+ mypacketname..._+ activity class name+ _( JNIEnv* env, jobject thiz ...)
       {  .....}

        change to

        jstring Java_+ mypacketname..._+ service class name+ _( JNIEnv* env, jobject thiz ...)
       {  .....}
Daiane Angolini said:

 

Do you want to include some other sensor support?

 

or

 

Do you want to create something like i2ctools within an application?

0 件の賞賛
返信

1,336件の閲覧回数
daiane_angolini
NXP Employee
NXP Employee

Do you want to include some other sensor support?

 

or

 

Do you want to create something like i2ctools within an application?

0 件の賞賛
返信