> 1) How can I tell if my Java code is running in the Android
> environment?  I have some code that is shared by Android and non-
> Android applications and I want to be able to adjust to either
> environment dynamically.

One possibility would be to use reflection to look up a class in an
android.* namespace.

> 2) Is there a way to get access to the Command Line arguments that
> were used to launch the application my Activity (or Service, etc.) is
> running under?

AFAIK, there are no command line arguments, because there is no command
line. Even if there are, you should not use them, let alone rely upon
them, as they are undocumented and subject to change in future Android
releases.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



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

Reply via email to