Dimezis / BlurView

Dynamic iOS-like blur of underlying Views for Android
Apache License 2.0
3.48k stars 331 forks source link

Can't start foregroundService on android 12 & above #205

Closed abrihamdemisse closed 1 year ago

abrihamdemisse commented 1 year ago

I can't start foregroundService on android 12 and above while using this view, it is causing ANR error android.app.ForegroundServiceStartNotAllowedException this need to be fixed.

Dimezis commented 1 year ago

Lol, why do you think it's anyhow related to the BlurView?

abrihamdemisse commented 1 year ago

Lol, why do you think it's anyhow related to the BlurView?

i have tried the app with the view and without the view, and it is only occurring when there is this blurview .

Dimezis commented 1 year ago

Then start your foreground service when you're allowed to. BlurView targets API 31. If your app's target is lower, the higher API level might get merged into your manifest, where there are more strict rules for foreground services.

abrihamdemisse commented 1 year ago

Then start your foreground service when you're allowed to. BlurView targets API 31. If your app's target is lower, the higher API level might get merged into your manifest, where there are more strict rules for foreground services.

my app target api 33

Dimezis commented 1 year ago

In that case the BlurView has nothing to do with your problem. It doesn't start any services and has 0 dependencies.

abrihamdemisse commented 1 year ago

In that case the BlurView has nothing to do with your problem. It doesn't start any services and has 0 dependencies.

isn't it running in background?

Dimezis commented 1 year ago

It's not. Why would it do anything in the background, if it's a UI component?

abrihamdemisse commented 1 year ago

It's not. Why would it do anything in the background, if it's a UI component?

because blurring every single movement and frames real-time is heavy task.

Dimezis commented 1 year ago

Yes, but a Service is not needed for that

abrihamdemisse commented 1 year ago

Yes, but a Service is not needed for that

ok, thanks