Can we use Android Chromium as Headless browser via normal android service!

2,190 views
Skip to first unread message

bes...@gmail.com

unread,
Apr 29, 2019, 3:09:14 AM4/29/19
to Chromium-discuss
Hello All

I have a big challenged and I love to share it with you. 
I want to automate web scraping. via Android application. 

Well as all Know, we can do that via WebView and injectedJavaScript.

Well, once you want to work while the mobile is locked, Your app will go to Pause mode, and as long as web view is a UI thread. Android system will pause the activity. Moreover, You can not put a UI activity in a "service".

So, and after a long search, I came to the headless browser idea. PhantomJs and others do not support android. And suddenly I saw Chromium is supporting headless and there is an android version of that release.

So I have some questions.

1- Can I include Chromium headless browser within my APK?

2- Can we use the Chromium headless browser as a service in the Android application.

3- Let's say I get a cookie from the normal android WebView. Can I reuse it with this headless browser?

4- Is there any API to talk to the headless browser from the android service. Any HowTo will be appreciated 

5- is there any DEMO opens source android studio project which shows how can we communicate with the headless browser.

I viewed:


but I found no documentation how can I call the API via Android JAVA code. if there is any sample will be a more suitable approach.

Thank you and best regards

Vinícius Nadai

unread,
Apr 17, 2020, 3:20:39 AM4/17/20
to Chromium-discuss
Hi friend, 

My name´s Vinicius and I have some problem.
Did you to do that? I need webview to work as a service and Android doesn't kill it

Call me whattzap number is 55 21 987016270

Thanks

Haider Ali

unread,
Apr 21, 2020, 10:10:41 AM4/21/20
to Chromium-discuss, vna...@gmail.com
Hi i know that i am not posting in right but i need guidance. I am making chromium to call on a http api request get some information and then preform according to response like execute some JavaScript. I did the JavaScript before but i can get to execute api request.

I tried integrating android volley java library in to it didnt work the compiler didnt compile.
I tried searching for some functionality in chromium couldn't find any. Can you please guide me have been searching for days. This will be really appriciated.
Reply all
Reply to author
Forward
0 new messages