Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

On Android 4.1, can we use DevTools to debug WebView content in native Android applications

I m building android app with cordova .I m able to debug the app, which is running in the emulator.And also with devices which is having android 4.4 or later versions BUT not with the devices having android 4.1 version. Since there is one issue which is seen only in real device of android (version 4.1) .Can u please suggest any solution.

like image 852
Sajesh Kumar Avatar asked Jan 13 '15 05:01

Sajesh Kumar


1 Answers

Proper remote debugging via Chrome is only available for Android 4.4+ when using the platform WebView, so your only option with vanilla Cordova is JavaScript hacks like Weinre.

If you're interested, AppGyver's Steroids tooling comes with Crosswalk for Android, which will let you use an up-to-date fork of Chromium instead of the platform WebView – this fixes many rendering issues and allows you to access the Chrome Inspector for debugging what happens in the Webview.

You can run Steroids it in your Cordova project directly without modifying any files, so check it out.

(Disclaimer: I'm a programmer for AppGyver.)

like image 95
harsa_ Avatar answered Oct 27 '22 09:10

harsa_