Note that there are some explanatory texts on larger screens.

plurals
  1. POStrange issue with android volume
    primarykey
    data
    text
    <p>I have created an android application , which works just fine . in the application i am using media player to play .wav files , which also is working fine.</p> <p>the only problem comes , when i try to increase the volume of the application , just when i touch the up-volume button , the volume for call increases but the volume for application remains same </p> <p>any suggestion , what can be the effecting factor ??</p> <p>here is my code to play audio</p> <pre><code>MediaPlayer mediaPlayer;//as global var in activity mediaPlayer=new MediaPlayer(); // inside onCreate() method </code></pre> <p>whenever i need to play audio i call this method</p> <pre><code>private void playAudio() { Log.d("hussi","before the media "); try { mediaPlayer.stop(); Log.d("hussi","so the file name passed is"+gif_char+".wav"); AssetFileDescriptor descriptor = getApplicationContext().getAssets().openFd(gif_char+".wav"); long start = descriptor.getStartOffset(); long end = descriptor.getLength(); mediaPlayer.reset(); mediaPlayer.setDataSource(descriptor.getFileDescriptor(), start, end); mediaPlayer.prepare(); mediaPlayer.start(); } catch (IllegalArgumentException e) { Log.d("hussi","1===&gt;&gt;&gt;"+e); e.printStackTrace(); Log.d("hussi",e.getMessage()); } catch (SecurityException e) { Log.d("hussi","2===&gt;&gt;&gt;"+e); e.printStackTrace(); } catch (IllegalStateException e) { Log.d("hussi","3===&gt;&gt;&gt;"+e); e.printStackTrace(); } catch (IOException e) { Log.d("hussi","4===&gt;&gt;&gt;"+e); e.printStackTrace(); }catch (Exception e) { Log.d("hussi","5===&gt;&gt;&gt;"+e); e.printStackTrace(); } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload