lib/browser/platform.rb in browser-2.4.0 vs lib/browser/platform.rb in browser-2.5.0

- old
+ new

@@ -125,9 +125,16 @@ # Detect if is iOS webview. def ios_webview? ios_app? end + # Detect if in an Android app webview (Lollipop and newer) + # https://developer.chrome.com/multidevice/user-agent#webview_user_agent + def android_app? + android? && ua =~ /\bwv\b/ + end + alias_method :android_webview?, :android_app? + # http://msdn.microsoft.com/fr-FR/library/ms537503.aspx#PltToken def windows_xp? windows? && ua =~ /Windows NT 5\.[12]/ end