- Jun 6, 2020
- 11,559
- 4,422
Hi all, it is possibile to raise an event in different module than a calling module ?
I search to explain better, I wrote a class in java that add a WebChromeClient to a webview and add some funtionalities (as main goal a simple JS console).
Next I compiled this class to a B4A library, created xml and jar files and put in B4A Addictional libraries.
After this I started a new B4A project, then created a class that manage UI (for a JS console), this class use a WebChromeClient class to receive callbacks,
then send these to the Main.
When all worked I've compiled together as library directly from B4A IDE (Compile as library).
Substantially I have this:
Main > JSConsole Class > WebChromeClient
The main initialize the JSConsole class and this class initialize and use a WebChromeClient, the class JSConsole in the middle acts as bridge from the WebChromeClient and the Main.
In a WebChromeClient I actually use onConsoleMessage event to trap consoles messages, then I use RaiseEvent...
I search to explain better, I wrote a class in java that add a WebChromeClient to a webview and add some funtionalities (as main goal a simple JS console).
Next I compiled this class to a B4A library, created xml and jar files and put in B4A Addictional libraries.
After this I started a new B4A project, then created a class that manage UI (for a JS console), this class use a WebChromeClient class to receive callbacks,
then send these to the Main.
When all worked I've compiled together as library directly from B4A IDE (Compile as library).
Substantially I have this:
Main > JSConsole Class > WebChromeClient
The main initialize the JSConsole class and this class initialize and use a WebChromeClient, the class JSConsole in the middle acts as bridge from the WebChromeClient and the Main.
In a WebChromeClient I actually use onConsoleMessage event to trap consoles messages, then I use RaiseEvent...
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید