Page 1 of 1

Detect Phone vs. Tablet

Posted: Wed Mar 20, 2013 10:06 pm
by joel.epsteinBUS31vi
Hi -

I'm sure this is easy, but I can't track it down.

I'm developing an iOS & Android app and I want to detect whether the device using the app has the ability to make a phone call. On iOS, I could simply check "the machine" to see if it's running on an iPhone (vs. iPad), but things aren't so easy on Android.

Could someone please point me in the right direction.

Thanks so much.

Joel

Re: Detect Phone vs. Tablet

Posted: Sat Mar 23, 2013 2:33 pm
by doobox
Not sure if you can detect this before the fact.
But if you were just wanting to perform an action after your app attempted to access the dialer on a device that does not have one, you could do this :

Code: Select all

on mouseUp
   launch url "tel:44 7818 8822"
   if the result is "no association" then
      answer "this device has no dialer"
   else
      answer "this device has got a dialer"
   end if
end mouseUp

Re: Detect Phone vs. Tablet

Posted: Sat Mar 23, 2013 5:08 pm
by joel.epsteinBUS31vi
Thanks!

This works well for me.

I appreciate your help.

Joel