What do you consider a smartphone, and what a tablet?
1 person found this helpful
PhoneGap Build has a target-device preference, which may be of use. On Android, I think you select your target-device when you upload to the app store. But a possibly better solution is to use responsive design to target all devices.
Thnx for replies.
To answer VectorP: Basically, I consider a smartphone a device on which you can make a call, so a phone, on tablets you can't make a phone call.
In more detail: for iOS I guess all iPhones are smartphones and all iPads are tablets. For android let's say anything above 800x510 CSS pixels is a tablet, and anything below is a smartphone. For windows, I actually don't need help. For windows, I am building only for phones.... But for future, if we build for other windows devices I'd still like to know how can you distinguish between win smartphone and other devices.
target-device for iOS can be handset, tablet or universal. Tablet is a tablet, universal is probably everything and handset is a smartphone?
Also, I'm not sure you select device for android when you upload to the app store... will have to check this out.
I agree with @ryanskihead here -- don't make the distinction. Your UI should be responsive on any form factor (consider especially that if you allow multitasking on an iPad, your viewport can vary quite a bit, including getting into iphone-sized viewports -- same can be true on Android tablets that permit multitasking). Also, basing things on Android's screen resolution is asking for trouble, since that's often a moving target (and can vary widely by manufacturer).
Why, specifically, do you need to limit your app to a specific class of devices?
Some clients might want us to make apps only for smartphones or tablets. In this case, we don't have to make templates/adjust for one or the other devices.
Btw. for android we are going by this guidelines: Distributing to Specific Screens | Android Developers
I also want the same answers, is any special code need to add for smart phone and tablet?its possible to lock orientations?
I'll just link to stackoverflow where I asked the same question where I more or less got the answer I needed. Only you don't need to modify the manifest directly, for that look at the link I posted in comments.
And for the orientation, you can use preference: orientation (landscape or portrait) look at the documentation of the phonegap build.