I want to get the screen size in pixels for the current android phone
in JNI
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.
On 12/15/2010 2:59 AM, Shrenik Vikam wrote:
> I want to get the screen size in pixels for the current android phone
> in JNI
Unless you're targeting 2.3, the general answer to "how to I do X in
JNI," where "X" involves something to do with Android capabilities as
opposed to how to get C or C++ building or linking, is to "do X in Java
and pass it to your JNI code". There are a few exceptions, and they're
outlined in the JNI docs; the most common reason you can't find
something in the JNI docs (or the headers) is that it's not available in
JNI.
How to do something in Java is the subject of the android-developers
list. I get my surface size by overriding
GLSurfaceView.surfaceChanged(), though the docs tell me I shouldn't
normally subclass that function, so what do I know? :)
Tim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJNCPriAAoJENSbqLBCyKKsBKsIALcwy/0g88SuItFv/qAkTrde
yzHBhVxd6skdO7oLPe98uTJUa+kk4EupGCqWxHyISWk6elDxoxeHIa0WgSqefFqf
bIpT9deZknlIWbx5awENs4v+NlmSfcfVaHjtm4RRvUVy7bpEmoaR2H/YfgI+pHS4
TB+GpWG91CeAfNEwl10PES6TpzEw1kR6IcUzVjbm8Ix+HSFV+j0Q3MNyyORSEH3U
1F84OJJwug+6TwPsU/dQX7EZpdm9M5Vqff+q5DvjIFXq6gHQBI3/OiAekX83MQOB
aQi+Y0dHoY24+dlNdI5tkBNl6OMME6n23GCShmhgKWXXkyzThidbr3TSxLoJq40=
=YyXX
-----END PGP SIGNATURE-----
How to do something in Java is the subject of the android-developers
list. I get my surface size by overriding
GLSurfaceView.surfaceChanged(), though the docs tell me I shouldn't
normally subclass that function, so what do I know? :)