Android Using Eclipse (on 2.3.3) - Button Doesn't Play Sounds?
Apr 14, 2012
My first coding project is a soundboard type thing on andriod using eclipse (on 2.3.3)whats wrong with my code, I dont get any errors but the button doesnt play the sounds.
Code:
package com.mkyong.android;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;[code]......
View 1 Replies
Oct 21, 2010
I am trying to play the same 10 sounds very quickly and wondering what is the best way?
1. Make 10 media players
2. Make 1 media player and set the sound each time
3. Use a soundpool?
View 3 Replies
View Related
Jun 3, 2010
Is it possible to play audio via an app like slacker.com or pandora.com or your personal audio files and simultaneously play another audio track over the top of it with a second app? My question is whether the sound hardware gets locked by the first app that accesses the audio hardware or whether a second app can access the hardware simultaneously, too.
View 2 Replies
View Related
Nov 24, 2009
I am using soundpool to use sounds in my app. One of the sounds i need to play continuously in background. any example how to do this ?
soundPool.play(soundPoolMap.get(sound), streamVolume, streamVolume, 1, 0, 1f).
View 3 Replies
View Related
Jan 18, 2010
Is it possible to have two instances of MediaPlayer to play sounds/ video? How many instances are actually allowed? I can see from the Javadocs that there is a limited amount of instances of MediaPlayer allowed.
View 3 Replies
View Related
Mar 31, 2009
I have an Activity that plays a brief OGG "pop" sound effect when bubbles pop. To keep it fast and to ensure I can play several pops, I create four MediaPlayer instances. I synchronize access to a pool of instances, so I can play up to four pops at once. Once a sound completes, I call seekTo(0) and return the MediaPlayer instance to my pool.
Here is a rough sketch of the code:
// when the activity resumes... for (int i=0; i<4; i++) {
MediaPlayer mp = MediaPlayer.create(context, R.raw.pop);
mp.setOnCompletionListener(this);
mp.setVolume(1f, 1f); players.add(mp); // put into a pool of available players }
View 4 Replies
View Related
Oct 9, 2010
I wrote an iPhone app some time ago that creates sound programatically. It uses an AudioQueue to generate sound. With the AudioQueue, I can register for a callback whenever the system needs sound, and respond by filling a buffer with raw audio data. The buffers are small, so the sound can respond to user inputs with reasonably low latency.
I'd like to do a similar app on Android, but I'm not sure how. The MediaPlayer and SoundPool classes seems to be for playing canned media from files, which is not what I need. The JetPlayer appears to be some sort of MIDI playback engine. Is there an equivalent to AudioQueue in the Android Java API? Do I have to use native code to accomplish what I want?
View 1 Replies
View Related
Feb 15, 2010
I am fiddling around with a dialog that pops up and displays an alarm information. (I know, it has been documented that in Android it's "better" style to use notifications instead, but just like the alarm clock I want it to display a dialog on top of whatever you do to really get the users immediate attention - as the user expects this behavior I don't think it's bad style!) Now - the only easy way I found is using the RingtoneManager.getRingtone() function to get a Ringtone object for the type "alarm". Well, I can play that sound now using Ringtone.play() - but it plays the sound only once and I cannot figure out how to let it play endlessly until the user reacts, e.g. by touching the dialog anywhere or dismissing it using Cancel button provided. Does anyone know how this can be accomplished easily?
View 1 Replies
View Related
Feb 14, 2010
I used "ringdroid" to make notification and ringtone sounds and they show up on the lists but only the ringtones work. And even when I try to select a default notification sound, it doesn't change to it, its stays the same as when the one that it was set to when i got the phone. Any ideas what might be causing this and how to resolve it?
View 7 Replies
View Related
Jan 14, 2010
I'm using the Android plugin for Eclipse on OSX, latest versions of everything. When I run or debug my app, Eclipse is very inconsistent about uploading/installing the new APK. Nothing I seem to do has any effect on this. Clean builds, debug, whatever, there seems to be about 50/50 chance of installing the APK. Or not. If not, then I have to kill the emulator and try again. What is going in?
View 1 Replies
View Related
Mar 4, 2012
i have a button setup to play a sound,but nothing plays until i release the button again. here's my code
Code:
bKick.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
// TODO Auto-generated method stub
sp.play(dance_kick, 1, 1, 1, 0, 1);
}
});
View 8 Replies
View Related
Feb 1, 2010
When I get a gtalk or text I hear the notification sound and it vibrates just fine. When I open gtalk and answer the text, then I put the phone down for a second and I don't hear any more notifications. This drives me nuts because then I pick it up and I see the person replied a long time ago.
On my old blackberry curve. Every time I get a message it would make a sound. With the droid, if you are in gtalk. It wont make a sound so other then checking the phone or looking at the notification light. I don't know a message came in.
View 4 Replies
View Related
Nov 28, 2009
My phone just decided to randomly play a mp3 at 3 am. I'm sound asleep, it woke me up, and I couldn't figure out how to stop it, or why it did it in the first place.
View 2 Replies
View Related
Sep 16, 2010
I'm using Windows 7 and installed the 64 bit version of Eclipse 3.5.2. I then installed the Android ADT plugin, but when I try to configure it in the Windows > Preferences dialog, the Android Plugin doesn't show up in the left pane. Instead I see DDMS. This prevents me from specifying the location of the Android SDK (unless there is another way) to give me the appropriate templates and such.
View 1 Replies
View Related
Feb 19, 2009
I'm developing on a Mac with Eclipse and the emulator sometimes doesn't seem to link to eclipse (doesn't show anything in the logcat). I just have to close and run again and it works. I wonder why this happens. Has anybody else experienced this?
View 3 Replies
View Related
Jun 14, 2010
I'm using Eclipse on Windows to develop Android application. So when I'm trying to run the app, the system outputs to console
CODE:............
starts the emulator, but doesn't upload the .apk and doesn't start the activity. So, app is not started anyway.
I found a "solution" here, but it's unclear and seems to not work. For example, I don't know, which "emulator processed" are meant to be killed. I found adb.exe only. And that's the main point: sometimes I'm lucky enough to kill all that they wanted and start the app. But it's undetermined.
View 2 Replies
View Related
Aug 25, 2012
when i enter to eclipse new>other>android i have many options but not android project,i have insalled sdk and the plugins,what sould i do?
View 3 Replies
View Related
Oct 2, 2009
I have a problem installing the ADT plugin in Fedora's version of Eclipse. I'm not sure it is a problem with the plugin, it's probably more Fedora's team fault (they heavily personalized and modified eclipse in Fedora's repository).
I installed the version of Eclipse that is included in Fedora's official repos, which is based on version 3.4.2 build 20090211-1700. I've followed the step-by-step instruction provided in Android's website. The problem arises when I go into the Help -> Software updates window. When I select the two plugins to install, it lets me install the DDMS, but not the Developer Tools. If i try (select Developer Tools then click Install) it gives me the following error message (after calculating space and dependencies):
CODE:................
At first, I thought I had not installed some packages (org.eclipse.equinox.p2.iu and/or org.eclipse.wst.sse.core), so I opened YumEX and searched for those pacckages... but they are not available in Fedora's repositories.
View 4 Replies
View Related
Oct 11, 2010
I spent a full day to get my Android SDK sources in my setup and compiled it successfully by doing the File System for x86 and also the SDK, everything was fine but when I tried to use it in my environment (Eclipse) and tried to compile my application (which is working fine on Froyo 2.2), I'm seeing some errors, which seems that I did not get the entire SDK with all the base packages included.
Steps to reproduce:
# repo sync to android sources. # make # make sdk # make Eclipse to point to the new SDK, generated at: .../out/host/ linux-x86/sdk/android-sdk_eng.david_linux-x86/ # generate a new AVD # launch it and run the application
If I'm missing something else.
View 5 Replies
View Related
Apr 6, 2010
The Eternal Speaker plays forever. I never noticed it before today, but my Eris is definitely not disabling music playback through the eternal speaker when I plug headphones (or an adapter, or anything) into the headphone jack. Sound still comes through the earbuds or headphones nice and crisp, just the speaker is ALSO playing the same sound, at the same volume.
This sort of defeats the purpose of one of the main reasons I use headphones- to mute sound for everyone but me. I tried different music players, different headphones, made sure the phone knew they were non-mic headphones, everything. I can't find a setting to tell the speaker to disable when headphones are in- isn't it supposed to be automatic?
View 9 Replies
View Related
Jul 20, 2010
When I type ImageView or AnimationDrawable I get a string of errors proclaiming:
AnimationDrawable cannot be resolved to a type.
line 14 Java Problem
I don't understand, do I need to create another class? Or do the AnimationDrawables just not go in the filename.java?
And if I do need to create another class, can you show me how?
View 1 Replies
View Related
May 25, 2009
I use ant to do release builds, and eclipse to do all my debug builds. With the new 1.5 sdk, my build.xml overides the resource-src target in order to perform some additional tasks, and it then depends on android_rules.resource-src to get the proper toolchain behaviour.This works well for ant, but eclipse doesn't seem to know where android_rules comes from (not surprising since it is dynamically imported via code), and thus says there is an error in the file. This in turn stops the entire android project from building. So I need to either somehow get eclipse to parse the build.xml properly, or better still, get eclipse to ignore the build.xml altogether since build.xml takes no part in the eclipse build.
View 8 Replies
View Related
Aug 15, 2010
I am developing on Windows machine.I was working quite well until yesterday, when I saw the the update prompt and updated my ADT plugin. Today when I tried debugging my test project, I experienced either one the following cases:
1) Logcat stops forever on the message "sending wait chunk".
2) Logcat shows the following message, and test project fails:
3) Eclipse stops responding.
The above cases happens even when the test unit contains nothing.Also it just doesn't not work in debug. The test case runs successfully if it is not in debug mode (But there are still some glitches, like Logcat sometimes won't emit debug messages).
View 2 Replies
View Related
Nov 4, 2009
Since Android supports styles and it's good practice to use them (similar to CSS), I made a new style and applied it to 3 buttons.
The Layout builder in Eclipse did not register the changes and either broke (showed nothing) or didn't apply styles at all.
After running the app in the emulator, styles are correctly applied.
So is there something I'm missing or the Android plugin doesn't support styles?
View 2 Replies
View Related
Apr 15, 2012
When I look at my eclipse android preferences, I can't see any of the SDKs I have installed.I know I have installed the SDKs properly using the SDK manager.This is what the android-sdk directory, along with the platforms directory, looks like:
I am using Eclipse Version: 3.7.2, Build id: M20120208-0800. The original SDK I installed prior to using the android eclipse plugin was eclipse-SDK-3.7.2-win32-x86_64. This environment is running on windows 7.Is there a file missing in the directories posted or are they noted name properly? (i.e. should 'android-15' be named 'Android 4.0.3').
View 3 Replies
View Related
Mar 12, 2013
I want to run an Android app i created on my cell phone, but Eclipse doesn't detect my device.
laptop: ThinkPad X220, 64 bit, Windows 7
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 1
Device: LG Optimus P746, Android 4.04, T-Mobil, USB debugging mode is on.
The device driver installed and device is detected by computer and adb, but not by Eclipse. My android_winusb.inf
...
[Manufacturer] %ProviderName% = LG, T-Mobil
; LG-P769
%CompositeAdbInterface% = USB_Install, USBVID_1004&PID_61F9&MI_00 ;
View 9 Replies
View Related
Jan 28, 2012
Somehow I've screwed up my Eclipse installation. Used to be if I added a new instance of an Android object (say a TextView) and I right clicked on the error, it would offer to add the import. Also if I had an Android object and typed it followed by a period, it would show me all the allowed functions. Now it doesn't do either, just shows me java info. Don't know what I did, since this used to work. I updated everything, but still no joy.
View 6 Replies
View Related
Sep 3, 2010
My Activity onClick() below doesn't appear to be doing anything (not seeing any string appear), yet I dont get any errors. What am I missing?
Is there a way to trace the function?
CODE:..........................
View 2 Replies
View Related
Dec 25, 2010
I am wondering if there is a way to hyperlik a button in the eclipse . Like when I add button in main.xml to the gui thingee . So I want to hyperlink the button so that it redirects to a different page/url.
View 1 Replies
View Related
Jan 24, 2010
I have a basic animation of a button after it is pressed currently in my application. After the button finishes animating, I can no longer click on it. It doesn't even press with an orange highlight.
View 2 Replies
View Related