Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7569519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:11:08+00:00 2026-05-30T15:11:08+00:00

In my app, i have a image gallery and while showing each image,an audio

  • 0

In my app, i have a image gallery and while showing each image,an audio should play.This gallery contains more than 100 images.And i placed all my audio files in “raw” folder and the audio filename starts with the position of image.like 1.mp3,2.mp3 etc.

How can i play this audio dynamically .ie if the gallery is showing 10 th image,then 10.mp3 should play.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:11:10+00:00Added an answer on May 30, 2026 at 3:11 pm

    You should define two Integer Arrays , one for your Gallery Images and the Second for your SoundBoard

    Integer[] gallery={R.drawable.first,R.drawable.second,.........etc.};
    
    Integer[] soundBoard={R.raw.first,R.raw.second,.....etc};
    

    The Index you use to show the Gallery Image should be used in the SoundBoard to play the sound using the MediaPlayer class and its Static method create() and play() for ever looping set the looping(true);

    You can always stop when a new image is displayed and play another sound.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have read this link :Open an image in Android's built-in Gallery app programmatically
I have implemented a Three20 Image Gallery into my App. I want to change
I have an image located at: http://ww2.sinaimg.cn/bmiddle/8c9772a0jw1dm10273empj.jpg I want use android gallery app to
Heres the problem. I have an app that is essentially an image gallery, it
I have an image in a C# WPF app whose build action is set
I have an app that allows the user to choose an image, at design
I have one app, a UIImage* . I'm painting the image twice: Once in
I have an internal web app with an image at the top of the
I have a Silverlight app that has to load an image dynamically, depending on
I have created an ashx handler that returns an image to my flex app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.