- 0
addJavascriptInterface on Createview element?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
- 1 reply
- 1 view
-
8BitDo has revealed its latest game controller that works on Xbox, PC, and Android platforms
By John Callaham,
- 8bitdo
- 8bitdo ultimate 3-mode controller
- (and 4 more)
- 10 replies
- 3 views
-
ChatGPT Android beta app gains a nifty feature from its Web version
By Sagar Naresh,
- 0 replies
- 2 views
-
Google Messages spotted prepping an option to let you disable ‘expressive animations'
By Sagar Naresh,
- google messages
- (and 2 more)
- 0 replies
- 2 views
-
Threads testing an easy way to help you automatically archive old posts
By Sagar Naresh,
- meta
- meta threads
- (and 4 more)
- 0 replies
- 2 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
Share on other sites
3 answers to this question
Recommended Posts