device

android BluetoothDevice.getName() return null

断了今生、忘了曾经 提交于 2019-12-28 00:56:30
问题 On sometime, BluetoothDevice.getName() return null. How can i fix it? remoteDeviceName maybe null in following code. And i need distinguish my device and other devices by remoteDeviceName. BluetoothAdapter.getDefaultAdapter().startLeScan(new LeScanCallback() { @Override public void onLeScan(final BluetoothDevice device, final int rssi, byte[] scanRecord) { String remoteDeviceName = device.getName(); Log.d("Scanning", "scan device " + remoteDeviceName); }); 回答1: Finally, i found out the

Running Android Virtual Devices 2.3.3 or 4.3 versions in Mac OS 10.9 halt my system

Deadly 提交于 2019-12-25 12:42:42
问题 I've tried to run several times in Mac OS 10.9 and my system halt when I Android emulator starts. I don't know how to solve that problem. The only solution when it happens is switch off my laptop. Any ideas are welcomed. 回答1: Intel released a fix for Mavericks OS X 10.9 on 11/06/2013. https://software.intel.com/en-us/blogs/2013/11/06/intelr-haxm-hot-ffixes-for-os-x-mavericks-109-and-windows-81-available-for Intel(R) Hardware Accelerated Execution Manager (HAXM) Version 1.0.7 Hot fixes for OS

Add Devices to Provisionning Profile?

送分小仙女□ 提交于 2019-12-25 07:58:41
问题 My Devices tab on developper.apple.com is missing the Add new Device or Buld upload buttons ? Am I missing something, these buttons used to be there ? 回答1: Hope this will help you pre-release Apple Software 回答2: Select your device in Xcode and click add to portal. 来源: https://stackoverflow.com/questions/10561214/add-devices-to-provisionning-profile

My Spinner Widgets look different on different devices. How can I define a own Spinner that looks the same on all handsets?

好久不见. 提交于 2019-12-25 05:48:09
问题 I use this code to generate a spinner in my app: subCatAdapter = new ArrayAdapter<Subcategory>(this, android.R.layout.simple_spinner_item, subCategories); subCatAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); On my device (Motorola Milestone) and in the emulator this looks like the standard gray spinner widget. On of my colleagues uses a Motorola Backflip and on his device the Spinner is black. Now its very hard to read the font in the spinner. What do I have

How can I detect the up-down (Ping-pong) movement of device? [closed]

蹲街弑〆低调 提交于 2019-12-25 03:36:49
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed last year . There is a dice game in android games that when you move up and down your device like a Ping-pong racket, it throws dices in the screen. I want to detect this movement of device. How can I do that? Thanks, 回答1: package org.mabna.order.utils; public interface OnDeviceShakeListener {

Determining if a device is a touchscreen device in linux

こ雲淡風輕ζ 提交于 2019-12-25 03:13:36
问题 I am trying to determine what /dev/input/eventX device is the touchScreen. I am currently looking at the return of EVIOCGNAME to get device name. Looking at the return values of the EVIOCGBIT ioctl I don't think there is a generic way to determine what is the touchscreen. I am interested in any sort of solution to this problem. Thanks in advance for your time!!! 回答1: Take a look at: /dev/input/by-path/ /dev/input/by-id/ /sys/class/input/event?/device/ These might have enough info for your

How to run a different version of the iOS simulator on Xcode 11?

萝らか妹 提交于 2019-12-25 01:20:24
问题 I am currently working on iOS. My problem is that I set the Xcode to be updated automatically, so the Xcode was recently updated to 11. And the iOS version became 13. I need to be able to test the iPhone SE. But it doesn't seem to support the iOS 13 version. How can I test the iPhone SE? 回答1: You'll want to go to Xcode Preferences and then open Components tab. There you can download iOS simulators you need (probably iOS 12 Simulator to start with). 回答2: Xcode -> Preference -> Components ,

Midi device connection and latency

蹲街弑〆低调 提交于 2019-12-24 14:23:03
问题 I am currently programming a simple application that takes input from a midi device and outputs the corresponding sound. I have gotten everything to work now, but there is two problems: First of all, when i plug in a midi device AFTER the program has started or disconnect it while the program is running, it will not get recognized. Second of all, the latency is very high on OSX, Linux (Raspbian) and Windows alike. Does anyone know the solution to either of these issues? Here is what i have so

Play audio to two different Audiodevices simultaneously with Naudio

久未见 提交于 2019-12-24 11:55:58
问题 I'm trying to figure out how to play music to two different audiodevices at the same time. What I've done is to create a class that makes life easier for me when programming with Naudio, it has play mp3 & wav's, pause, stop etc etc. What I'd love to have is the ability to chose what playback device the audiostream should be outputted to. Is there some way I can incorporate it like this: Play to: Realtek HD audio 2nd output and Speakers (if it was plugged in) Here's the "Play" function I

android device angle to vertical axis

送分小仙女□ 提交于 2019-12-24 09:49:50
问题 I am developing an application where I would require to retrieve the angle between the device and the vertical axis (the axis pointing to the center of the Earth). So far, all the documentations and tutorials I found were not very conclusive. Could you please explain me how can I do this or provide me with a link to a clear tutorial to help me find a solution to this problem? 回答1: First, I created a SensorEventListener implementation private SensorEventListener sensorEventListener = new