- 0
addJavascriptInterface on Createview element?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
WhatsApp to stop supporting older Android phones starting January 2025, check full list here
By Sagar Naresh,
- 2 replies
- 0 views
-
Latest update makes it easier to find your replies and mentions on Bluesky 1 2
By Sagar Naresh,
- 31 replies
- 0 views
-
Review: I drove over the DOOGEE S200 10,100mAh night vision phone, no cats were harmed
By Robbie Khan,
- 1 reply
- 1 view
-
BlueStacks Air brings an easy way to play Android games on macOS
By Sagar Naresh,
- bluestacks
- bluestacks air
- (and 4 more)
- 0 replies
- 0 views
-
YouTube Kids adds support for vertical UI on Android and iOS
By Sagar Naresh,
- youtube
- youtube kids
- (and 4 more)
- 0 replies
- 1 view
-
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