简体   繁体   中英

What can be used for Webcommunication on Android

I am currently building an App for Amazon FireTVStick which should be able to show content of a Website. I am using Jsoup for HTML-Parsing and locating the Resources and this is working good and was easy with Jsoup.

But now I am stucked at the last step, in which I want to locate the videoLink. The Page uses dynamic JavaScript to load the content and has a wait timer of 10 seconds.

Because Jsoup is only a HTML-Parser in the last step i need anything else for the communication. I have used Selenium once or twice but on Android it is not possible to use as I want with example FireFoxDriver or am I to dumb. It needs a installation of that driver but the Stick does not have one.

Is it possible to use Selenium in any way in Android Studio building a App for FTVS or is there alternative or even a better approach to accomplish what I want ?

I do not want to automate anything on the Android device, just need something for the Webcommunication.

I hope my problem and intensions are clear. Thank you in advance!

The Android Webview is what helped me in the last step. It can execute the JavaScript and return the modified HTML which can than be parsed with JSoup. As for now it is the best solution I could find.

Of course you don't want a FirefoxDriver if it's an android system :) Luckily for you there is an Android version of Selenium called Selendroid , check it out at this link .

HTMLUnit is another alternative you might want to consider, it's basically a headless browser with support for JavaScript.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM