Comments (3)
Hi,
I already thought about that; however, until now, I didn't implement something like that because Android's background restrictions prevent me from doing that.
In order to launch a media projection, I need to obtain an authorization token to start a media projection from Android.
To do that, I need to start a special system activity (= permission prompt, in this case) to obtain it.
Android will then decide whether to show the media capture permission prompt to the user or not depending on PROJECT_MEDIA
among other requirements and give me the authorization token if granted. I cannot skip this step even with PROJECT_MEDIA
set to allow
.
The problem is that Android disallows apps to send these kinds of Intents from the background unless specific conditions are met. (see here: https://developer.android.com/guide/components/activities/background-starts#exceptions).
The only exception that is viable for this use case would be:
- The app is granted the SYSTEM_ALERT_WINDOW permission by the user
This is the 'allow apps to draw over other apps' permission and is required here because it grants me to open other apps unprompted from the background, including the system app that decides whether to open a permission prompt.
I'll try to implement that as a workaround soon.
from rootlessjamesdsp.
That sounds good, thank you! I don't know if it accomplishes quite the same effect, but I've seen other apps like K-9 Mail use Android's Alarms & Reminders permissions to achieve a similar effect so it can scan for push emails in the background. Maybe that's something that could be explored as well. As far as I know, it's completely transparent to the user since it's enabled by default for any app that requests it. The user can disable this functionality, but they wouldn't know that it even existed unless they go into the App Info page where it's displayed as an option.
from rootlessjamesdsp.
I tried to use the Alarms & Reminders permissions, but unfortunately, it only allows background processes to launch foreground services but not activities. I used the approach I talked about earlier instead.
It requires the SYSTEM_ALERT_WINDOW
permission which can be granted in Android's settings or using this ADB command:
appops set me.timschneeberger.rootlessjamesdsp SYSTEM_ALERT_WINDOW allow
If a user sets the app up using Shizuku, all of that is done automatically. Otherwise, the instructions for ADB setup mention this as an optional step. You can now also go to 'Settings > Misc > Optional permissions' to check if the permissions are already granted and whether auto-start is available.
Updated APKs (v1.5.0) are already available here: ThePBone/RootlessJamesDSP/actions/runs/4514747380
(Signed with the same key as the Play Store release, so you can easily update without uninstalling due to package signature conflicts.)
The actual Google Play release probably takes until Monday because the app reviewing process is slower on weekends.
from rootlessjamesdsp.
Related Issues (20)
- [ROOT] Broken Audio HOT 1
- Pixel 6a android 14 HOT 2
- Request
- Apple Music some music sound won't output.
- Very Old App, Rainy Mood HD is not supported of RootlessJamesDSP
- Unable to display incomplete translations.
- RootlessJamesDSP pops and clicks on Android Qobuz
- Buffer Size has no effect on latency HOT 1
- Skip onboarding for secondary users
- Some apps' unprocessed streams are not muted; unable to exclude them HOT 1
- Microphone processing
- Contribution: Ultra high quality THX IRs Preset HOT 1
- Normalizer
- Choose apps to process audio from HOT 1
- The app crashes HOT 1
- Not all apps are shown on exclusion list.
- App stops/crashes while granting access to Shizuku on Pixel 6a HOT 4
- So this manager only works for media sessions and not for all media sounds right? Like the sound of games?
- Duplicated audio in Jellyfin and Firefox
- Ldac on, causes stuttering HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rootlessjamesdsp.