How to detect Android or iOS
Andre Garzia
andre at andregarzia.com
Wed Apr 11 18:02:50 EDT 2012
Hey Folks,
As someone who is about to finish some cross-platform libraries to be
released soon, I must ask. Is there any clear way to detect if I am running
on iOS or Android? What I have right now is checking the environment to see
if it is "mobile" and then I check for all the possible combinations of
iPad, iPhone, iPad Simulator and iPhone Simulator, if it is not them then I
assume it is Android.
I think we need some clearer thing that returns "iOS" or "Android".
Also, is there anyway for the library to get the bundle id for Android?
There is a way on iOS but not on Android.
Cheers
andre
--
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.
More information about the use-livecode
mailing list