but the IMEI suggestion didnt give me any solution
i have a tablet (Samsung T800 (Galaxy Tab S 10.5") 2x) which gives me a “null” IMEI
while my Huawei Phone P Smart 2019 (6.21", 3x) gives me a “” (nothing) IMEI
(unless I do something wrong)
Before any guys of you start posting answers like
DPI, pixels, percentages etc etc (which are all wrong) I ll tell you this
the need to check the screen size of a tablet or a phone is indifferent to the dpi or the pixels or the percentages, and i explain
I have a Screen with 200 buttons
in a Tablet it will show the 200 buttons fine
in a phone it will be a mess
even i manage to fit them all in the screen, they will be too tiny to be clickable.
i dont want a solution to make them smaller
i dont want a solution of a scrollable screen
i dont want a solution of hiding some and showing some
and i dont want to be told “use less buttons” or “why you need all these buttons ?”
because i m mad and obsessed with hundreds of buttons and i dont care if the app doesnt even load.
So the question is simple
can i check if the user’s device is a tablet or a phone ?
or
can i check how many inches is the device of the user ?
Mobile apps are there to solve user task or help them in performing any particular task in more better and easy way. And your above quoted sentence says exactly opposite of this.
I agree with @Vaibhav that the ui should be easy to use but if you still want to make such an app see here how to check if your app is running on tablet or phone mode by checking the screen width
@Vaibhav@dora_paz
a) Applications (mobile or not) are there to serve a purpose. It can be a wow app which will make millions, It can be a free app which will help millions or it can be the most useless app ever (as thousands of software pieces) which was made just to be made.
Have you seen what application are around ? you cant say “stop making apps because its not the best way”
b) You do exactly what I predicted. You dont read the problem. The problem is “I want an app which can tell if it runs on a phone or a tablet” and your reply is “dont make such an app”.
Solutions could be something like that:
-Check the device name - Go to a Database - Find the Device and return the size
or
This is the ppi (pixels per inch)* multiply here, divide there, return the size
or
You ask the user “Am i running on a phone or a tablet ?”
or
you open a notification “Hey dude, you better run this part of the app in a Tablet”
Understand ?
Focus on the problem and the solution. Not how to bypass the problem.
I have not said anytime, anywhere that you should not develop apps
Actually this is the problem with you not me. Read again my previous reply. I was just trying to know the purpose behind the lines where you said that you don’t really care if your app doesn’t loads in the devices of users as this may not solve your problem
Even, no such thing exist. I don’t think you know what you are speaking. It’s a kind request to ask your questions politely. You should have asked that you just to need to know if the user’s device is a tablet or a phone, without being unnecessarily rude.
I can only pray that may the God Almighty bless you some peace of mind.
You dont need to know the purpose because its indifferent to the problem
The problem is: “i m trying to find a new way to cook a chicken”
Your reply is: “cook fish”
Irrelevant !
I dont want to cook fish and you dont need to know the purpose of why i want to cook chicken.
I want to cook chicken. End of story.
Obviously i m not trying to fit 1.876.543 buttons in one screen. OBVIOUSLY.
And obviously i care a lot if my my app loads or not. OBVIOUSLY.
It was an exaggeration of course to indicate that I want to find a solution to a specific problem. No workarounds, no bypasses, no “why you need that ?”
It is a problem that a possible solution would help a lot every single developer.
Just have a look at Google Play
“this app for Tablets”
“this app for Phones”
IF we (anyone) manage to find a solution to determine IF the target device is a tablet or a phone or a watch (why not ?) then it could simply mean that you wouldnt have to design 3 different apps to do the same thing but ONLY ONE !
To make you understand it in a different way, this is something we did ages ago when we programmed DOS applications and we checked “is the card EGA ? is the card CGA ? is the card Hercules ?” (yes i m old… lol) to use different quantities of info, different graphics and different colors.
Last but not least
I m not rude, i m straightforward.
I m not rude, i might have a bizarre way to explain things, yes.
In any case if you felt offended by my comments, i apologize to you.
And since we both believe in God, lets pray to find a solution