Jump to content

Allow recording on Android 10+


airmusic
 Share

Recommended Posts

Hey Max,

 
I am the developer of "AirMusic" (aka AirAudio, https://play.google.com/store/apps/details?id=app.airmusic.trial).
This app allows Android-users to stream any app's audio to almost all audio-protocols.
 
Since Android 10+, AirMusic can record the submix of other apps without having to "root" the device.
 
Sadly it seems like Poweramp explicitly disallows that their app gets recorded by 3rd-party-apps or something else is causing this issue.
Can you please have a look at this page?

https://developer.android.com/guide/topics/media/playback-capture#allowing_playback_capture
 
Maybe you can give me some feedback about the reasons or with some luck this is something you could change in near future?
Several users have contacted me because they cannot stream your music and I am a paid user of Poweramp since 2012 too.
 
Would be great if we can get this working so users can stream their beloved Poweramp-player to their remote speaker :)
 
Best regards from Germany,
Martin
Link to comment
Share on other sites

@airmusic thanks for the request. Poweramp actually doesn't forbid recording (and docs state that this should allow recording). Still I can see from dumpsys media.audio_policy that it's not allowed for some reason - I will investigate why (most probably docs are wrong). Actually capture is allowed, and it's allowed for many builds already (it was implemented as soon as capture was implemented back in Q beta days). From my investigation there is a bug/oversight in the framework for the apps with android:sharedUserId.

Link to comment
Share on other sites

Hey @maxmp,

many thanks for the investigations.

Maybe setting the recording-permissions directly on the player-instances might do the trick? 

https://developer.android.com/guide/topics/media/playback-capture#capture_policy

 

Would be great if we could figure this out. There are as mentioned several users that asked me already about this :)

Link to comment
Share on other sites

You are right, hmm that's really bad. I was able to reproduce/confirm this issue with a simple mediaplayer-app where I added/removed the sharedUserId.

I am aware of the restrictions with the id and that you cannot remove it.

Maybe we can find a workaround, otherwise we might open an issue at Android's bug reporting :)

Link to comment
Share on other sites

  • 5 months later...

Hey there, sadly not, no. I was able to reproduce this issue with a simple test-application and yes it's a bug inside Android's security-mechanism.

I had no idea yet how to get around this beside of implementing major changes inside AirMusic & PA.

 

Link to comment
Share on other sites

8 hours ago, airmusic said:

Hey there, sadly not, no. I was able to reproduce this issue with a simple test-application and yes it's a bug inside Android's security-mechanism.

I had no idea yet how to get around this beside of implementing major changes inside AirMusic & PA.

 

Ah, that's a shame. Maybe one could try to get the Android devs attention towards this, e.g. tagging them in a tweet with a link to this thread? 
Anyways, is there another played that you could recommend that works with AirMusic for streaming local files to the receivers? Or does it only work with online services?

Link to comment
Share on other sites

  • 2 weeks later...
On 8/12/2021 at 8:53 PM, airmusic said:

Nice! Also good news if this is fixed in Android 12 as @maxmpmentions. Would have been great if Google could have fixed it for Android 10 and 11 as well. Although I'm planning to get a new phone I'm not sure if it will that soon, haha.

@airmusicas for the issue, seems like the Google team asks for some details about this, ref the last comment on the link.

Link to comment
Share on other sites

Yes this would be good news.

But I bet this won't happen for the previous versions.

I have sadly no time to provide them more information (children, jobs, development, constructions...☹️), but as it seems to be fixed with Android 12 I think they won't even do anything to provide this fix earlier.

 

If you like to, you might 'root' your phone and use AirMusic in root-mode to get around this issue earlier 😀

 

Link to comment
Share on other sites

  • 4 months later...

Hey there,

I just recently got my Pixel 6 with Android 12 and Poweramp is still not working with AirMusic (AirMusic works with other apps).

Is there anything i need to activate in the settings or does the bug mentioned above still exist?

Thx & BR
Lukez

Link to comment
Share on other sites

Audio capture does work on Android 12 + Poweramp (via MediaProjectionManager, tested on Pixel6 and Note20 on Android 12 + build-921).

Also AirMusic (trial from Play) is able to capture Poweramp. Thanks!

Link to comment
Share on other sites

please note that a FIX for this exists

Poweramp does record ONLY IF the Poweramp Trial Unlocker is UNINSTALLED (Poweramp Equalizer APP seems fine however)

 

once Poweramp Trial Unlocker is uninstalled Poweramp can be recorded again once its AudioStream is recreated

 

either
1. CLOSE (X) the stream from notifications then remove Poweramp from recents, (BOTH need to be removed, order does not matter)

 

or


2. force stop

 

and then re-open Poweramp, this will re-create the stream

 

do note that BOTH Poweramp and the Stream must be closed, closing the Stream while Poweramp is STILL OPEN (not removed from recents) will not work



to clarify: the Poweramp Trial Unlocker MUST NOT be installed if you wish to record audio from Poweramp

Link to comment
Share on other sites

9 hours ago, maxmp said:

@Clark Kent for Android 12 - it works fine with Unlocker as well.

hmm maybe a bug in the android 12 build im using, other people seem to have this as well, could just be phone

 

maybe it cua im using PlayStore version and unlocker together?

 

idk

but if the "fix" works for anyone else then yay :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...