This is not an android specific question.  You just need to learn JNI,
and specifically how to access java objects using the JNI api.  There
are lots of resources about this that have nothing to do with Android.

Doug

On Oct 10, 3:11 am, 杨辉 <yanghui1986...@gmail.com> wrote:
> for example,look at the following codes:
>
>         java code:
>
>         class A{
>                 Rect mrect;
>
>         }
>
> i pass an object of class A from the java to the native codes with jni.
> now i want to get the left/top/right/bottom value,how can i do?
>
> 2011/10/10 James <december...@gmail.com>:
>
>
>
>
>
>
>
>
>
> > what do you mean by "all the data"?
> > In android, JNI is nothing special at all. use GetFieldID to access
> > java class members.
> > Hope this helps!
>
> > On Oct 10, 4:07 pm, 杨辉 <yanghui1986...@gmail.com> wrote:
> >> hi,everybody,
> >>          i have a question about jni.
> >>          it is an android project. i want to pass all the data from java to
> >> the native code (c).
> >>          for example, if now i have an object of the class A, How can i get
> >> the left/top/right/bottom value of the Rect in the native code?
> >>          thank you !
>
> >>          java code:
>
> >>          class A{
> >>                  Rect mrect;
>
> >>          }
>
> >> --
> >> 杨辉
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> 杨辉

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to