DulcetTone Posted May 11, 2011 Share Posted May 11, 2011 This does not appear to have any effect on music playback. Am I using it incorrectly? void pausePowerAMP(Context context) { Intent intent = new Intent(PowerAMPiAPI.ACTION_API_COMMAND); intent.putExtra(PowerAMPiAPI.COMMAND, PowerAMPiAPI.Commands.PAUSE); context.sendBroadcast(intent); }tone Link to comment Share on other sites More sharing options...
admin Posted May 12, 2011 Share Posted May 12, 2011 It's not broadcast, but intent sent directly to service:startService(new Intent(PowerAMPiAPI.ACTION_API_COMMAND).putExtra(PowerAMPiAPI.COMMAND, PowerAMPiAPI.Commands.PAUSE));Please check poweramp_api_example sources, esp. MainActivity.onClick() method.Thanks! Link to comment Share on other sites More sharing options...
DulcetTone Posted May 12, 2011 Author Share Posted May 12, 2011 Thanks for that. FYI, the comment in the file indicates sendBroadcast is the way to go, which was the basis of my misunderstanding: /** * Poweramp Control action. * Should be sent with sendBroadcast(). * Extras: * - cmd - int - command to execute. */ public static final String ACTION_API_COMMAND = "com.maxmpz.audioplayer.API_COMMAND";Thanks for publishing your API.tone Link to comment Share on other sites More sharing options...
admin Posted May 13, 2011 Share Posted May 13, 2011 Right, will be fixed. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.