Back to project page HeadphoneController.
The source code is released under:
GNU General Public License
If you think the Android project HeadphoneController listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ca.mbabic.headphonecontroller.commands; /*from ww w. j av a 2 s. com*/ import android.content.Context; import android.content.Intent; import ca.mbabic.headphonecontroller.HCApplication; /** * Command executing the play and pausing of media files. * @author Marko Babic */ public class PlayPauseCommand implements HCCommand { @Override public void execute() { Context cxt; Intent intent; cxt = HCApplication.getInstance(); intent= new Intent("com.android.music.musicservicecommand"); intent.putExtra("command", "togglepause"); cxt.sendOrderedBroadcast(intent, null); } }