different results in different smart phones - android

I'm creating a compass application in which image of the compass should be straight at 267 degrees. The results are so accurate in my 'Q mobile noir A51' which has 4.5" screen and have android version 4.3 jelly bean. But when I'm testing it in 'Samsung Galaxy Grand' which has 5" screen and same version of android it will give different results. Then I test it in 'sony xperia L' which have 4" screen and same version of android again the result is different than Galaxy grand and Qmobile. Please tell me what will be the reason behind it? Is there a problem with the screen size or the sensors of every smart phones are different? I'm putting the images of the result below.
Galaxy Grand result is this. The result should be 267 degrees at this point and image should be straight.
Sony xperia is not available right now so i could post it's result but it's also giving the different result.
P.S: result in galaxy grand is keep on changing as the screen lock button press. When the scree open the result changes itself.

It is what you say in principle this depends on the hardware of each manufacturer, the accuracy of hw.
So many sides talk about the compass calibration software, hardware and even some mutts.
This is an example:
http://www.youtube.com/watch?v=sP3d00Hr14o

Related

Determine the right tablet browser resolution for webdesign

How can you determine the effective browser resolution (for CSS) of Samsung Galaxy Tab A 10.1 (or any other tablets)?
The specifications say that the resolution is 1920 x 1200. So I designed an application that will run on 800+ Samsung Galaxy tablets. Now I see that the resolution is wrong and I can't get the right resolution from the internet. Of course the app is responsive but I would like to make use of a testing tool in the browser.
My goal is to add this correctly to my Chrome developer console.
Specs: http://www.samsung.com/uk/tablets/galaxy-tab-a-10-1-2016-t580/SM-T580NZKABTU/
A very cheap means of finding your device's web browser resolution could be to simply determine it's viewport dimension.
While there are a ton of apps out there to get the information for you, a basic website such as http://www.mydevice.io/ can help out with this.
This website should also help give comparisons of other devices if you don't have the device yourself.
I would presume the Samsung Galaxy Tab A 10.1 should be 800 x 1280 for CSS media queries.

Android Studio Preview Differs from Actual Device

I am having a bit of difficulty with regards to getting the "Preview" of an xml layout to accurately reflect what will show on my galaxy S5. I use genymotion to run the applications (Which is accurate) but I would like to have an AVD of the an S5 so I can see the changes made in real time while I code. I have created a hardware profile using the Galaxy S5 specs (Screen size 1080x1920). The real-time preview still appears different to the Genymotion and actual S5 screen after run-time. Can anyone guess why?

How to calculate sensitivity for drawing on Android devices?

The Android SDK recommends the use of
ViewConfiguration.getScaledTouchSlop()
for detecting if the finger on the touch screen has been moved. According to Android, the ScaledTouchSlop depends on the device, and with that upon resolution and screen sensitivity.
I have written a view where the user can use Canvas for painting on the screen, and I have realized that painting works differently well on different devices. Further investigation showed that ScaledTouchSlop seems to be defined by the device manufacturer and varies a lot between manufacturers. For example
The ASUS Memo Pad 7 has a ScaledTouchSlop of 11 pixels on a 7 inch screen with approx. 1280x720.
The Samsung Galaxy Note 2 has a ScaledTouchSlop of 32 on a 5.5 inch screen with approx. 1280x720.
Both screens have about the same resolution, so when looking at the ASUS device, I would have expected ScaledTouchSlop to be around 14 on the Samsung device (11 pixels * 7 inch / 5.5 inch), but it is 32. This results in not being able to fluently draw on the Samsung, as smaller strokes are often not recognized.
Sure, I can just define my own "slop" for drawing, and if I do drawing works perfectly well, also on the Samsung device. But I guess that would cause trouble on other devices, which are smaller or have a less sensitive screen.
Is there are a way how the touch slop should be calculated for drawing or does anyone have a recipe that works well on all devices?

Change Density Using AVD Manager

I have created 3 Device Descriptions that mimic the latest models of Samsung mobile devices (S2, S3 & S4). Although I enter the diagonal screen length and pixels (w x h), I am unable to see a change in density across the 3 AVDs when I start them using the AVD Manager (screen caps below). Did I miss something or does the tool support density changes? Also, this is poorly documented.
After a quit and re-enter, things worked fine but the density value never updated, always reads 320 - probably based on my laptops screen. Also DON'T use option 'Scale display to real size". Let the emulator do the rendering and move app to device for native testing.

What hardware devices do you test your Android apps on?

The emulator that comes with ADK for use under Eclipse is fine for testing basic Android application functionality, but:
it's not very performant
it doesn't reflect real-world hardware and software configurations
it doesn't support varying input devices such as d-pads, touch screens, trackballs or even Bluetooth/USB controllers.
Android Developer posts some very helpful rolling graphs of Platform versions, Screen sizes and densities, and OpenGL ES versions as extracted from Android Market:
http://developer.android.com/resources/dashboard/platform-versions.html
http://developer.android.com/resources/dashboard/screens.html
http://developer.android.com/resources/dashboard/opengl.html
Those really help to narrow the scope of some of the choices, but I find myself really wanting to know what the proportions of input methods various devices support are... is touch represented by 90% of the market, or only 5%? What proportion of those support multi-touch?
For example... anyone who has played the free and open source game Replica Island ( http://replicaisland.net/ ) will know that how you control the game varies between devices because it supports multiple input methods. I think Chris and Genki have done a fantastic job here, but if you use touch screens you know that the game is much more playable on 5-7 inch devices than it is on 10+ inch devices. This is because the left-right slide control doesn't maintain the same physical size as the screen size increases - meaning that you have to move too far on large touch screen devices (such as Honeycomb tablets) to be comfortable.
These are the sorts of issues you only find out when you start using various hardware devices to do your testing on. Or you can wait until users do your testing for you and start bringing your app ratings down.
So after my long introduction, here are my questions to you:
What collection of hardware devices have you bought to use in your software development and have you found those choices to have been beneficial or detrimental?
Do you instead use 3rd party testing services and just tolerate the long turnaround times between test reports (hours/days instead of instant gratification)?
For me test devices are sort of like pickup trucks: I'll make friends just to get access to their phones ;-)
Seriously, I do tap friends and family as resources. I'm a small shop and can't afford to buy a lot of test devices. Yet even with this limited pool of resources I've go the following devices available and it seems to have served me well:
Original Moto DROID (seems like such a dog now).
DROID Pro (broken screen but still good for testing).
Asus eTransformer
Samsung Galaxy Tab (7")
HTC Rezound (my personal phone--it rocks)
Samsung Charge (my wife's phone)
DROID X (son-in-law)
HTC-something I can't remember right now (daughter & son)
Amazon Kindle Fire (father).
So, as you can see, without spending a fortune I've got a pretty good set of test devices, not counting all the friends I press into service as beta-testers. With all those I really haven't had many problems with platform specific issues. I hear a lot of grumbling about fragmentation (perhaps mostly from iOS developers), but if you develop your app intelligently it isn't a huge issue.
At this stage I'm just testing with two phones:
HTC Magic (3.5" touchscreen)
Samsung Galaxy S II (4.3" touchscreen)
There's a pretty big difference in the perceived density between these phones, so it's been helpful for comparison in testing my own games. The major omission at this stage is a tablet - just haven't been able to justify the cost yet.
I'm also playing around at the moment with LCDDensity for Root which allows you to change the screen resolution on-the-fly. Interesting to see what the same sized screen would look like with more pixels stuffed in (i.e. closer to Retina display)
I have own collection of devices:
tablet with 10" screen (Motorola Xoom);
Nexus S as reference smartphone;
device with hardware keyboard (Motorola Droid);
one device from HTC (HTC Desire HD). I need it because it has slightly different UI (HTC Sense) and HTC phones are quite popular in my country. It is the least useful device in the collection;
a pair of devices with non standard screen resolutions.

Categories

Resources