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

  • SEARCH
  • Home
  • 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 3501646
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:53:07+00:00 2026-05-18T12:53:07+00:00

I released my first Android app two weeks ago (an MMO called Agent Syndicate)

  • 0

I released my first Android app two weeks ago (an MMO called Agent Syndicate) and everything has been working well, except for sounds and music!

Using standard MP3 files created in Sony’s Sound Forge Pro 10 at 128kps, I immediately received reports from many users complaining about Force Close issues on a wide variety of handsets, mostly running Android 2.1 and 2.2. I released a new version which has all sounds turned off, and the complaints ceased. I’d really like to have sounds however, so this is far from ideal.

I don’t have access to the resources to test the game on anything other than my personal phone and the emulator (where everything works flawlessly), but it’s obvious there is a major issue for many players!

Should I not be using MP3s? Is there a universal method that works best for all handsets for just playing simple sound files?

This is what I’m using to start my sound effects:

final MediaPlayer player = MediaPlayer.create(GlobalState.Instance, resId);
player.setOnCompletionListener(new MediaPlayer.OnCompletionListener()
{
    public void onCompletion(MediaPlayer mp)
    {
        mp.release();
    }
});
player.setVolume(0.5f, 0.5f);
player.start();

I originally was calling player.prepare() before player.start(), but kept getting IllegalStateExceptions on some of the sound files. Some of the information out there is very confusing on when exactly to call these methods, and what the exception means. Removing player.prepare() made it work 100% of the time for me on the emulator and my local dev device.

  • 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-18T12:53:08+00:00Added an answer on May 18, 2026 at 12:53 pm

    There should be no problem using the MediaPlayer for music but for sound effect I would use the SoundPool class instead. My guess is you get the IllegalStateExceptions because you are starting the MediaPlayer before the player preperation is completed. Correct way would be to introduce a onPreparedListener for the MediaPlayer and start is from there. Are you making MediaPlayer operation on the main UI thread?

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

Sidebar

Related Questions

Hi i have been working through my first android app and it's starting to
I released an app some weeks ago and many of my users are complaining
I'm working on my first Android app, and am almost to the point where
I've just released my first app to the app store. I've been developing the
I just released my first app for Android and I am getting reports that
I released the first beta version of my iPhone app on TestFlightApp today. Everything
I released my first application to the App Store. Everything went fine until some
I just released my first Android Application through the market. I'm currently working on
On Tuesday, I released my first app to the Android Market. Since then I
I'm working on releasing my first app and I have been using a self

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.