Questions tagged [android-hardware]

Devices and platforms running the Android operating system.

android-hardware refers to all the devices and platforms that run or could run the Android operating system. That includes, but not limited to, smartphones, tablets, and computers.

217 questions
426
votes
16 answers

Get Android Phone Model programmatically , How to get Device name and model programmatically in android?

I would like to know if there is a way for reading the Phone Model programmatically in Android. I would like to get a string like HTC Dream, Milestone, Sapphire or whatever...
Andrea Baccega
  • 27,211
  • 13
  • 45
  • 46
108
votes
5 answers

Android camera android.hardware.Camera deprecated

if android.hardware.Camera is deprecated and you cannot use the variable Camera, then what would be the alternative to this?
raja121
  • 1,129
  • 2
  • 8
  • 16
67
votes
4 answers

Android AudioRecord class - process live mic audio quickly, set up callback function

I want to record audio from the mic and access it for possible playback in near real-time. I am unsure of how to use the Android AudioRecord class to record some mic audio and quickly access it. For the AudioRecord class, the official site says…
kenj
  • 681
  • 1
  • 7
  • 4
64
votes
6 answers

Android: Get Hardware Information Programmatically

I have a requirement for obtaining the hardware related information on an Android device that runs my application. I need information of the following sort. CPU Manufacturer, model and serial number SD Card Manufacturer and serial number Camera…
Heshan Perera
  • 4,592
  • 8
  • 44
  • 57
54
votes
19 answers

Android Install on Device Failure [INSTALL_CANCELED_BY_USER]

I'm using Android Studio to connect to run app in my Xiaomi Redmi Note 3G device. My device is already found in the Choose Device Dialog, but I keep getting the [INSTALL_CANCELED_BY_USER] error : Waiting for device. Target device:…
Anthony.S
  • 545
  • 1
  • 4
  • 5
46
votes
2 answers

Android Hardware Acceleration - to use or not to use?

I'm developing an app that it functionality very similar to Facebook Android native app: social network that most of the time the user will spend in an endless ListView displaying lot's of images, entering an image gallery, and so on. let's say for…
Tal Kanel
  • 10,475
  • 10
  • 60
  • 98
28
votes
2 answers

eglMakeCurrent() failed EGL_BAD_ALLOC

I keep on getting this error report: Fatal Exception: java.lang.IllegalStateException eglMakeCurrent failed EGL_BAD_ALLOC android.view.HardwareRenderer$GlRenderer.createSurface ...on my app that is on Play Store. What causes this crash and how can…
Alex Kombo
  • 3,256
  • 8
  • 34
  • 67
23
votes
2 answers

How to get single preview frame in Camera2 API Android 5.0?

I'm trying to get a preview frame for QR code scanning functionality using Camera2 API. In old Camera API it's as easy as: android.hardware.Camera mCamera; ... mCamera.setPreviewCallback(new Camera.PreviewCallback() { @Override …
21
votes
2 answers

android unable to use hdmi in creative tab and need to be notified in all(maximum) devices as soon as hdmi is plugged

may be possible duplicate of hdmi support in android. I am working on XYZ video encrypted app.But need to manage hdmi also to overcome the encrypted video pitfall. As per my search I found that these are not in official docs and are provided by…
Arpit Garg
  • 8,476
  • 6
  • 34
  • 59
21
votes
1 answer

What is the android api for getting the list of connected audio devices?

I used the below added code to get the connected audio devices for android device. Used AudioManager api method getDevices() and got the result with connected devices like earphones, speaker, headphones. But this getDevices() method is available…
21
votes
2 answers

Camera.PreviewCallback equivalent in Camera2 API

Is there any equivalent for Camera.PreviewCallback in Camera2 from API 21,better than mapping to a SurfaceTexture and pulling a Bitmap ? I need to be able to pull preview data off of the camera as YUV?
17
votes
3 answers

Turn on hardware acceleration if available (such Android 3+) with Android APK 2.2

I developed a application for Android 3.0, and it's runs perfectly well, but the client insist on compatibility with 2.2 devices. Disabling hardware acceleration, using Android Compatibility Package, a NIO-backport support (For tasks and executors)…
15
votes
2 answers

How to simulate hardware media control buttons on an Android emulator

Android supports hardware play / pause buttons on headsets and attached devices. I am trying to find a way to test support for those devices on an emulator. The Android documentation talks about how to add support for hardware playback controls,…
Tad
  • 4,668
  • 34
  • 35
15
votes
6 answers

How to get the minimum Hardware requirements for an android application

I and some team members developed an android application which collects data on field with mobile. Now this application is going to production. So general people will use this application. We also need to write a Documentation which will explain all…
Vinit ...
  • 1,409
  • 10
  • 37
  • 66
12
votes
1 answer

Android MediaCodec encoder - weird results for Samsung device

Edit: Seems the issue is this device needs not multiple of 16 dimensions...but multiple of 32. Thing is, I still have no idea how to determine what quantifies as a problematic device. This does appear to use qcom (which I've seen to be problematic…
1
2 3
14 15