- 0
addJavascriptInterface on Createview element?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
Apple Maps on the web leaves beta and launches with support for mobile devices
By Sagar Naresh,
- apple
- apple maps
- (and 3 more)
- 3 replies
- 0 views
-
- 0 replies
- 522 views
-
Pick up a 3-pack Slim Tracker Card for Android & Apple Find My for only $44.99
By Steven P.,
- neowin deals
- gps tracker
- (and 3 more)
- 1 reply
- 0 views
-
Windows App is now available on Android, replaces Remote Desktop
By TarasBuria,
- windows app
- remote desktop
- (and 3 more)
- 2 replies
- 0 views
-
Samsung announces its entry-level tablets, the Galaxy Tab S10 FE and Tab S10 FE+
By Sagar Naresh,
- samsung
- galaxy tab s10 fe
- (and 3 more)
- 7 replies
- 0 views
-
Question
Seahorsepip Veteran
MainActivity.class
WebAppInterface.class:
What am I doing wrong? See line at MainActivity.class: content.addJavascriptInterface(new WebAppInterface(this), "Android"); //Gives error: android.content.Context cannot be applied to com.example.app.MainActivity.PlaceHolderfragment :/
This problem only occurs when using a dynamic fragment layout, when I just put a webview in the mainactivity and apply the code to that it works :/
And It uses the Navigationdrawer fragment layout from androidstudio.
Thanks for any help, I'm new to android stuff ^^
*Ignore some unneccessary imports, I'll look into that when I get this working first
Link to comment
https://www.neowin.net/forum/topic/1203825-addjavascriptinterface-on-createview-element/Share on other sites
3 answers to this question
Recommended Posts