device

How to run logcat on multiple devices?

余生长醉 提交于 2019-11-29 22:11:35
How can I run logcat on multiple devices at the same time? "adb logcat" command gives an error: error: more than one device and emulator levis501 Use the -s option of adb : adb -s <serialnumber> Example C:\Users\lel>adb devices List of devices attached 192.168.198.101:5555 device 0123456789ABCDEF device adb -s 0123456789ABCDEF logcat adb -s 192.168.198.101:5555 logcat You can combine grep whit this, to get all lines that contain it. an example is with System.out Example: adb -s 192.168.198.101:5555 logcat | grep "System.out" I thought it might be useful. I have this script that helps me a lot.

Bash Pipe Handling

﹥>﹥吖頭↗ 提交于 2019-11-29 20:57:44
Does anyone know how bash handles sending data through pipes? cat file.txt | tail -20 Does this command print all the contents of file.txt into a buffer, which is then read by tail? Or does this command, say, print the contents of file.txt line by line, and then pause at each line for tail to process, and then ask for more data? The reason I ask is that I'm writing a program on an embedded device that basically performs a sequence of operations on some chunk of data, where the output of one operation is send off as the input of the next operation. I would like to know how linux (bash) handles

How to get the device locale after changing the application locale

牧云@^-^@ 提交于 2019-11-29 18:46:55
问题 I am changing the application locale based on user choice. Independent of device locale. using public void setDefaultLocale(Context context, String locale) { Locale appLoc = new Locale(locale); Locale.setDefault(appLoc); Configuration appConfig = new Configuration(); appConfig.locale = appLoc; context.getResources().updateConfiguration(appConfig, context.getResources().getDisplayMetrics()); } But I want to know what will be the device locale also. When I am trying to get this I always getting

google oauth error invalid_client no support email

自闭症网瘾萝莉.ら 提交于 2019-11-29 16:35:10
问题 I try to implement google oauth, following the Google OAuth2ForDevices. My App is registered on Google Cloud Console, as native App. When I try to follow the OAuth2ForDevices using Google Chromes - Advanced Rest Client Application, I get the json response with the user_code and verfication_url. Opening the verfication_url and enterering the user_code, leads to the follwoing Error: invalid_client: no support email Error 400 I tried this with 2 registred Apps on Google Cloud Console. Both

Change default names for USB virtual serial ports in Linux

旧街凉风 提交于 2019-11-29 16:19:42
I am developing an embedded solution using C and I am working with two USB sensors. If I connect each sensor alone they take this names: Device 1 (I do not know why it takes 6 names...) /dev/ttyACM0 /dev/ttyACM1 /dev/ttyACM2 /dev/ttyACM3 /dev/ttyACM4 /dev/ttyACM5 /dev/ttyACM6 Device 2 /dev/ttyACM0 So when I start as an embedded system and both sensors are connected, the fastest one takes /dev/ACM0 but it not always the same. So, when I try to read device 2 I could be reading device 1... I think that It would be great to change the default names of the sensors. I guess that it is going to be

App Store: Problem with UIRequiredDeviceCapabilities

我与影子孤独终老i 提交于 2019-11-29 15:51:07
问题 I've uploaded my first App to App Store, but I did NOT put on the UIRequiredDeviceCapabilities that my App requires location-services and wifi. RESULT: the app does not start looking for the coordinates as it should do. (When I've installed the App through XCode in my iPhone 4 it works perfectly). So, I've tryed to upload a new version with this UIRequiredDeviceCapabilities correctly set, and I got following error message after trying to Upload the new version: "The Bundle is invalid. The key

Universal application

落爺英雄遲暮 提交于 2019-11-29 15:47:25
问题 How to make universal app for iphone and ipad. How we detect the device whether it is for iPhone or iPad? 回答1: in Xcode 3 select your target in Xcode, right-click and use the “Upgrade Current Target for iPad…” command. in Xcode 4 click on the project and go to the target. In Summary tab, change Device to Universal. I used UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad for detecting iPad. 回答2: The easiest way would be using UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad and UI_USER

Find type of bluetooth device whether mobile or laptop's or mac pc's

南楼画角 提交于 2019-11-29 15:13:45
I am developing an android game application played using bluetooth. While searching for bluetooth device, results contain both mobile devices as well as mac pc/laptops. I would like to list only the mobile devices in my result list. Is it possible to find whether the device detected is mobile device or not? When you have BluetoothDevice you can call getBluetoothClass . Smart phones are expected to have PHONE_SMART value, while computers should have COMPUTER_* values (for example COMPUTER_DESKTOP or COMPUTER_LAPTOP ). 来源: https://stackoverflow.com/questions/5989847/find-type-of-bluetooth-device

How to get device properties in windows in c++?

偶尔善良 提交于 2019-11-29 11:32:23
In Windows, if I open Device Manager-> right click on the device -> Properties -> Details, I get {Property, Value} pairs. I want to access them in my C++ code in Visual Studio. How do I get it? Thanks, Try SetupDi_ functions,look here for example. HDEVINFO WinDeviceHelper::getDevInfoForClass(QString devClassName,DWORD& dwCount) { //DWORD dwGuids = 0; SetupDiClassGuidsFromNameW( qPrintableW(devClassName), 0, 0, &dwCount ); //emit sSearchStarted(dwGuids); if(dwCount) { GUID* pGuids = new GUID[dwCount]; BOOL success = SetupDiClassGuidsFromNameW( qPrintableW(devClassName), pGuids, dwCount,

Get the full audio device name from Windows

孤人 提交于 2019-11-29 10:56:30
Is there a way to get the full audio device name in Windows XP and later? I can use MIXERCAPS but the szPname member will limit to 32 characters (including NULL). For an audio device name of "Microphone (High Definition Audio Device)", I only get back "Microphone (High Definition Aud". This is due to MAXPNAMELEN being defined to 32. I have tried redefining it to a larger number to no effect. Here is the code I am using: MIXERCAPS mc; ZeroMemory( &mc, sizeof(MIXERCAPS) ); mm = mixerGetDevCaps( reinterpret_cast<UINT_PTR>(m_hMixer), &mc, sizeof(MIXERCAPS) ); I saw this question , but it