Closed devtyty closed 5 months ago
its work for me
Hi, I was making the same modifications on my end when I saw your PR. I agree with the changes on the RNBackgroundActionsTask.java class. But for this, I think compileSDKVersion need to pass at least to 34 to assure have UPSIDE_DOWN_CAKE constant.
For the foreground type, an action is not always of type shortService. I try to found a way to set a dynamically foregroundService
Hi, I was making the same modifications on my end when I saw your PR. I agree with the changes on the RNBackgroundActionsTask.java class. But for this, I think compileSDKVersion need to pass at least to 34 to assure have UPSIDE_DOWN_CAKE constant.
For the foreground type, an action is not always of type shortService. I try to found a way to set a dynamically foregroundService
Agreed with the service type. I'm using specialUse for my app with this patch. If using expo, this could easily be dynamic with a config plugin
The foreground type could be pass by parameter since API Level 29. I'm going to try a solution with adding type(s) in options. /!\ Some types need permission on manifest. I consider that they should not be added to the library and that it is the responsibility of each application.
The foreground type could be pass by parameter since API Level 29. I'm going to try a solution with adding type(s) in options. /!\ Some types need permission on manifest. I consider that they should not be added to the library and that it is the responsibility of each application.
Right! Thanks for your feedback, i think we should set compileSDKVersion to 34 for library and foreground type to be is the responsibility of each application.
Maybe i will update this patch
After some test and read the document, it seems to be impossible to set the foregroundType directly in the startForeground method without declare it in the service tag (manifest). If we had all the possible tags, we must declare all the corresponding permissions. Imho, It's not an option This parameter is just useful if a service could have different type and precise when it is called.
I don't see any other solution than indicating in the documentation that the service must be redeclared in the application manifest with the correct foregroundType.
After some test and read the document, it seems to be impossible de set the foregroundType directly in the startForeground method without declare it in the service tag (manifest). If we had all the possible tags, we must declare all the corresponding permissions. Imho, It's not an option This parameter is just useful if a service could have different type and precise when it is called.
I don't see any other solution than indicating in the documentation that the service must be redeclared in the application manifest with the correct foregroundType.
I updated compileSdk to 34 and remove foregroundSeviceType in lib's manifest. We should to declare in self application with permission related.
To startForeground with dynamic type, i think lib must be to chang with param is permission type corresponding
Worked for me!
Hi, is there any news with respect to this PR? Need help with anything?
Worked for me too!
i am going to use it now. seem working for you guys
I'm facing issue with Restricted app setting, which is not allowing to my app because of this library and it is only in Android 14. In other versions works fine.
:tada: This PR is included in version 4.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thanks for this. I have some users reporting issues on Android 14 and will use this with patch-package to get by for now