Generate documentation for Android WebView Javascript Interface

Viewed 16

I have a JavascriptInterface for my WebView.

public class MyJavascriptInterface {
    /**
     * Description of foo1
     * @param str the input string
     */
    @JavascriptInterface
    public void foo1(String str) {
        
    }

    /**
     * Description of foo2
     * @param id the input number
     * @return some string value
     */
    @JavascriptInterface
    public String foo2(int id) {
        
    }
}

I'm looking for any tool that can create an HTML documentation for this interface that can be shared with the users of my application.

For now I'm using jsdoc, but to maintain this documentation, I need to create an equivalent dummy js file, replicate all the functions and comments in the js file and then generate the doc. Since the number of functions in my interface is more than 50, it's getting difficult to maintain duplicate code at two places.

It would be really great to know if there is an existing Android Studio plugin or any other tool that can generate the document directly from my JavascriptInterface class.

0 Answers
Related