setVolumeControlStream, VOLUME, Control, Loudness, STREAM

Quickly share your Android Code Snippets here...

setVolumeControlStream, VOLUME, Control, Loudness, STREAM

Postby plusminus » Fri Nov 14, 2008 3:32 am

This snippet makes the system know we want to control the volume on the MUSIC-Stream (or other streams) with the Hardware-Buttons.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. /* Make the system know we want to control the volume on the MUSIC-STREAM with the Hardware-Buttons. */
  2. this.setVolumeControlStream(AudioManager.STREAM_MUSIC);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


You do not need to save and restore the old suggested stream value in onPause and onResume.

SDK Version compatible: 1.0 (maybe prior versions too)
Image
Image | Android Development Community / Tutorials
User avatar
plusminus
Site Admin
Site Admin
 
Posts: 2688
Joined: Wed Nov 14, 2007 8:37 pm
Location: Schriesheim, Germany

Top

independent volume controlller

Postby shishir.bobby » Thu Feb 25, 2010 2:35 pm

HI plusMinus



can we make an independent volume controller, in an app?


Thanks and regards
Shishir.bobby
shishir.bobby
Experienced Developer
Experienced Developer
 
Posts: 76
Joined: Thu Apr 09, 2009 11:41 am

Top

Return to Code Snippets for Android

Who is online

Users browsing this forum: No registered users and 6 guests