sdphil wrote:
> I see this sample -- 
> http://android-developers.blogspot.com/2009_04_01_archive.html
> but it is doing it for a method, as opposed to a static final constant
> like i want.

Correct. You need to find another sample. This is standard Java -- I'm
sure there's some reflection example out on the Internet that would
demonstrate how to get at a public static Field on a class.

> also, could I just put a try/catch around it and return "unknown" if
> an exception was thrown?

Your existing code? Probably not. Most likely, you are not blowing up
when you execute that statement -- you are blowing up when the class is
being loaded, because it tries to resolve that field and fails.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Development Wiki: http://wiki.andmob.org

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

Reply via email to