-1

I was using Web Alert app and I've found something that they do, that I am trying to do as well but with no luck. Basically I'd like to get the HTML element that the user touched.

I was looking at this answer but I always get empty extra and UnknownType.

My best guess is that for them to do this it must not be a native app or is another component and not webview.

Any idea on how to achieve this?

user1845593
  • 1,736
  • 3
  • 20
  • 37

1 Answers1

0

After searching online I came across multiple links that gave me an alternative idea on how to achieve this, then was easily to find the solution.

Basically if I can inject my own JavaScript into a page, then I can call my code.

1st step: How to get the element clicked on a page using JS?

2nd step: How to inject my JavaScript code inside webview:

Hope this helps others

user1845593
  • 1,736
  • 3
  • 20
  • 37