Closed sarthakydv closed 9 months ago
I have added a fix in a private fork. I can't make a branch here. Here are the changes:
android/build.gradle
compileSdkVersion
31 -> 34 (so that the latest APIs are available)android/src/main/java/slayer/accessibility/service/flutter_accessibility_service/FlutterAccessibilityServicePlugin.java
add imports:
import android.annotation.SuppressLint;
import android.os.Build;
Annotate onListen
with @SuppressLint("WrongConstant")
- the lint is giving a false warning. I have reported it.
Replace context.registerReceiver(accessibilityReceiver, intentFilter);
with
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
context.registerReceiver(accessibilityReceiver, intentFilter, Context.RECEIVER_EXPORTED);
}else{
context.registerReceiver(accessibilityReceiver, intentFilter);
}
I will try that otherwise try to make a pull request directly
Please do it, we are only managing our private fork
a new version i published suppor android 14 + new core features flutter_accessibility_service 0.2.3
Required param for support on android 14.
Discussion: https://stackoverflow.com/questions/77235063/one-of-receiver-exported-or-receiver-not-exported-should-be-specified-when-a-rec