Android Question Extend Inline Java

Peppe B

Active Member
Licensed User
I'm trying to use inline java to work in conjunction with a lib extend of accessibility

I'm trying to use inline why I could not create events for service, even looking at the NotificationListenerWrapper and WallpaperInternalService lib

B4X:
AddApplicationText()
and
CreateResource()
and
 
Last edited:

moster67

Expert
Licensed User
Longtime User
Wrapping the accessibility services is not an easy task, also because it's a big library.
Anyway, I have wrapped lots of it and it is working fine. I will be publishing it in a few days.
 
Upvote 0

Peppe B

Active Member
Licensed User
I almost got it, but I will not give up.

But thanks when you publish I will thank you very much.
I'll even make a donation for you.
 
Upvote 0

Peppe B

Active Member
Licensed User
Friends I got more or less

As soon as I finish I'll post the lib
I just need some accessibility events, but I think it might be useful for someone so I'll post it as soon as I finish.
 
Last edited:
Upvote 0

moster67

Expert
Licensed User
Longtime User
That looks good!:)

From what we discussed in our PMs, you should be able to get what you want in "onAccessibilityEvent".

Something like this:

B4X:
AccessibilityNodeInfo rootNode = getRootInActiveWindow();
//        logViewHierarchy(getRootInActiveWindow(), 2);
        MyViewNodes = new ArrayList<AccessibilityNodeInfo>();
        infoNodes = new ArrayList<>();
        infoNodes.add(getEventType(event));
        infoNodes.add(String.valueOf(event.getEventTime()));
        findChildViews(rootNode);
        infoNodes.add(MyViewNodes);
        acs.ba.raiseEvent(this, acs.eventName + "_ondataretrieved", new Object[]{infoNodes});

Here I created an OnDataRetrieved-event which can be read from the service-module in B4A.
 
Upvote 0

Peppe B

Active Member
Licensed User
=


I was able to return a few logs now.

I'm going to solve this problem, will I have to create a class for nodeinfo?
 
Last edited:
Upvote 0

moster67

Expert
Licensed User
Longtime User
Sorry, my code was not just to paste.
There are some method-calls in my code-snippet (such as findChildViews) which I did not post.
I just posted it to give you an idea since you seem to be at a good point.
 
Upvote 0
Top