android-emulator

Why the MonkeyRunner.waitForConnection() doesn't work in my environment?

[亡魂溺海] 提交于 2019-12-07 11:56:53
问题 Script: from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice device = MonkeyRunner.waitForConnection(5,'192.168.6.60:5555') device.installPackage('Douban_Radio.apk') Before it runs: ~/android-sdk-linux_86/tools$adb connect 192.168.6.60:5555 connected to 192.168.6.60:5555 ~/android-sdk-linux_86/tools$adb devices List of devices attached 192.168.6.60:5555 device The output of monkeyrunner: ~/android-sdk-linux_86/tools$./monkeyrunner monkeyrunnerTest.py 110412 18:12:35.017:S [main]

Visual Studio Emulator for Android is not updated

五迷三道 提交于 2019-12-07 11:52:33
问题 I used Visual Studio 2015 with service pack 1. In device profile available only API 19. I see a warning: Unable to establish a connect to the internet. Only device profile for acquired platforms are shown. How do I fix this error? 回答1: Can you access to http://www.msftncsi.com/ncsi.txt from that machine? May be a proxy/firewall issue. 来源: https://stackoverflow.com/questions/34402831/visual-studio-emulator-for-android-is-not-updated

MediaPlayer seekTo inconsistently plays songs from beginning

爷,独闯天下 提交于 2019-12-07 11:41:15
问题 I'm using Android's MediaPlayer class to start playing a song from some offset. After specifying this offset in code, I play the song expecting to hear it from that offset position but rather I hear it play from the beginning. Please note the following code: MediaPlayer mplayer = new MediaPlayer(); mplayer.reset(); try { // For example's sake, specify some known song path mplayer.setDataSource("//media/external/audio/media/1"); // call blocking prepare() mplayer.prepare(); } catch (Exception

how to get root access on android 2.3 emulator

跟風遠走 提交于 2019-12-07 11:00:46
问题 i am trying to get root access on my android emulator to run iptables. i went through many forums and tried many methods but nothing seems to work. the following is my device specification and i try everything on emulator. version - 2.3 kernel version - 2.6.29-00261-g0097074-dirtydigit@digit #20 build number - sdk-eng 2.3 GRH55 79397 test-keys so how to become root in the android. please help. 回答1: On the emulator provided with the SDK r10, you can get a root shell executing "adb shell" from

Change R class package android/eclipse

你离开我真会死。 提交于 2019-12-07 10:18:34
问题 Im working on a little interface in android and when I run it the "xxx application has stopped unexpectedly" appears. Im looking for posible errors but I don't find anything. Anyway I would like to change the R class package name, when I refactor->rename it eclipse generates another one in the old package,even if I delete that package eclipse generates it again, I can't get rid of it! 回答1: To change the package name of the generated R class, change the package property of the <manifest> tag

4.1 android emulator not detecting sd card

佐手、 提交于 2019-12-07 09:53:39
问题 I used to use a 4.1 kitkat x86 android emulator with an sd card for testing. After upgrading Android Studio to 2.3, i'm no longer able to access the supplied sdcard in android making testing impossible for me. Google hasn't had answers for this and i also fail to see any clues in the emulator or adb logs. The avd has been recreated new, (i deleted the old avd folder to prevent goop from fouling things up). It simply doesn't work anymore. Here's the output when starting the emulator on Kubuntu

how to emulate a real external sd (update: removable storage) card in Android Emulator

久未见 提交于 2019-12-07 09:36:49
问题 I try to emulate a external sdcard as it would be in a real device. In a real device the external sdcard is not writeable except you use the new "Storage Access Framework" (API 21 & 22) When I add an sdcard either with a file or Size ... I always get a writeable sdcard, which is not true with a real device (I guess). I could create the Folder "CreateFolder" with just ( I know, I should not use the direct access, but this is only for a test to see if I have write access): String spathWriteTest

How to start an Android virtual device without seeing emulator.exe window

好久不见. 提交于 2019-12-07 09:03:20
问题 I want to create a shortcut to start a particular AVD with specific parameters. If I create a batch file with start emulator.exe -avd myavd the emulator.exe command window shows and remains after the device is started. Closing the emulator.exe window closes the device. How can I start a device without seeing this window like the AVD Manager or Eclipse does? 回答1: Create this java substituting the details for the avd you want: import java.io.IOException; import java.util.ArrayList; import java

Difficulty in passing text as parameter from android to jsp page

可紊 提交于 2019-12-07 08:37:20
I am trying to pass a text from the spinner. Actually the spinner contains the textx which I have fetched from the server side of my application. So what I am trying to do is that, as soon as I select text from the spinner, I want that string to be passed to the server side. So here i am passing the text to a function which can make a request to the JSP. Main part of the code(android) categ = ((TextView) selectedItemView).getText().toString(); postData(categ); //Remaining section public void postData(categ) { String page="processing_pages/individual_phone_communicator.jsp?rom="+categ; result =

How to exit from Screen Pinning - Android 5 (Emulator)

混江龙づ霸主 提交于 2019-12-07 08:37:19
问题 Screen Pinning (as mentioned on this page) is a new feature introduced in Android 5 (Lollipop) which lets its users to temporarily lock only one Activity to the screen. All other notifications are hidden when screen pinning is activated. Following steps can be taken to activate Screen Pinning Users can enable screen pinning in Settings > Security > Screen Pinning, and select the tasks they want to pin by touching the green pin icon in the recents screen. And to exit from Screen Pinning user