android camera detection - android

How can I detect programmatically if a phone has a camera ?

PackageManager#hasSystemFeature(String) - pass PackageManager.FEATURE_CAMERA as the argument.

All Android compliant phones have to have a camera installed if they claim to run Android version 1.6 or higher. See http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/de//compatibility/android-1.6-cdd.pdf for the device compatiblity program.
Sadly there's no 1.5 ccd to be found anywhere. I'm however pretty sure that all currently available 1.5 devices do indeed have a camera. For tablets running 1.5 i'd not be that sure.

Related

How can I know if an app is compatible with Android GO

I need to test if my app is compatible with the Android system Oreo GO. The problem is I don't have devices to test this one, as it seems very specific (created to run in low quality machines).
Anyway, I know Google allows the developer to prohibit the use of their app in this system. Is there any way to check this up? How did you do It?
Unfortunately there is no way to check the compatibility for now. For example, no emulator with Go edition is available. What can you do is --
Simply fire up Android Studio and set up an Android Studio emulator image at API level 19, then reduce the RAM size to 512MB and lower the JVM heap size. This should suffice as a testing environment until Google supplies official images to be launched within the Android Studio emulator.

Check if Android Device is GearVR Compatible

I am looking to check and see if an android device is GearVR compatibility for cross platform integrations, is there a way to check for this?
The current way I am doing this is by checking its model because of the limited devices compatible currently with the GearVR: Note 4/5, Samsung S6/S6edge/S6edge+.
https://gist.github.com/apollow/5b1bfc3b43d0399fa23a

How to emulate a gyroscope in an Android Emulator

I am trying to work on stuff related to a gyroscope. My phone does not have a built in
gyroscope. Is there a way to include the gyroscope functionality in the emulator, at least make the emulator set in such a way that it behaves as if it had a real gyroscope?
p.s. I do not need to read any values from the gyroscope, I just want the emulator to think that it has one.
I have searched thoroughly and all I've found was this: http://code.google.com/p/openintents/wiki/SensorSimulator
But this does not make the emulator feel that it has a in built gyroscope, instead it runs an app in the emulator and fetches readings from sensors that are simulated in "SensorSimulator".
Any info would be helpful
The Android Emulator, launched with Android Studio 3.0 can simulate a range of rotation sensors that just might address your use case. We specially added a Gyroscope in the Android Emulator v26.1.0.
Gyroscope is newly supported in the Emulator of Android Studio 3.0, released to the Canary Channel on 5/17/17. Note that (as of today) Android Studio 2.3.3 is the latest official (i.e. "stable") version. Here is how you setup the Preview Version of Android Studio, which can exist concurrently with the official version.
Note that running the emulator out of the box won't work, as it's not a recent enough version:
You need to follow the 'change your update channel' steps in the latter link: select File > Other Settings > Default Settings and update from the Canary Channel:
Note that while running a Virtual Device with Android 7+ (aka API 26) did show Gyroscope output in the emulator's Virtual Sensors (within Extended Controls), it does not (at least yet) send that output to the virtual device; to actually see the environment in the sample app move as I moved the phone, I had to use Android 7.1.1 (API 25).
(Thanks to #jamal-eason for the protip!)
PREVIOUS (6/12/17):
As of the date of writing the release version of the Android Emulator (in Android Studio 2.3.3) does not offer Gyroscope support.
While the documentation referenced by #Nesski suggests this, I offer the following as proof:
The Android SDK's Virtual Reality getting started demo is the game called Treasure Hunt. Here is what it looks like when played on a phone. Notice that the camera moves as the player looks around.
Of the handful of devices compatible with the Google Daydream - because they contain an internal Gyroscope - Android Studio's AVD Manager offers only two of them: the Pixel and Pixel XL. I downloaded two virtual devices for each of those phones so that I could run the latest two Android versions (7.1.1 and 8.0) on each device:
I ran each device in the Emulator, and got similar results: press CTRL + SHIFT + C (on Windows) to bring up the Extended Controls, and you'll be able to test the phone's Virtual Sensors:
Using its Rotate controls, you'll notice that while there is Accelerometer output, Magnetometer output, and Rotation output, there is no Gryroscope output. You can rotate the phone as if you were looking around, but the game's camera view does not change as the phone is moved.
While this sad reality is unfortunate, I do, however, hope and expect Android to add Gyroscope support to the emulator in the future as more developers jump on the Google Daydream Virtual Reality bandwagon.
I don't think there is any Gyroscope support in the Emulator.
source.android.com's Sensors docs states
The gyroscope cannot be emulated based on magnetometers and
accelerometers, as this would cause it to have reduced local
consistency and responsiveness. It must be based on a usual gyroscope
chip.
I am working on something similar so I'm kind of reading up on what data to collect and what not to.

what would be the hardware req for an android phone running android 2.1?

i have made a application that will run on android 2.1. i need to make the documentation for the application. For this i need the hardware req of a phone running android 2.1
i would need things like processor speed, RAM etc.
thank you in advance.
Edit:
writing things like "device running 2.1 or higher" will not do as i am going to write that under software requirements.
As far as I know a variety of devices run Android 2.1 and there aren't hard requirements for the hardware. In any case, specifying "requires Android 2.1 or higher" should be sufficient; no one with hardware that can't run 2.1 will be running 2.1.
No; you don't need that.
You should just write
Device running Android 2.1 or higher
Once you've written that, there aren't any hardware requirements.

Android 2.2 phones without Adobe Flash support

Where can I get a definitive list of Android 2.2+ phones that don't support Flash?
I released an app that uses Flash for some features if installed on Android 2.2+ phones, but found out today from a user that the T-Mobile MyTouch 3G has 2.2 but can't get Flash. At this point I'm going in and adding a check against the Build.MODEL for the MyTouch 3G but I'd like to know if there are other phones I should check for as well.
I do not know how small is the percentage of users which are using custom Android 2.2 builds without flash on their rooted devices, but are you sure you want to exclude them from using your app?
Small percentage of a big number can still be a big number.
Here is a thread on how to check if Flash is installed.

Categories

Resources