How to check if my app is running on a tablet? How will my app look like on a tablet?
Yes but that is just a preview. Actual app may look different on a tablet because of screen sizes.
that’s on you, how you set your design, mostly use fill parent, dialogues and for buttons and other things use px that will show axact button or layout size as u set
welcome , use kodular given tablets for view, its may near to other tabs, so there is only 1 percent chances left that app looks different from your design
but if you want to customize the content according to tabs and mobiles differently you may get the
Screen.height to conclude the screen size using
if-else but make sure you use it only when necessary
Install Genymotion or any other Android emulator (Bluestacks is good too) on your computer, then select the device you want to try your app on and install your app by dragging and dropping the apk file in it.
If you check the IMEI number you can check if it is a tablet or not. All phones have an IMEI number and some tablets. So if there is none you can almost conclude that you are running on a tablet. It is not 100% proof.
Nice idea…But will it ask permission to get IMEI ?
I don’t know. I guess not. You could test that.
The companion is asking permission so i guess it will ask in apk to.
Some tablets (like the iPad with 3G) have IMEI numbers. I think any device that has a phone number has an associated IMEI, and some tablets do come with SIM options.
I know. But it would/could be the closest in finding the difference of most phones and tablets. Most of them don’t have that feature yet i think. I shall edit my post.
As far as I know, OEMs have dropped SIM support for tablets. If you find a tablet with call functionality, chances are it’s quite old.
Alternatively, you can use a hidden web viewer and run some JS to fetch the
window.navigator.platform, which returns the device the web view is running on.
there was an extension, which is able to detect it… but I forgot, which one… probably one of the tools extensions, not mine…
the extensions directory is here App Inventor Extensions | Pura Vida Apps
I don’t want user use my app on tablet just because I think the layout and components would not fit into the screen of the tablet properly because the app is designed for phones not tablets. But I’m not sure about it.
Yes I have also seen it but I can’t find it now.
If you’re distributing your app on the Play Store, you can disable certain devices from downloading it. I think they have an option to disallow tablets from downloading your app. If enabled, your Play Store listing will show “designed for phones”
Yes I am going to upload on Play Store. I’ll check it… thanks!