Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openscale sync: specify reciever_export or reciever_not_exported flag. #1043

Open
Jackahack opened this issue Apr 26, 2024 · 1 comment
Open

Comments

@Jackahack
Copy link

Is your feature request related to a problem?.
connecting with openscale sync on android 14 phones to mqtt brokers will need to specify a certain flag (as per API level 34)
The situation right now when you connect is that app keeps crashing resulting in the following error: java.lang.SecurityException: com.health.openscale.sync: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts

what i found on the developer.adroid forum was the following

"" Apps and services that target Android 14 (API level 34) or higher and use context-registered receivers are required to specify a flag to indicate whether or not the receiver should be exported to all other apps on the device: either RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED, respectively. This requirement helps protect apps from security vulnerabilities by leveraging the features for these receivers introduced in Android 13.
Exception for receivers that receive only system broadcasts
If your app is registering a receiver only for system broadcasts through Context#registerReceiver methods, such as Context#registerReceiver(), then it shouldn't specify a flag when registering the receiver. ""

see the link below
https://developer.android.com/about/versions/14/behavior-changes-14

the solution is to patch the app so it complies again with the api. until then openscale sync is unusable for the latests android phones
personally i dont know which flag is needed.

@rd4p
Copy link

rd4p commented Jun 23, 2024

Hi, same problem here.
Mqtt option is not usable in the current state :x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants