Mobile application developers?
Page 1 of 1
Horrordee
Soderator



Posts: 8849
Location: England
PostPosted: Thu, 7th Jul 2011 12:43    Post subject: Mobile application developers?
I want to identify the mobile device using my applications (iPhone and Android).

e.g. i want to lookup some device identifier to identify that the customer is using iPhone 4, HTC Desire HD, etc.

I am aware I can get mobile OS from the user agent (for embedded web pages in an app), but I'd like to identify the specific device name.

Any thoughts?


Space for rent. Contact me for rates!
Back to top
Werelds
Special Little Man



Posts: 15098
Location: 0100111001001100
PostPosted: Thu, 7th Jul 2011 12:53    Post subject:
Well for Apple, Safari sends it out in the User agent header; apart from looking for iPhone/iPad/iPod in it, you can even detect certain iOS versions (by looking at the numbers after the platform).

As far as I know:
- Apple-iPhone without suffix is *always* the original iPhone
- 3G is Apple-iPhone-1C2
- 3GS is 2C1
- 4 is 3C1

I'm not sure about Android, but that's even more pointless as you've got several browsers to deal with there, and those browsers won't send out the same shit.

It's kind of pointless though, why do you want to do it? Please tell me it's not to automatically present some specific mobile version of a website, I hate websites that do that. Should not be done for smartphones and tablets, normal websites please!
Back to top
Page 1 of 1 All times are GMT + 1 Hour
NFOHump.com Forum Index - Programmers Corner
Signature/Avatar nuking: none (can be changed in your profile)  


Display posts from previous:   

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.8 © 2001, 2002 phpBB Group