I am currently working on an android app that takes a String URL and displays the website in WebView format.
I am now confused on how to send the audio from the Video on that Website to play in the background/foreground.
I want it when user minimizes app, audio will still continue to play.
Ex.
WebView webView;
String url = "https://animixplay.to/";
webView = (WebView) findViewById(R.id.webview);
webSettings.setJavaScriptEnabled(true);
webView.loadUrl(url);
I have heard and saw threads talking about Services or something like but I just don't know where to get started and how to "Call" the Services class into my MainActivity if that is the case.
I have also heard about injecting JavaScripts into the WebView and going on from there but I can't seem to find how to do that as well. (I could just not be searching the correct stuff in the first place.)
I am just starting out in android app building, JavaScript and any help will be greatly appreciated and maybe some examples will do as well. Thank You
TLDR; Don't know how to continue to play audio from websites into background/foreground if user minimizes the app. Services? JavaScript Inject? Still new to this.