Accessing native library code from rho elements application

Hello All,

 

I have one issue and one question while working with native extension + native library(.jar) file

Issue#1

We added native (.jar) library and able to compile rho elements application.

While we are creating new object from library we are getting following runtime exception :

java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()

 

Can anyone faced this problem? If so, how did you approached to solve?

 

Qustion#1

How to get native android UI reference in native extension. Do we need to use “com.rhomobile.rhodes.RhodesActivity” or something else?

I have situation that need to display alert during application sleep/wake from native extension.