- 0
addJavascriptInterface on Createview element?
-
Recently Browsing 0 members
- No registered users viewing this page.
-
Similar Content
-
WhatsApp is getting new notification settings for group chats
By Sagar Naresh,
- whatsapp android
- (and 3 more)
- 2 replies
- 0 views
-
Google Meet's 'Start a call' screen makes it easier to quickly start meetings
By Sagar Naresh,
- google meet
- (and 4 more)
- 0 replies
- 0 views
-
Epic Games Store's free games program is coming to its mobile store soon
By LoneWolfSL,
- epic games
- epic games store
- (and 6 more)
- 8 replies
- 0 views
-
Palworld is coming to mobile devices and the PUBG developer is making it
By LoneWolfSL,
- pocketpair
- krafton
- (and 7 more)
- 0 replies
- 0 views
-
Google Phone app may introduce dedicated buttons to accept and reject calls
By Sagar Naresh,
- google phone
- (and 4 more)
- 2 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
Share on other sites
3 answers to this question
Recommended Posts