Android :: Application Play Sound When Certain Area Clicked?

Aug 26, 2010

In my class I have an OnTouchEvent and when a certain area is clicked, it will play a sound (Not sure if this is the best way to go about this?). However I have been running into bugs using the MediaPlayer. Sound will double play and then eventually sound will stop completely. I am wondering how to efficiently play 5 sounds. The user will be clicking the screen in different areas and different sounds will be playing. I have the attached code below but it only has the first area. Say I add in another area how would I go about changing the media player to play a different sound.

@Override public boolean onTouchEvent(MotionEvent e) {
x = e.getX(); y = e.getY();
if (x >= 232 && x<=287 && y>=117 && y<=157) {
//PLAY SOUND } return true;

Android :: Application Play Sound When Certain Area Clicked?


Android :: Determine Image Area Clicked In Droid?

Jun 20, 2010

Is there a way to determine in an Android app which area of an ImageView (x,y coordinates, for instance) was clicked by a user?

View 1 Replies View Related

Android :: RTSP Streams Play Only Sound - While Local Does Video And Sound

Jul 10, 2010

In my application, RTSP streams play only sound without video, but if i specify the video path as a local file, it plays the video and audio.

How would i get the RTSP streams to show video?

CODE:.................

View 2 Replies View Related

Android :: Droid Application Crashes When Button Is Clicked / Fix It?

Oct 19, 2010

I am writing an android application that check the username and the password of the user once a login button is clicked

i run the app in the emulator and when i click on login button the application is crashed code...

View 1 Replies View Related

HTC Desire :: Tapping Camera Area Makes Slight Rattle Sound?

Apr 9, 2010

How amazing is the desire I absolutely love it, best phone ever. Had to get that off my chest to fellow desire owners. Anyways when I put my phone down it makes a slight rattle, after inspecting closer I noticed that when I tap around the camera area it also makes a slight rattle. I have looked around and found that people are having the same problem with the Nexus one and Hero and apparently its the auto focus.

View 14 Replies View Related

Android :: Determine When Application Icon Is Clicked To Launch App / Do I Get Call-back For This?

May 7, 2010

Is there any way to determine when the user clicked the app icon to launch the app ? I mean say a user was using my app. Then he presses the home key as a result of which the app goes to the background. After sometime he clicks the app icon again. My question is do I get a call-back for this?

View 3 Replies View Related

Android :: Android Map Application Forces Close When Map Marker Is Clicked

May 19, 2010

I'm building a google map application that marks several points on the map. I'm currently trying to get the dialog box to appear when the marker is clicked. Right now, the markers appear at the right places but when i click them, the entire application stops unexpectedly/forced to close.Does anyone have any suggestions on what is wrong and how i should go about fixing it?

View 1 Replies View Related

Android :: How To Get A Wav Sound To Play On Phone?

Mar 16, 2010

Im making an app, and i want it to make a sound when a activity is opened , the sound file is in R.raw.sound_file , if someone could do some example code to make my app play a sound that would be great.

View 1 Replies View Related

Android : Way To Play Sound File?

Jul 22, 2010

Can we play sound file in phone line (in background)?

View 4 Replies View Related

Android :: Area Map / Area Plan

Jun 19, 2010

right away I am doing an app for an festival, and I want to make a area map / area plan. I have got a picture (bigger then the screen) and I want to be able to move it up/down and to the left/right. Further I want to place smaler icons (like the stage, you should be able to click on it and see who is playing) or doing the same in de big picture and get the touch with a x/y request.but I haven't got an idea how I could realise this,

View 4 Replies View Related

HTC Droid Eris :: Making Folder In Application Area For System Icons

Jan 18, 2010

Is it possible to make a folder in the apps and then put all the system apps icons (better keyboard, android icons pack, font packs, etc.) in it so the are hidden?

View 3 Replies View Related

Android :: Stop Sound Notification - Let It Only Play Once

Jun 24, 2009

Since i don't want to have double entries, but would like a fast spreading, here's my post:
http://groups.google.com/group/android-beginners/browse_thread/thread...

View 2 Replies View Related

Android :: ListPreference To Play Sound Is Not Working

Aug 28, 2010

I'm trying to use a ListPreference to decide which sound to play on a button click.

I have this at the top:

public String greensound;

Here's my OnClick code:................

I also tried removing the default value here it didnt seem to change anything but, should it be removed?

Here's my Settings.java:

package com.my.app;

CODE:...........

And here's my array's if that will help at all:

CODE:............

Here's a logcat that kinda looked possibly related:

CODE:..........

For those that might ask here's my DDMS > File Explorer > Data > Data > packageName > SharedPreferences This is what was in there:

com.my.app_preferences.xml:

CODE:...................

This all really confuses me more because...It looks like greensound does == gsone so.... I don't understand whats wrong its not even playing the default sound. and yes i've tested all this code without the listpreference code and they work great. I'm not sure what's wrong?

View 1 Replies View Related

Android :: Play Sound On A Timed Interval

Aug 27, 2010

I have an Android app which needs to play a sound resource on a timed interval, say every 120 seconds. I know how to access the sound resources and play them, however it's time timer part I'm not sure of. What's the best approach?

View 1 Replies View Related

Android : Way To Play Sound On Active Call?

Aug 28, 2009

I am playing one audio file when call arrives so the caller can receive it at other side but the issue is yet the opposite caller is not able to listen it what could be wrong in it. Can some one tell me what can be the issue in it ?

View 2 Replies View Related

Android :: Automatic Call Answering / Play Sound Out

Oct 10, 2010

Could it be possible now, which we can develop an Android application having the following requirement for its working steps Automatic receive the call, then Play some sound out to the caller, wait for DTMF response, then Record the caller sound (in the case that they permit, by pressing 1 as DTMF response)Callee can play back the recoreded sound later.

View 1 Replies View Related

Android :: Unable To Play Short MediaPlayer Sound

Apr 23, 2009

I have this task: Need to play short (0.3-0.4 sec) sounds all the time. When sound is played, it should start again, etc. User can press button to reset sound - it should stop and lunch.

I did many tests. I tried to create 1 MediaPlayer, then do this: MediaPlayer.OnCompletionListener complListener = new MediaPlayer.OnCompletionListener; code...

It works great on emulator and on device if I have eclipse+debugger on. When I disconnect debugger, I have very strange errors - sound can stop at all (till program restart), sound can start "repeating" (play 0.1-0.2 sec, then restart). Can someone please provide me some info about problem?

View 5 Replies View Related

Android : How To Play A Sound File Under Droid Browser?

May 18, 2010

Is there any way to play a sound file under Android browser?

View 1 Replies View Related

Android : How To Play Native Camera Sound On Phone

Mar 2, 2010

I would like to play native camera shutter sound clip on camera preview capture. I'm referring to the sound clip played when takePicture() is called. How could I that? Can someone walk me through the steps?

View 3 Replies View Related

General :: What Sound Files Is Android Allowed To Play

Mar 28, 2012

What sound files is android allowed to play?

View 2 Replies View Related

Android :: Video Playback - Sound Doesnt Play Correctly

Jul 22, 2010

What could be the reason that a mp4 video file without sound doesn't play correctly when using the VideoView class? The video plays just fine in vlc, mplayer and ubuntu media player. It has been created on the device using ffmpeg. It is like 5 seconds long, so nothing especially big. Codec is H263 with AAC-Audio, though the audio signal is just empty. The problem is, that the video plays, but the image doesn't change, or at least doesn't change a lot. It seems more like a still image, though small movements is sometimes visible but not at all what has been encoded. I noticed that the VideoView stops playing but the time continues to step up, so it doesn't stop counting after 5 seconds but just goes on counting.

I'm using the emulator. Can that be related? I see the following messages in logcat:

CODE:......................

View 3 Replies View Related

Android :: Play Continuous Background Music Using Sound Pool

Nov 25, 2009

I am trying to play continuous background music using sound pool.

Here is my code:

CODE:...............

when i do playSound() with 1, 2, 3 sound [wav file] with looping false, they play fine. but if i call playSound any of the 4 files with looping true, it does not work. 4th one is an mp3 file which neither plays with looping true nor looping false. can i create another mediaplayer object as a member variable and use it for only background music ?

View 3 Replies View Related

Android : Notification Doesn't Play Sound / Need To Show Lights

Apr 25, 2010

In my android application I have the following As far as I am aware, I have followed the steps in the documentation to set it to play a sound from the resources folder, and to flash the lights. However, neither of these happen. It does, however, vibrate, as instructed. Any ideas what I'm doing wrong here? I've looked through the permissions that I can give the app in the AndroidManifest.xml file, but I can't see one for letting it flash the light or make sounds. Code...

View 1 Replies View Related

Can't Play A Sound When Call Out

Jan 26, 2012

I Can't Play a sound when a call Out.

View 5 Replies View Related

HTC EVO 4G :: Video Recorded Will Not Play With Sound On PC

Oct 7, 2010

I have had my Evo since launch day. I have recorded some videos for fun and they play back on the phone nicely. But today, I connected the phone to my PC and wanted to play a video. I got video with no sound. I tried several I recorded some at 720fps and some at VGA. Same results. Videos I downloaded from You Tube play fine. Just the ones I recorded on my phone. I have a relatively new HP running Widows 7 and have used Quick Time and Windows Media Player. Neither would play the sound. Anyone have a problem like this?

View 4 Replies View Related

Samsung Galaxy S :: DISPLAY AREA Black Border Line Around Display Area

Nov 23, 2010

The display area of my SGS has been reduced there is now a black line (approximatively 1 millimeter thick) around the display now anything that should be displayed has been centered (a kind of)i have noticed that after press-holding the HOME BUTTON (to get to the task manager).even when the phone that black border is still there and it look like the screen has been pushed down the display is not now at the same level as the top-cover (or screen cover).I have used the factory reset but nothing has changed.My phone look horrible now.

View 1 Replies View Related

HTC Incredible :: Way To Get Different Sound To Play For Text Messages?

May 20, 2010

Is there any way to get a different sound to play for text messages than emails? It would be kinda nice to know in the middle of the night whether I need to reach for my phone or not. Shouldn't be an unreasonable request, but I can't see any way to do it on the phone.

View 5 Replies View Related

HTC Incredible :: MP4 Files Wont Play Sound On PC

Oct 28, 2010

I have an HTC Droid Incredible and record my video in 720p. When I copy the file to my pc Windows Media Player does not play the audio of the .MP4. The video plays fine however. (All playes fine on the phone)

I have a camcorder that also records 720 mp4 files, and it plays audio and video just fine on the same pc.

It is possible that another player might play the file fine such as VLC, but I like Windows Media Player, and prefere not to have 3-4 media players taking up resources on my pc.

View 2 Replies View Related

Samsung Captivate :: How To Play Movies With 5.1 Sound?

Jul 18, 2010

I'm not sure if it's a bug or missing feature but I can't seem to play movies that are encoded in 5.1 sound. The Captivate will play high bitrate video fine and that is awesome, but it would be silly to expect someone to encode a movie in a high bitrate and only use a stereo track.

View 1 Replies View Related

HTC Incredible :: Sound To Play With USB Connection On A Computer?

Nov 18, 2010

Does anyone know if it is possible to get the sound to play with the USB connection on a computer? I know I could probably get a head phone jack, but it would be much easier to have one cable. (example, I'd like to play the fm radio through PC speakers)

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved