No Sound coming from Android Emulator [duplicate] - android

This question already has answers here:
MediaPlayer no longer working on the emulator since r10?
(5 answers)
Closed 3 years ago.
I ran my application and I can't get the sound working on the Android Emulator.
I checked and enabled the audio playback boolean in the Eclipse AVD Manager.
I also went into the sound options in the Android Emulator and put them up (no sound while putting them up).
I checked the box that says all selections will make a noise(still no sound).
My application uses the MediaPlayer class and I am running win7 x64 if that has anything to do with it.
Help is appreciated.

For OS X the Android Emulator uses the settings for "Sound Effects" so this is what I had to do to fix my issue:
Click the Apple icon in the top left, then click on System Preferences
Click on Sound
Click on "Sound Effects"
Set "Play sound effects through" to "Selected sound output device"
Set the Alert volume almost at max.
Somehow this had changed to use my monitors instead.

In Ubuntu 16.04, start the emulator and go to the Ubuntu → System Settings → Sound → Applications. Uncheck the mute checkbox and set the cursor at the middle position.

The solution on Ubuntu 16.04 consists in going to the System Settings → Sound → Application tab.
Then, unmute the Qemu-system … and increase the volume

On Debian 8 , you should open qemu-system after android emulator launching

my apps working fine with sound suddenly it stop sound because of some code changed. all other app sound also stopped then i did below step now it is fine
try below
go to android emulator
1.close the program
2.setting -> sound -->volumes ->increase sound value in music video games and other media
it will work

On On Kubuntu , you should increase the playback stream of qemu-system after android emulator launching

I had the same problem : in a terminal,
type pavucontrol (when emulator is running)
and another application using sound, that works, is running too (on pause).
Check if quemu-system and the other application use the same soundcard... In my case, this was the problem :quemu system was using a non working internal soundcard.

Try pressing F6. I had a hard time to figuring this out.

Related

AVD is online, but doesn't show anything

I am developing an Android app in Android Studio. When I try to run it on an AVD, the AVD screen shows nothing.
The device frame is visible, but there is nothing inside it. The message "waiting for target device to come online" doesn't show up either.
Furthermore, I am unable to edit the graphics in the AVD settings. I have tried running the program both normally and from the AVD manager, but it doesn't work either way.
Other solutions which I have tried (and failed) are removing C:\Windows\System32\Wbem from the PATH environment variable, ending the ADB process in Task Manager, and wiping data from the AVD in AVD manager. Oh, and I even uninstalled and reinstalled Android Studio but it still doesn't work, even for a basic Hello World program. Any help would be greatly appreciated.
https://imgur.com/a/rzMmz3E
I faced this problem due to my ram several times and even after upgrading I had to make several changes. The best solution is to set up a new avd. use Nexus S, and a light image. Start with API 16 and when it works go ahead and create your desired AVD. Keep your eye on the pop up errors AVD shows like HAXM
It may seem silly but have you checked if the emulator is not locked?
Ok, when Emulator is not displaying anything and saying like, waiting for online,
after click on power button then what you have to do is Go to,
AVD Manager then in Actions section click on bottom triangle button and click on "Cold Boot Now" to make working your Emulator.

How to record screen with Android Studio

I connect my phone to Android Studio and code. I want to record my phone screen. I saw this but that button is disabled in my Android Studio. I can capture screens but can't record. Can someone help me with this?
UPDATE
This is how it is there in my Android studio. The button is disabled
Now you can also record video from Android emulator to follow below option:
Select more option
Then select Record screen option.
Check below screenshot:
Go to your menu
View -> Tool Windows -> Android
You will find the record icon at the bottom left corner.
If you are using an AVD, make sure "Use host GPU" is disabled.
To take a video recording of your app:
Start your app as described in Run your App in Debug Mode.
Click Android to open the Android DDMS tool window.
Click Screen Record on the left side of the Android DDMS tool window.
Click Start Recording.
Interact with your app.
Click Stop Recording.
Enter a file name for the recording and click OK.
Source: https://developer.android.com/tools/debugging/ddms.html
Maybe your device does not support the screen recorder, there are many devices which does not support screen recorder thus this is device issue. If you want to record your app screen then simply run the app on android emulator or on genymotion and start your desktop screen recorder and adjust the desktop screen to fit emulator. There are many screen recorder for PC but i prefer cam studio 8.
Thanks
In newer versions of Android Studio it requires an external Android phone to record screen from preferably with a resolution of at least 720p. Since the internal runs on the virtual memory it can't be recorded and is therefore disabled as it can't both record and run emulator at same time.
I'm running Android Studio 2.3.2 which is the latest and the one I experienced this on. But when I closed the emulator and connected my HTC One M9 it automatically enabled recording button to record the phone instead of the emulated device.
Check the images below and the difference between them in the red circles:
First image, emulated device on the computer:
Second image, personal device connected to computer:
You can record videos from the command line into an .mp4 file:
adb shell screenrecord /sdcard/video.mp4
When you are done recording, press Ctrl+C.
Then you can copy the file to your computer (current folder)
adb pull /sdcard/video.mp4
If you want you can delete the file from the sdcard
adb shell rm /sdcard/video.mp4
Android SDK Emulators don't support recording:
https://code.google.com/p/android/issues/detail?id=61682
The screenrecord command is simply missing:
i:\>adb -e shell
root#generic_x86_64:/ # screenrecord
/system/bin/sh: screenrecord: not found
127|root#generic_x86_64:/ #
On Windows I suggest using the Fraps generic screen capture tool as an alternative. It's an awesome tool with too many years of history to count. I'm not affiliated with them, I just used it "back in the day" when I was gaming a lot. On the Movies tab add a Video Capture Hotkey and use that to start/stop the recording. The FPS counter will be red while recording.
Maybe you should just change a phone,like this:
When using HUAWEI,the screen record is disabled:
But when changing to Nubia, it works!
I had the same problem. It was solved when I didn't run but debugged de app.
Once you have debugged your app, the icon will be enabled even if you just run your app without debugging.
I guess this has to be done for each app you develop, as it must be a debugging feature or something like that.
*Note that at this image I'm using Android Studio post 2.0, but when this problem happened to me I was using pre 2.0, so that should not matter.
Open Android emilator,
Click to right sidebar more button "..."
Open new window, Record Screen and start record
It's OK
https://developer.android.com/studio/run/emulator.html
for those who never found screen recorder button or screenshot button. here you go
First, make sure you have LogCat open (Press F6, at least on OSx).
Then you might find that you still don't see any record button. Just hover on the tiny "overflow" arrow seen in the image below.
You should now see the record button, indicated in the image below.
Congratulations, if your device supports screen recording, just click the button and up will pop a dialog asking you to input resolution and bitrate
Record video from Android emulator
As a workaround for MacOS users
Open QuickTime Player -> File -> New Screen Recording
If you have a real device run it in debug mode and then go to the Logcat view there will be a screen recording button on the left.
stupid mistake I made was I had two android devices connected.
And I was recording off the locked one so my video was always 18mb and black screen and wouldnt play in quicktime.
On Android Studio Arctic Fox They have moved this functionality to the logcat
https://developer.android.com/studio/debug/am-video
In case of emulator I experienced that you should install DirectX End-User Runtime
Installed it for another application and luckily also Android Sceer Record is working fine and isn't greyed out!
Hope this help some other people

How to record android screen with Android Studio?

I've installed Android Studio in the Applications folder on my Mac (I think the sdk is then in the package content), but now I want to record my screen for a demonstration video of an app with AShot.jar, and I have to give up the path to the SDK. When I give the path I think is right, it says the path Applications/Android\ Studio.app/sdk is not valid.
What to do?
Are there other ways to record your android screen?
Connect your Device with your pc via usb.
Open android studio.Ensure that device is connected with adb.
Start click Screen Recording.
Screen Record can record the device display for a maximum of 3 minutes.
Note:
The Screen Record Works with Real Android Device and some Emulators.
If the button is in grey and un-clickable means that device not supports video capture.
The Screenshots from my system:
For those of us who need a "Complete Idiot's Guide" in order to find the elusive "Screen Record" button, here it is:
First, make sure you have LogCat open (Press F6, at least on OSx).
Then you might find that you still don't see any record button. Just hover on the tiny "overflow" arrow seen in the image below.
You should now see the record button, indicated in the image below.
Congratulations, if your device supports screen recording, just click the button and up will pop a dialog asking you to input resolution and bitrate (since this is an "Idiot's Guide", just skip those and click "Start Recording"!).
If you are using Android 4.4 or higher you can use adb:
http://developer.android.com/tools/help/adb.html#screenrecord
It can be found in the platform-tools folder under your sdk install folder.
This point may be helpful for some one else
All device do not support screen video recording with android studio. In this regard you can use emulator.

Android: Enabling Touch Tones in emulator [duplicate]

This question already has answers here:
MediaPlayer no longer working on the emulator since r10?
(5 answers)
Closed 3 years ago.
I ran my application and I can't get the sound working on the Android Emulator.
I checked and enabled the audio playback boolean in the Eclipse AVD Manager.
I also went into the sound options in the Android Emulator and put them up (no sound while putting them up).
I checked the box that says all selections will make a noise(still no sound).
My application uses the MediaPlayer class and I am running win7 x64 if that has anything to do with it.
Help is appreciated.
For OS X the Android Emulator uses the settings for "Sound Effects" so this is what I had to do to fix my issue:
Click the Apple icon in the top left, then click on System Preferences
Click on Sound
Click on "Sound Effects"
Set "Play sound effects through" to "Selected sound output device"
Set the Alert volume almost at max.
Somehow this had changed to use my monitors instead.
In Ubuntu 16.04, start the emulator and go to the Ubuntu → System Settings → Sound → Applications. Uncheck the mute checkbox and set the cursor at the middle position.
The solution on Ubuntu 16.04 consists in going to the System Settings → Sound → Application tab.
Then, unmute the Qemu-system … and increase the volume
On Debian 8 , you should open qemu-system after android emulator launching
my apps working fine with sound suddenly it stop sound because of some code changed. all other app sound also stopped then i did below step now it is fine
try below
go to android emulator
1.close the program
2.setting -> sound -->volumes ->increase sound value in music video games and other media
it will work
On On Kubuntu , you should increase the playback stream of qemu-system after android emulator launching
I had the same problem : in a terminal,
type pavucontrol (when emulator is running)
and another application using sound, that works, is running too (on pause).
Check if quemu-system and the other application use the same soundcard... In my case, this was the problem :quemu system was using a non working internal soundcard.
Try pressing F6. I had a hard time to figuring this out.

Android emulator refuses to boot

I'm an Android newbie trying to learn how to port one of my apps to the Android platform. I've been following this tutorial:
http://www.vogella.de/articles/Android/article.html#overview
I'm stuck unable to boot up the emulator :( When I tell it to start, it would just stick at the "Android" boot animation for hours on end. I searched online and found some pages talking about disabling the boot animation. I did so and tried again. There's no boot animation (just the word "Android" flashing), but it's still hours with no sign of booting. 'top' shows an app called 'emulator' using a lot of CPU.
Am I doing something wrong? My system is an AMD Athlon X2 dual-core QL-60, 1900 MHz with 3GB ram.
Thanks for any help you can offer.
I had this problem and fixed it by deleting the emulator and creating a new one.
In eclipse:
Menu Window -> Android SVK and AVD Manager
Select Virtual devices (should be selected already)
Select the emulator giving you problems
Click edit to see the setting and remember them, click cancel.
Click delete to delete the emulator.
CLick create to create a new one that is the same as the old one.
Click start.
It started in about 30 seconds after I did that.
Normally the emulator starts in about 2-3 minutes for me. Then it mysteriously stopped working. I was seeing boot animation for 30 minutes before I gave up.
Note #1: Doing this will wipe your user data.
Note #2: As mentioned else where, it's a good idea to check "Enabled" for the snapshot, this lets you do faster startup next time.
Note #3: Also my new emulator came up in chinese. That's kinda of weird :)
Android emulator release 9 has new "snapshot" feature. You can save state of emulator (make image of emulator) and avoid booting when you start the emulator.
I see a similar problem while attempting to run applications on an emulator while the emulator isn't started yet. I find that starting the emulator manually via the "Window > Android SDK and AVD Manager" will load in just a couple minutes or faster, as expected. After the emulator is started manually in this way, you can load applications into it without issue.
I faced same problem on my laptop using I5 8GB RAM. The only solution that worked for me was connecting the laptop charger when launching the emulator. May sound wierd but this always works for me.

Categories

Resources