android-emulator

Vintage Thermometer component + SensorSimulator on the Android emulator

纵饮孤独 提交于 2019-12-18 05:22:25
问题 After I found this nice custom component that analogly (is this the right word?) displays the temperature read from the Android device's temperature sensor, I wanted to test it with the emulator to see how it works so I've found this Sensor Simulator and altered the component's source to work with it. I did manage it to work on en emulated device, however I've done a few lucky guesses and'd like to know what exactly I've done :-) Here are the changes in thermometer's code I had to make to get

Set IP Address for Android Emulator

久未见 提交于 2019-12-18 05:21:22
问题 I have a scenario where I need to start Android Emulator with a specific IP Address? Can I start the emulator like that? I do not want to do IP forwarding or other stuff, because there is an Android program running in the Emulator which on boot will configure itself with Android Emulators IP address present during boot time. As by default the ip address of emulator is 10.0.2.15 which I need to change. Also, this Ip is set in init.goldfish.rc and init.goldfish.sh. If I change them, still the

android studio emulator crashing after 3.0 update

倾然丶 夕夏残阳落幕 提交于 2019-12-18 05:10:36
问题 I have been messing around with android studio and I ended up installing cocos2dx and using an arm cpu emulator to work with cocos2dx. I have recently seen a message prompting for an update for the android emulator service so I installed it and now my emulator crashes while trying to boot and gives this error in the logcat - this is the error it gave me 19:36 Emulator: ** 19:36 Emulator: ERROR:/buildbot/src/android/emu-3.0-release/external/qemu/fpu/softfloat.c:486:round_canonical: code should

get the path of a Gallery Folder in Android

帅比萌擦擦* 提交于 2019-12-18 04:54:11
问题 I know how to programatically get a gallery image (one by one). Now that the gallery is organised folderwise Is there a way to select and get the path of a folder in the gallery view... 回答1: You can get path here but MediaScanner will find every folder on SDCARD with photos. final String path = android.os.Environment.DIRECTORY_DCIM; 回答2: With this method you can get the path of the Gallery of your device: private static String getGalleryPath() { return photoDir = Environment

MediaPlayer no longer working on the emulator since r10?

﹥>﹥吖頭↗ 提交于 2019-12-18 04:40:43
问题 protected MediaPlayer _mediaPlayer; protected void playFromResource(int resId) { if (_mediaPlayer != null) { _mediaPlayer.stop(); _mediaPlayer.release(); } _mediaPlayer = MediaPlayer.create(this, resId); _mediaPlayer.start(); } This code used to work fine on both the emulator and on devices. Since some time (I think it is since I updated to ADT r10) it only works on devices. On the emulator there is no sound anymore and the application freezes when it pass on _mediaPlayer.release() (the

Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'

半世苍凉 提交于 2019-12-18 04:26:11
问题 I am running Android Studio on Windows 10 64 bit. I upgraded to the latest build and SDK the morning of 5/20, and since then I get the above error when opening Android Studio. I also get the 'Unable to obtain result of 'adb version' in the event log. If I launch the application (which worked fine before the update) the 'Select Deployment Target' window appears, showing 'Initializing ADB' with a loading graphic for a few seconds, which then results in a 'Nothing to show' message. Previously I

Getting Udid in android

大憨熊 提交于 2019-12-18 03:45:29
问题 I am developing an android application in which I want to get UDID of android emulator. How can i do it? Thanks in advance, Tushar 回答1: I'm not sure if this is what you're after but you could use: Settings.Secure.ANDROID_ID public class YourActivity extends Activity { //...Omitted code public String getId() { String id = android.provider.Settings.System.getString(super.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); return id; } } Note that this isn't an IMEI number, if

Getting Udid in android

梦想与她 提交于 2019-12-18 03:45:28
问题 I am developing an android application in which I want to get UDID of android emulator. How can i do it? Thanks in advance, Tushar 回答1: I'm not sure if this is what you're after but you could use: Settings.Secure.ANDROID_ID public class YourActivity extends Activity { //...Omitted code public String getId() { String id = android.provider.Settings.System.getString(super.getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); return id; } } Note that this isn't an IMEI number, if

How to know device is connected to Wifi or 3G, programatically

*爱你&永不变心* 提交于 2019-12-18 03:43:37
问题 How i can know device is connected to Wifi or 3G, programmatically Thanks 回答1: you can use WifiManager class as mentioned here Edit: by calling getConnectionInfo() function of WifiManager class you will get WifiInfo object WifiInfo has function getBSSID() which gives you connected AP's name if its null that means it is not connected to any AP via Wifi ( Wifi is not enabled ) btw while looking for more info, i found this which should answer all your questions about mobile connectivity and wifi

Error “AdbCommandRejectedException: device not found” in Eclipse using Android emulator

痞子三分冷 提交于 2019-12-18 03:05:18
问题 I've tried to change the build of an application, and now eclipse doesn't work. There is nothing in the console, and when I launch the debug, there is nothing on the log. I just got this message : [2011-03-31 11:22:58 - Logcat]device not found com.android.ddmlib.AdbCommandRejectedException: device not found at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736) at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373) at com.android.ddmlib.Device.executeShellCommand