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
3
votes
2 answers

pm.hasSystemFeature(PackageManager.FEATURE_CAMERA_ANY) not giving corerct answer

I want to check if a device has any cameras before trying to open a qr code reader. I have the following code: public boolean checkDeviceCompatibility() { PackageManager pm = context.getPackageManager(); if…
3
votes
1 answer

Android input events handling in OS level

Can some on point how the EventHub.cpp signals the JNI in the later android versions. Before there was a KeyInputQueue.java where all input events were queued. I got the latest android sources and now the KeyInputQueue.java is gone so I am trying to…
3
votes
0 answers

Is location manager device dependent?

I encountered something weird about Android location service. After I finished my first app and tested it on different devices, it worked fine except on one device (local Indian brand - Karbonn A9+ ICS). On the start of app, a service launches which…
3
votes
1 answer

Using earphone key press event

I want to use earphone key event to make some event handling on that. I haven't tried it at all because i don't have any base for this type of event handling.
Bhupesh
  • 477
  • 1
  • 8
  • 22
3
votes
0 answers

How to convert 16 bit PCM data to voltage values in Android

I am trying to calculate the db value of sound coming from the microphone in Android. I have used Audio Record class to get 16 bit PCM data from the microphone. //init a recorder instance recorder = new…
DntFrgtDSemiCln
  • 1,259
  • 2
  • 16
  • 35
3
votes
3 answers

Android library/API for NFC reader/writers

Are there any existing libraries that will allow an Android tablet (4.0.4) without a NFC chip to interface with an external USB NFC reader/writer?
Ron
  • 1,721
  • 1
  • 19
  • 43
3
votes
0 answers

how to set system screen resolution on Android hardware?

I would like to add to a change in Android source code so Android boots in a resolution of my choice. I do not want to do this on QEMU/AVD, I would like to do this and test it on a real hardware. Can anybody point me to a place in the Android source…
3
votes
1 answer

Background Access to Microphone in Android

Is it possible to be constantly monitoring the microphone from a background application (service?) on an Android phone? Some idea of what I want to do: Listen constantly for an audible signal in the background. Upon receipt of 'interesting' audio…
Avram
  • 251
  • 3
  • 12
2
votes
1 answer

Backwards compatibility and Android Open Accessory libraries

Problem: I'm writing an Android app, and one of its features requires Open Accessory compatibility, which is only available in 3.1 and up (as well as a backport for certain versions of 2.3.4). The packages I need (android.hardware.usb or…
2
votes
1 answer

Android camera preview - 'no file - can't switch camera'

I'm trying to create a very simple app that simply shows what the camera is viewing on the screen. I created the app with an emulator(same specification as the phone I used) which shows the black and white squared background with the grey viewing…
2
votes
0 answers

Deleting android.hardware.location.gps.xml file to disable GPS

I want to remove GPS feature from phone. What if I removed the system/etc/permissions/android.hardware.location.gps.xml file, Will it remove all allow-gps permission granted to all users?
Mithun Sreedharan
  • 49,883
  • 70
  • 181
  • 236
2
votes
0 answers

Detect "Windows" key of qwerty keyboard in Android

In my current code, I am attaching the qwerty keyboard and detecting the key events in android code. Now, the issue is that, I cannot able to detect the "Windows" (some says "Search") key. Whenever I press "Windows" key at that time no log found in…
2
votes
0 answers

Software access to smartphone autofocus

Is it possible to programmatically, even using root-access, to access the infrared laser autofocus of a smartphone, for programmatically controlling autofocus - turning on, off, changing the radiation power? In which direction to look? Are there any…
2
votes
0 answers

Check if device has notch in service

I've an app with an overlay and I need to check if the device has a notch or not. Normally you use the activity and call following: activity.getWindow().getDecorView().getRootWindowInsets().getDisplayCutout() Any alternative way to check for a…
prom85
  • 16,896
  • 17
  • 122
  • 242
2
votes
1 answer

Wrong Camera Orientation with Android & Vuforia

We are developing our own Android-based hardware and we wish to use Vuforia (developed via Unity3D) for certain applications. However, we are having problems making Vuforia work well with our current camera orientation settings. On our hardware,…
user6447966