device

Android Studio Logcat Filter does not show up

喜你入骨 提交于 2019-11-30 23:07:15
I'm using AndroidStudio 0.4.0 (encountered same problem on 0.3.2) on Ubuntu 13.10. Everything was ok till I lose the logcat Filtering utility and device choosing side bar in 'Android' and 'ddms ddms' views. However the program recognize connected device/emulator and runs the app normally on it, it even shows all logs roughly, but I no longer can select device or filter the logs . How can I recover them? Thanks! There is a way to make it appear. Just click the "Event log" label in the bottom-right of AS. But it may will miss again in some case... I guess whether it's a bug of AS. Same question,

getDeviceList() always empty

老子叫甜甜 提交于 2019-11-30 22:42:29
I'm trying to use an Arduino Board along with my Odys Neo x8 tablet but it seems, that the UsbManager doesn't recognize the device alright. I connected the arduino to the tablet via an OTG-adapter so that the tablet will work in host mode, the Arduino is successfully receiving power from the device. I'm fetching the list of available USB-devices on the tablet as follows: sUsbController = new UsbController(this, mConnectionHandler, 0, 0); HashMap<String, UsbDevice> devlist = sUsbController.mUsbManager.getDeviceList(); TextView t = ((TextView)findViewById(R.id.textView)); t.setText("Found " +

Unable to connect to bluetooth Health Device Fora using Android BluetoothProfile

你说的曾经没有我的故事 提交于 2019-11-30 22:08:21
I want to connect to Fora thermometer via Android BluetoothPRofile and get the reading. Following is my approoach :- In OnCreate() i have written this piece of code :- if (!mBluetoothAdapter.getProfileProxy(this, mBluetoothServiceListener, BluetoothProfile.HEALTH)) { Toast.makeText(this, "No Health Profile Supported", Toast.LENGTH_LONG); return; } This triggers the mBluetoothServiceListener callback which is mentioned below :- @SuppressLint("NewApi") private final BluetoothProfile.ServiceListener mBluetoothServiceListener = new BluetoothProfile.ServiceListener() { public void

Detecting mobile or tablet device

混江龙づ霸主 提交于 2019-11-30 22:04:31
The aim for me is to have a mobile website (for mobiles and tablets) and a responsive desktop website, built on Wordpress. I want the easiest way to implement fool proof device detection. The mobile website is going to have a lot of features that are only really going to benefit touch devices and will be custom designed for mobiles and tablets. The desktop site will be completely different (with same pages but with additional content) and will be fully responsive just in case any devices slip through the detection. I have this one liner that will detect touch devices and redirect to another

how to know is it iphone or ipad?

只愿长相守 提交于 2019-11-30 21:57:21
i want to know the user uses the iphone or ipad,if the user uses the iphone i want to open the camera,if he uses the ipad or runs in simulator i want to open the library. how it is possible? how to find the details of devices? how to know current using device by user through xcode? You should not determine whether there is a camera by looking at the model. This is not future proof - for instance, you would not be supporting the iPad 2's camera. UIImagePickerController has a special method to determine whether a camera in available: + (BOOL)isSourceTypeAvailable:

What is the path of photos album on iPhone device?

社会主义新天地 提交于 2019-11-30 21:38:49
问题 I was trying to save a PNG file to photos albums folder on the iPhone device with a .png extension so that the transparency remains.. My question is: What is the path of photos album UIImageWriteToSavedPhotosAlbum function is using? I am using data write to file method.. Thanks 回答1: You can't access assets on the file system directly (assuming this isn't a jailbreak question). In addition to UIImageWriteToSavedPhotosAlbum, the Assets Library Framework provides access to the photo library if

Win32 determining when keyboard is connected/disconnected

最后都变了- 提交于 2019-11-30 21:06:59
I am trying to determine when my keyboard is connected or disconnected. I have tried the following strategies: RegisterDeviceNotification Using RegisterDeviceNotifaction as explained on MSDN was suggested in how to determine keyboard disconnected in DirectInput . When I tried this I get DB_DEVNODES_CHANGED event in the window callback which provides no other information (just some unknown device has changed connection state). I tried various GUIDs for the registration: 4D36E96B-E325-11CE-BFC1-08002BE10318 (several websites said this is the class guid for keyboards) and the guidInstance

My SetupDiEnumDeviceInterfaces is not working

匆匆过客 提交于 2019-11-30 20:32:33
Can someone see if I am doing this right please: //DeviceManager.h #include <windows.h> //#include <hidsdi.h> #include <setupapi.h> #include <iostream> #include <cfgmgr32.h> #include <tchar.h> #include <devpkey.h> extern "C"{ #include <hidsdi.h> } //#pragma comment (lib, "setupapi.lib") class DeviceManager { public: DeviceManager(); ~DeviceManager(); void ListAllDevices(); void GetDevice(std::string vid, std::string pid); HANDLE PSMove; byte reportBuffer; private: HDEVINFO deviceInfoSet; //A list of all the devices SP_DEVINFO_DATA deviceInfoData; //A device from deviceInfoSet SP_DEVICE

CUDA device to host copy very slow

独自空忆成欢 提交于 2019-11-30 18:59:30
问题 I'm running windows 7 64 bits, cuda 4.2, visual studio 2010. First, I run some code on cuda, then download the data back to host. Then do some processing and move back to the device. Then I did the following copy from device to host, it runs very fast, like 1ms. clock_t start, end; count=1000000; thrust::host_vector <int> h_a(count); thrust::device_vector <int> d_b(count,0); int *d_bPtr = thrust::raw_pointer_cast(&d_b[0]); start=clock(); thrust::copy(d_b.begin(), d_b.end(), h_a.begin()); end

Android Studio Logcat Filter does not show up

六眼飞鱼酱① 提交于 2019-11-30 18:41:28
问题 I'm using AndroidStudio 0.4.0 (encountered same problem on 0.3.2) on Ubuntu 13.10. Everything was ok till I lose the logcat Filtering utility and device choosing side bar in 'Android' and 'ddms ddms' views. However the program recognize connected device/emulator and runs the app normally on it, it even shows all logs roughly, but I no longer can select device or filter the logs . How can I recover them? Thanks! 回答1: There is a way to make it appear. Just click the "Event log" label in the