Is it possible to trigger share menu on smartphones (via HTML/JS)?

后端 未结 6 1183
半阙折子戏
半阙折子戏 2020-12-04 21:13

Is there an existing possibility to trigger the share functionality in local browsers on smartphones via HTML or JavaScript?

Of course there are many services which

6条回答
  •  天涯浪人
    2020-12-04 22:02

    You could use the WebView.addJavascriptInterface() method for android.

    First you will need to write a class which fires the intent to open the share menu(take a look here) and then implement that class using the addJavascriptInterface() call. After that all you need to do is call the method from your Javascript.

提交回复
热议问题