I want to use canRequestFilterKeyEvents option in my accessibility service enabled app. I get a warning saying that this is supported only from API level 18 and my app minimum API is 14.
I am ok, if the features I enable using this setting is not available for users below API level 18. But i want to make sure the app would not crash in older version because this setting is enabled.
I have this setting enable in accessibility_service_config.xml file. I have given the full config below.
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
android:description="@string/accessibility_service_description"
android:accessibilityEventTypes="typeAllMask"
android:accessibilityFlags="flagDefault|flagReportViewIds|flagIncludeNotImportantViews|flagRequestFilterKeyEvents"
android:accessibilityFeedbackType="feedbackVisual"
android:notificationTimeout="100"
android:canRetrieveWindowContent="true"
android:canRequestFilterKeyEvents="true"
/>