android-a11y

Can accessibility service be stopped or killed?

拜拜、爱过 提交于 2019-12-02 12:16:26
问题 I have written an accessibility service and I want the service to be stopped/killed once it receives an accessibility event (i.e. in method onAccessibilityEvent ). Can this be done? I have tried to kill using kill process as below but it is not working. unbindService(mSvcConn); android.os.Process.killProcess(android.os.Process.myPid()); I have given the below permission in AndroidManifest.xml <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> I know that

Can accessibility service be stopped or killed?

余生颓废 提交于 2019-12-02 02:46:28
I have written an accessibility service and I want the service to be stopped/killed once it receives an accessibility event (i.e. in method onAccessibilityEvent ). Can this be done? I have tried to kill using kill process as below but it is not working. unbindService(mSvcConn); android.os.Process.killProcess(android.os.Process.myPid()); I have given the below permission in AndroidManifest.xml <uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" /> I know that accessibility service cannot be started programmatically but can't it be stopped/killed either? alanv An

Send accessibility event not linked to view

寵の児 提交于 2019-11-30 21:20:40
We're looking to send an accessibility event (which would be picked up by TalkBack etc.) which isn't linked to a view. For example, how could I send an accessibility event (e.g. talkback saying "Data downloaded") when a AsyncTask has finished? It looks like the current version of TalkBack ignores announcements if AccessibilityEvent.getSource() returns null, so you're best off using a Toast. This had the added benefit of providing consistent feedback to users whether or not they are using TalkBack. Toast.makeText(context, /** some text */, Toast.LENGTH_SHORT).show(); Normally, though, you could

Send accessibility event not linked to view

戏子无情 提交于 2019-11-30 05:38:42
问题 We're looking to send an accessibility event (which would be picked up by TalkBack etc.) which isn't linked to a view. For example, how could I send an accessibility event (e.g. talkback saying "Data downloaded") when a AsyncTask has finished? 回答1: It looks like the current version of TalkBack ignores announcements if AccessibilityEvent.getSource() returns null, so you're best off using a Toast. This had the added benefit of providing consistent feedback to users whether or not they are using

Android accessibility service

大兔子大兔子 提交于 2019-11-29 07:57:37
I'm trying to write a very basic android accessibility service that shows a message and vibrates when any notification is raised. I've tried testing it by sending an email myself on my phone (I figured that would show some notification). But I have not seen any notifications. My service code looks like public class NotifierService extends AccessibilityService { @Override public void onAccessibilityEvent(AccessibilityEvent evt) { Toast.makeText(this, "Got event from " + evt.getPackageName(), Toast.LENGTH_SHORT) .show(); Vibrator v = (Vibrator) getSystemService(VIBRATOR_SERVICE); v.vibrate(new

How to change Android talkback instructions for double tap and long press

百般思念 提交于 2019-11-28 11:09:30
I have a view that has a long press action handler. I use the content description to set the message Talkback speaks when the view gets focus. Currently it says my content description right after getting a focus, and after a short pause says: Double tap to activate, double tap and hold for long press I want to change this message into something like Double tap to "action 1" , double tap and hold for "action 2" Is there a way to do so? I looked into onPopulateAccessibilityEvent() , it gets TYPE_VIEW_ACCESSIBILITY_FOCUSED event, but I wasn't able to change the desired message. Am I missing

Android accessibility service

痞子三分冷 提交于 2019-11-28 01:36:35
问题 I'm trying to write a very basic android accessibility service that shows a message and vibrates when any notification is raised. I've tried testing it by sending an email myself on my phone (I figured that would show some notification). But I have not seen any notifications. My service code looks like public class NotifierService extends AccessibilityService { @Override public void onAccessibilityEvent(AccessibilityEvent evt) { Toast.makeText(this, "Got event from " + evt.getPackageName(),

How to change Android talkback instructions for double tap and long press

不问归期 提交于 2019-11-27 05:58:33
问题 I have a view that has a long press action handler. I use the content description to set the message Talkback speaks when the view gets focus. Currently it says my content description right after getting a focus, and after a short pause says: Double tap to activate, double tap and hold for long press I want to change this message into something like Double tap to "action 1" , double tap and hold for "action 2" Is there a way to do so? I looked into onPopulateAccessibilityEvent() , it gets