android-emulator

Send Intent to App in Emulator

感情迁移 提交于 2019-12-03 13:10:09
Is it somehow possible to send automated intents to an app inside an emulator for testing? I have a list of all my intents and I want to test them automaticily, so is it possible to just do a adb shell <myfancycommand> android.intent.action.PACKAGE_ADDED to initiate the android.intent.action.PACKAGE_ADDED action on the device? Or do I have to write a script that calls all the stuff by its own, so for example for this intent install a dummy apk on the device? Even more simple is the use of the am application. You can just run it like this from the adb shell: # am broadcast android.net.conn

How to divide screen into three parts vertically?

回眸只為那壹抹淺笑 提交于 2019-12-03 13:03:50
I have screen with ScrollView and three different LinearLayouts . One LinearLayout contains a Spinner and second contains ListView and third contains two Buttons ( horizontal ). I want to display a screen that contains 3 LinearLayouts always displayed at bottom of screen and 1 LinearLayout always displayed on top. In middle part , i want to display ListView content. So that on whole screen there is no blank space present. I want to create screen for multiple devices which has different sizes. <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res

How to play ringtone selected from RingtonePreference

梦想与她 提交于 2019-12-03 12:45:24
I am trying to play a ringtone which is selected from a RingtonePreference. How can I play it? Here is my xml file code <RingtonePreference android:title="Choose Alarm" android:key="ringtone" android:summary="this is summary" ></RingtonePreference> Here is what I am doing in java SharedPreferences getAlarms = PreferenceManager.getDefaultSharedPreferences(getBaseContext()); String alarms = getAlarms.getString("ringtone", "default ringtone"); When I use toast like this Toast.makeText(getApplicationContext(), alarms, Toast.LENGTH_LONG).show(); Then it shows this kind of path content://media

HAXM not working on Linux

霸气de小男生 提交于 2019-12-03 12:44:20
Here we go for GingerBread : http://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assistedvirtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-gingerbread-emulator/ Any updates for ICECream sandwich or Kitkat ? Helpful answers are highly appreciated!! HAXM is only needed on Windows and OS X. On Linux, you need to have KVM installed. See the "Configuring VM Acceleration on Linux" section on: http://developer.android.com/tools/devices/emulator.html#accel-vm Just download x86 based system images in the SDK Manager, then start the AVD, KVM will be auto-detected

How do I access the camera on Android phones?

这一生的挚爱 提交于 2019-12-03 12:39:57
I've written a program in Java that takes in an image file and manipulates the image. Now I'm trying to access the camera so that I can take the photo and give it to the image processing program however I'm lost as to how to do this. I've read the information about the camera class and how to ask for permissions but I don't know how to actually take the photo. If anyone has any tips on where I should begin or if they know of a good tutorial I'd really appreciate it. Thanks! Google is your best friend, here are some tutorials: Using the camera How-To Program The Google Android Camera To Take

Android 2.2 - How do I detect if I am installed on the SDCard or not?

旧巷老猫 提交于 2019-12-03 12:25:41
I am writing an android app that stores a lot of media files. They are not the type (and are far too many) to clutter up the users notification or other media directories, but they also must be user-updatable, so I can't put them in the resources. I can use getExternalFilesDir to get a path on the sdcard, but I only want to do that if the app itself is installed on the sdcard. If the app is installed internally, I want to put the media in the internal memory. So how can I determine if my app is running in internal or external memory? Charlie Collins You could use PackageManager to get the

ARCore Compatible devices

微笑、不失礼 提交于 2019-12-03 12:16:29
What are the next Android smartphones to be compatible with ARCore? Is there a known list of future compatible devices yet? Maybe a general project schedule? We are about to purchase some units for AR development assessments, at first we thought about trying one of the Tango devices out there (we already had a good experience with Tango), but our current bet is that the ARCore platform will beat it in terms of market share. Currently, the compatible devices are only: Google Pixel Samsung Galaxy S8 (the non-plus version) But obviously, we would prefer to choose from a wider variety (e.g. S8+,

Running Android emulator with -noaudio option returns “qemu-system-i386.exe: -audio: invalid option”

…衆ロ難τιáo~ 提交于 2019-12-03 12:06:05
I'm running Windows 10, 64 bit, Android Studio 2.2.2. When creating an AVD from the Android SDK's AVD Manager, I don't see an option to completeley disable audio (input and output). I'm using Android SDK which has verion of Android Tools 25.2.2). In older AVD manager, i recall that option to completely disable audio on AVD was present. When I want to create a batch script, to run with -noaudio option, as mentioned in the Google's official Control the Emulator from the Command Line page, I'm running the command as emulator.exe -avd Nexus_4 -noaudio , but it throws error qemu-system-i386.exe:

Building Android from source - emulator and AVDs [closed]

馋奶兔 提交于 2019-12-03 11:54:06
问题 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 4 years ago . I have built the Android source for the emulator. I read in the Android Source documentation that the path to 'emulator' is added autmatically during a successful build. However I have two questions about this: If I open a new shell or close my existing shell, 'emulator' is no

Android Emulator - invalid command-line parameter:

无人久伴 提交于 2019-12-03 11:50:07
When I try to launch my Android Virtual Device , I get the following error. Files\Android\android-sdk-windows\tools/emulator-arm.exe. Hint: use '@foo' to launch a virtual device named 'foo'. Please use -help for more information. I have been using the emulator for months, and I just downloaded new updates from SDK/AVD Manager. Hung Tran This problem is caused by blank spaces in the path you setup in the Android SDK. The solution is that you should move the folder of the Android SDK to a place without spaces, in your case: E:\andriod-sdk-windows or D:\abc\xyz\android-sdk-windows A Taylor Please