• Announcements

    • andrewilley

      Poweramp v3 Project Update   04/24/2017

      As you may be aware, the Poweramp developer has been working hard on an updated material design user interface for Poweramp v3 which required a full ground-up rebuild of the code. It is hoped this will be ready for final beta-testing by the end of the May. See forum thread for more details and to discuss.    
admin

Poweramp API Lib and Sample Applications [updated 06 March 2014]

41 posts in this topic

Im kinda desperate for the API too before I make a purchase as I need to use it for my in car project.

Share this post


Link to post
Share on other sites

Waiting for the updated API, old version is partially broken.

Share this post


Link to post
Share on other sites

Updated: attached the latest updated Lib and Sample app.

Share this post


Link to post
Share on other sites

Тоже интересуют исходники виджетов и скина.

Share this post


Link to post
Share on other sites

Здравствуйте. Я пишу плагин для часов Sony SmartWatch для управления Poweramp'ом и возникла загвоздка с отображением обложки. Когда дисплей телефона включен я получаю BroadcastIntent(ACTION_AA_CHANGED) через powerampApi(и соответственно успешно отображаю обложку на часах), но если телефон заблокировать(или он сам потушит экран по таймауту) - Intent c ACTION_AA_CHANGED powerampApi больше не посылает. Хотя, например, ACTION_TRACK_CHANGED я получаю даже с отключенным дисплеем.

Я так понимаю это сделано в целях экономии энергии или же ACTION_AA_CHANGED отсылавется не сервисом. Как можно обойти эту проблему?

Спасибо.

Share this post


Link to post
Share on other sites

poweramp_api_lyrics_proto

This is prototype application utilizing Poweramp AA (Album Art) widget functionality. AA Widget is basically sort of app widget in Poweramp Album art area in main player screen. It's possible to display almost everything the app widget developer wants, and get user interaction events back in the app.

Poweramp manages multiple AA widgets internally and shows appropriate UI for them - Close button (which remembers it's state), and selectable icons to switch between AA widgets.

Example use of AA widgets are providing song lyrics, song extended information (e.g. pulled from internet), artist/album info, etc.

[attachment=0]api_example_lyr.png[/attachment]

The download for this seems to have dissapeared - could you upload/link it again? I'd like to play with adding an AA widget but have no idea how without the example!

Share this post


Link to post
Share on other sites

Bump.. could you upload the AA widget example again? Thanks! (poweramp_api_lyrics_proto)

Share this post


Link to post
Share on other sites

Hi.

I have some trouble with API.

Sometimes player cant send broadcast

03-27 17:49:46.564: WARN/BroadcastQueue(399): Failure sending broadcast Intent { act=com.maxmpz.audioplayer.AA_CHANGED flg=0x10 (has extras) }

android.os.TransactionTooLargeException

at android.os.BinderProxy.transact(Native Method)

at android.app.ApplicationThreadProxy.scheduleRegisteredReceiver(ApplicationThreadNative.java:1009)

at com.android.server.am.BroadcastQueue.performReceiveLocked(BroadcastQueue.java:373)

at com.android.server.am.BroadcastQueue.deliverToRegisteredReceiverLocked(BroadcastQueue.java:439)

at com.android.server.am.BroadcastQueue.processNextBroadcast(BroadcastQueue.java:487)

at com.android.server.am.BroadcastQueue$1.handleMessage(BroadcastQueue.java:140)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at com.android.server.am.ActivityManagerService$AThread.run(ActivityManagerService.java:1485)

Can you help me?

Share this post


Link to post
Share on other sites

- PowerampAPI and Sample app updated with Scanner API support. This is supported by Poweramp build 551+.
- Updated reference resources to match build 550+

Share this post


Link to post
Share on other sites

Hello. i'm trying to solve one problem with Poweramp control from external app.

So the task is to toggle play / pause, forward and other actions from another application.
On the first sight there is something in PowerampAPI.java:
 

/**	 * 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";

Ok, great, seems that this is what i'm looking for.
So i put that in my code:
 

Intent poweramp_intent = new Intent("com.maxmpz.audioplayer.API_COMMAND");poweramp_intent.putExtra("cmd",3);MainActivity.this.sendBroadcast(poweramp_intent);

It didn't work. Then i read carefully some examples from Poweramp.apiexample.
There are some explicit intents there, like this:

startService(new Intent(PowerampAPI.ACTION_API_COMMAND).putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.TOGGLE_PLAY_PAUSE));

But i'm not very familiar with android, and it seems to me that that isn't very possible to create such explicit intent from the other application. 
So what is the most tru way to controll Poweramp from external apps?

 

Same story in russian:
Добрый день. Не подскажите, какой самый правильный способ управлять Poweramp'ом из стороннего приложения? Согласно PowerampAPI.java

можно послать броадкаст и я попытался сделать это, но не сработало. 
Я так же не уверен, что из стороннего приложения можно послать explicit intent к Poweramp api. По крайней мере у меня не получилось, делал так:

Intent pwramp_intent =   new Intent(PowerampAPI.ACTION_API_COMMAND);pwramp_intent.putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.TOGGLE_PLAY_PAUSE);startService(pwramp_intent);

и оно валится с:

 java.lang.IllegalArgumentException: Service Intent must be explicit: Intent { act=com.maxmpz.audioplayer.API_COMMAND (has extras) }

Возможно я просто неправильно собираю интент.

В какую сторону покопать? 

 

 

 

UPD:
Deal with it.

Since 5.0.1 all intents to startService must be explicit.

So the right way to construct intent is smth like this
 

 

Intent pwramp_intent = new Intent(PowerampAPI.ACTION_API_COMMAND);pwramp_intent.setPackage(PowerampAPI.PACKAGE_NAME);pwramp_intent.putExtra(PowerampAPI.COMMAND, PowerampAPI.Commands.TOGGLE_PLAY_PAUSE);startService(pwramp_intent);

 

 

 

Share this post


Link to post
Share on other sites

Congrats, Very nice!

I've been expecting this for a while, now I can share my

current tracks with my friends over Twitter or Facebook

with Seesmic. Last night I used the Poweramp API in a

simple app to expose the current track info for a simple

sharing Intent.I love it.

Share this post


Link to post
Share on other sites
On 3/29/2011 at 6:26 PM, admin said:

The code is available here: https://github.com/maxmpz/powerampapi


Changes:- PowerampAPI and Sample app updated with Scanner API support. This is supported by Poweramp build 551+.- Updated reference resources to match build 550+v. 1.2- now available on Github- package name is now com.maxmpz.Poweramp- added Widgetpack base classesv. 1.1- fixed few seekbar issuesv. 1.0- initial release

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now