B4A Library Accessibility Services (assisting users with disabilities, automation etc)

moster67

Expert
Licensed User
i need to send text + image is possible?
Do you mean for WhatsApp? As I already mentioned, the WhatsApp demo was just a way to show how you can use AccessibilityServices - it is not limited to WhatsApp.

But yes, you can do that. I have written some custom-versions for other users which include that functionality but I cannot release it since they paid for it and that would not be correct by me. Sorry.

But basically, you need to find the intent required and then look up the button(s) that should be triggered by the service.
 

fifiddu70

Well-Known Member
Licensed User
ok ...thanks moster67,
I do some tests to understand how to be able to send an image on whatsapp using your demo code.
 

moster67

Expert
Licensed User
But yes, you can do that. I have written some custom-versions for other users which include that functionality but I cannot release it since they paid for it and that would not be correct by me. Sorry.
Here is an example of sending images with a modified version of the sample app I posted in the first post of this thread....

 

molder26

Member
Licensed User
Funciona perfectamente.
pero trate de utilizarla para enviar mensajes multiples. ahi lastimosamente no funciona ya que envia el mensaje al primer usuario y nada mas..
Hola Americo
Tienes algun codigo de ejemplo funcionando para probarlo?
Desde ya muchas gracias
Saludos
 

zhousongke

Member
Licensed User
This is a partial wrap/library for Android's Accessibility Services which you can read about here:
https://developer.android.com/reference/android/accessibilityservice/AccessibilityService

Android's Accessibility Services is meant to assisting users with disabilities in using Android devices and apps but can also be used for automation.
Some automation tools, such as Tasker, are using Accessibility Services. In this post, I am attaching a sample app which permits you to automate WhatsApp so messages can be sent to contacts and groups without any user-interaction.

It should be noted that an app such as the attached WhatsApp-sample might not be permitted on Google Play since it could be used as a bot unless you are able to motivate that it is purely used for users with disabilities.

I started to write this wrapper for a personal app I am using when riding my motorbike. I have seen many requests for a wrap of the Accessibility Services and initially, I meant to write a complete and generic wrapper but I have realized that it is a huge task and I simply don't have enough time to do so. It is much easier to write a customized wrapper which covers your requirements. If you would like a customized library and you want me to help you, you can contact me by PM.

That said, the attached library contains the most important functionality and should be usable for many projects you might have in mind. Open the sample-app to better understand how it works. You also need to add some things in the Manifest and there are also some configuration-files which need to be set up properly. You can find these files in the Resource-library which is attached.

Read also the docs. Unfortunately, there isn't much documentation to be found on the internet except for the official documentation provided by Google (see the link earlier in this post) although you can find some information/examples on StackOverflow.

22/02/2020 - updated library to version 0.11 (bug fix)
22/02/2020 - updated sample app to use targetSDK = 28


Here is a YouTube video to see the WhatsApp sample app in action:


Please remember that creating libraries and maintaining them takes time and so does supporting them. Please consider a donation if you use my free libraries as this will surely help keeping me motivated. Thank you!

Good luck!

Hi, moster67.
This is a partial wrap/library for Android's Accessibility Services which you can read about here:
https://developer.android.com/reference/android/accessibilityservice/AccessibilityService

Android's Accessibility Services is meant to assisting users with disabilities in using Android devices and apps but can also be used for automation.
Some automation tools, such as Tasker, are using Accessibility Services. In this post, I am attaching a sample app which permits you to automate WhatsApp so messages can be sent to contacts and groups without any user-interaction.

It should be noted that an app such as the attached WhatsApp-sample might not be permitted on Google Play since it could be used as a bot unless you are able to motivate that it is purely used for users with disabilities.

I started to write this wrapper for a personal app I am using when riding my motorbike. I have seen many requests for a wrap of the Accessibility Services and initially, I meant to write a complete and generic wrapper but I have realized that it is a huge task and I simply don't have enough time to do so. It is much easier to write a customized wrapper which covers your requirements. If you would like a customized library and you want me to help you, you can contact me by PM.

That said, the attached library contains the most important functionality and should be usable for many projects you might have in mind. Open the sample-app to better understand how it works. You also need to add some things in the Manifest and there are also some configuration-files which need to be set up properly. You can find these files in the Resource-library which is attached.

Read also the docs. Unfortunately, there isn't much documentation to be found on the internet except for the official documentation provided by Google (see the link earlier in this post) although you can find some information/examples on StackOverflow.

22/02/2020 - updated library to version 0.11 (bug fix)
22/02/2020 - updated sample app to use targetSDK = 28


Here is a YouTube video to see the WhatsApp sample app in action:


Please remember that creating libraries and maintaining them takes time and so does supporting them. Please consider a donation if you use my free libraries as this will surely help keeping me motivated. Thank you!

Good luck!

Hi, moster67.

I am learning your AccessibilityEventsListenerWrapper Java source code. Referring to the 'performGlobalAction' method, I added the 'dispatchGesture' method. The 'dispatchGesture' method returned true, but the expected Gesture did not occur. Why? How to solve it?

Here This is the added code snippets:

public boolean dispatchGestureClick() {
GestureDescription.Builder gestureBuilder = new GestureDescription.Builder();
Path path= new Path();
path.moveTo(300, 300);
gestureBuilder.addStroke(new GestureDescription.StrokeDescription(path, 0, 50));
return owner.dispatchGesture(gestureBuilder.build(), null, null);
}


Attached is the Java source code.
 

Attachments

Top