accessibilityservice

How to send a custom event to AccessibilityService?

故事扮演 提交于 2019-12-23 03:42:17
问题 My program purpose: trigger the BACK button in a service I tried many ways, no one can achieve this purpose, finally I discovered AccessibilityService, it may be the most possible ways to implement this function. I created this AccessibilityService, and tested it is work package com.accessibilityservice; public class MyAccessibilityService extends AccessibilityService { public MyAccessibilityService() { } @Override public void onAccessibilityEvent(AccessibilityEvent event) {

android Accessibility-service suddenly stopped triggering events

可紊 提交于 2019-12-22 18:01:44
问题 I have an AccessibilityService which was working fine but for some reason during development it stopped working. I can't seem to find that reason. Please have a look at my code and tell why it isn't working. public class MyServicee extends AccessibilityService { public static final String TAG = "volumeMaster"; @TargetApi(Build.VERSION_CODES.KITKAT) @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public void onAccessibilityEvent(AccessibilityEvent event) { List<CharSequence>

Redirect chrome programmatically

女生的网名这么多〃 提交于 2019-12-21 22:03:32
问题 I have been able to read the chrome content using accessibility service using the below code <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" android:accessibilityFlags="flagDefault" android:accessibilityEventTypes="typeWindowStateChanged" android:accessibilityFeedbackType="feedbackGeneric" android:notificationTimeout="0" android:canRetrieveWindowContent="true" android:packageNames="com.android.chrome" android:description="@string/accessibility_description" />

How to debug accessibility service?

谁说我不能喝 提交于 2019-12-21 09:24:54
问题 I have some problem with debugging AccessibilityService and can not find a solution - with every deployment/debug from Eclipse the service is not restarted automatically and it requires the manual action of restarting the service. What I am forced to do now: I am adding some new code and deploying/debugging with Eclipse. Application is deployed correctly and started but the new version of service is not started (messages from service are not shown and breakpoints are not working). I am

Accessibility service disabled upon each debug run

两盒软妹~` 提交于 2019-12-20 10:26:07
问题 Each time I start a new debug instance, my accessibility service resets to the disabled state. Is there any way to keep it enabled across successive debug runs (as it is quite long & boring to enable it each time in order to debug the service)? I have the same behavior on real device and emulators. There is no exception in the service, I tried event with no code in the event handler. There are suspicious lines in my logs: 10:47:32.801 31669-31669/? E/AffinityControl: AffinityControl:

Accessibility Service - performGlobalAction() returns false

╄→尐↘猪︶ㄣ 提交于 2019-12-19 09:04:25
问题 I am creating an Android Accessibility Service which calls performGlobalAction() at onStartCommand() public int onStartCommand(Intent intent, int flags, int startId) { Log.d("service", "started"); Bundle extras = intent.getExtras(); Integer value = -1; if (extras != null) { value = extras.getInt("control"); } switch(value) { case BUTTON_EVENT_BACK: //press back button boolean result = performGlobalAction(GLOBAL_ACTION_BACK); Log.d("make back action result: ", Boolean.toString(result)); break;

Android : Read Google chrome URL using accessibility service

北城以北 提交于 2019-12-19 03:58:44
问题 I want to read the url user has entered in his browser. Here is my accessibility service code. <accessibility-service xmlns:android="http://schemas.android.com/apk/res/android" android:accessibilityFlags="flagDefault" android:accessibilityEventTypes="typeWindowStateChanged" android:accessibilityFeedbackType="feedbackGeneric" android:notificationTimeout="0" android:canRetrieveWindowContent="true" android:packageNames="com.android.chrome" android:description="@string/accessibility_description"

Get notification icon using an accessibility service

梦想与她 提交于 2019-12-18 13:38:28
问题 Is there any way to get icons of system notifications? I can get a notification parcel with Accessibility service. I can even get the id of the icon from it, but I am stuck there. I have no idea how to use the id to get the actual bitmap so I can display it, because it is not from my apk. Here is my code so far: @Override public void onAccessibilityEvent(AccessibilityEvent event) { Log.d("onAccessibilityEvent"); if (event.getEventType() == AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED) {

Reading notifications using AccessibilityService

谁说我不能喝 提交于 2019-12-18 04:14:54
问题 I've recently tried to read incoming notifications using AccessibilityService . I know reading notifications using NotificationListenerService , but that's not what I need (for compatibility with lower android versions). My problem is, OnServiceConnected() never get called, even though in my settings, I've gave my app the neccessary premisions. Here is my code: public class NotificationAccessibilityService extends AccessibilityService{ protected void onServiceConnected() { Log.d("Tortuga",

onAccessibilityEvent Action_click Not working

微笑、不失礼 提交于 2019-12-13 20:27:22
问题 Okay, so I am working on an app that will auto accept lyft request, but I am having a problem with my code not using performAction(AccessibilityNodeInfo.ACTION_CLICK); correctly. public class AutoService extends AccessibilityService { private static LyftAdapter lyftAdapter = new LyftAdapter(); // Automated Service (onAccessibilityEvent) @TargetApi(16) @Override public void onAccessibilityEvent(AccessibilityEvent event) { AccessibilityNodeInfo source = event.getSource(); String lyftPackage =