android-hardware

Capturing a photo from only one lens, in dual-camera phones?

99封情书 提交于 2019-11-27 22:19:40
问题 Dual-camera smartphones are relatively new in the market, but I was wondering if a camera app could explicitly choose to use only one lens, or to manually retrieve separate input from each lens. I couldn't find any Android API documentation that is specifically designed for dual-lens phones, so I guess this is a hardware/OS-level implementation that would be difficult to override or bypass. Android's Camera HAL documentation page doesn't mention dual-lens devices as well, but it does seem to

Android Hardware Acceleration - to use or not to use?

隐身守侯 提交于 2019-11-27 05:12:42
问题 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 the discussion that I'm doing all the right things and best android practices to achieve smooth scroll (recycling views as it should, using different view types when needed, loading to memory only scaled bitmaps in the needed size, caching bitmaps,

How can I launch an android app on upon pressing the volume up or volume down button?

冷暖自知 提交于 2019-11-27 02:50:24
问题 I have a requirements in a personal safety app where a user has to launch an app as soon as possible via pressing the volume up or volume down button. What is the procedure to add this functionality? 回答1: There is no broadcast event for volume change. However, there is an undocumented action called "android.media.VOLUME_CHANGED_ACTION" which you could use, but it probably won't work on all devices/versions so it is not recommended. Using other buttons (e.g. media buttons) would be possible

Android: Get Hardware Information Programmatically

折月煮酒 提交于 2019-11-27 00:50:35
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 Manufacturer and other related specs Bluetooth related hardware information WiFi related hardware information RAM Vendor / model Display vendor and model Any help on this topic would be highly appreciated. Richa Log.i("ManuFacturer :", Build.MANUFACTURER); Log.i("Board : ", Build.BOARD); Log.i("Display : ", Build.DISPLAY); More info can be found at from

Android camera android.hardware.Camera deprecated

泄露秘密 提交于 2019-11-26 19:35:17
if android.hardware.Camera is deprecated and you cannot use the variable Camera , then what would be the alternative to this? API Documentation According to the Android developers guide for android.hardware.Camera , they state: We recommend using the new android.hardware.camera2 API for new applications. On the information page about android.hardware.camera2 , (linked above), it is stated: The android.hardware.camera2 package provides an interface to individual camera devices connected to an Android device. It replaces the deprecated Camera class. The problem When you check that documentation

Android: Get Hardware Information Programmatically

一曲冷凌霜 提交于 2019-11-26 12:24:55
问题 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 Manufacturer and other related specs Bluetooth related hardware information WiFi related hardware information RAM Vendor / model Display vendor and model Any help on this topic would be highly appreciated. 回答1: Log.i("ManuFacturer :", Build

Android Install on Device Failure [INSTALL_CANCELED_BY_USER]

时间秒杀一切 提交于 2019-11-26 09:18:58
问题 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: xiaomi-hm_note_1w-SSE6Y97PFYQCRK45 Uploading file local path: C:\\Users\\Anthony\\AndroidStudioProjects\\UASProject\\app\\build\\outputs\\apk\\app-debug.apk remote path: /data/local/tmp/com.si.UASPROJECT Installing com.si.UASPROJECT DEVICE SHELL COMMAND: pm

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

穿精又带淫゛_ 提交于 2019-11-26 06:55:29
问题 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 \'the app polls the AudioRecord object in time\', and \'the size of the buffer being filled determines the time-length of the recording before over-running unread data\'. Later it\'s suggested that a larger buffer should be used when polling less