Good way to profile page load time from mobile browsers - android

I want to compare page load time between mobile browsers (such as iOS Safari, Android browser). I can't find profiling tools for these mobile browsers.
Do you have any good idea?
One possible option I think now is using UIWebView of iOS and WebView of Android to implement simple applications which can detect page loading events.

Because of limitation of UIWebView (UIWebView and Safari comparison), for iOS using UIWebView to create simple app to profile page loading time is not good idea.
Instead of this, I can use web inspector for mobile Safari browser. Please see this Apple document.
For Android, WebView could be a choice to profile page loading time by overriding WebViewCient's event methods. I couldn't find iOS like profiling tool for Android browser.

You can use Remote Debugging on Android with Chrome.Its quite easy .

Related

does the amazon app use the native webview?

I've read a few post saying that the amazon app uses webviews pretty heavily
(sources: - https://www.quora.com/Why-does-the-Amazon-app-use-WebView-in-their-Android-and-iOS-application
and https://www.teamblind.com/post/Amazon-app--webviews-cuT4sN6C)
Now, i've played with webviews a bit in android in the past where i loaded a remote url to the webview and it loaded the exact version of that website onto the mobile app. This to me was expected. So i investigated amazon's ios app and compared it to the desktop website (in mobile view), and indeed they were very similimar. However, there were some elemets that were missing on either or platforms. i'll attach the images below:
(left is the ios app, right is the mobile view of the website on desktop)
Now I have a few questions:
when people mention "webview" for amazon's use-case are they talking about the native webview from android and ios like the Webview and WKWebview? (https://developer.android.com/guide/webapps/webview and https://developer.apple.com/documentation/webkit/wkwebview), or are they talking about hybrid app technology like apache cordova or Ionic?
If it is indeed a native webview container, can you edit the html to remove some elements? like how some stuff were missing from the mobile app that weren't on the desktop website. And also add stuff like now the mobile app has "Buy Now" button, and the "favourite icon"?
How far can i go with Webviews, in terms of having access to native features like camera, gps and all that good stuff?
When people mention "webview" for amazon's use-case are they talking
about the native webview from android and ios like the Webview and
WKWebview?
Yes, they are indeed framework webviews.
But there is a good chance that they use hybrid app tech.
If it is indeed a native webview container, can you edit the html to remove some elements? like how some stuff were missing from the mobile app that weren't on the desktop website. And also add stuff like now the mobile app has "Buy Now" button, and the "favourite icon"?
You can edit html to remove / add elements using javascript in webview BUT this is not the case here.
These sites have a specific different UI for different devices. (Desktop / Mobile)
For example: Flipkart uses a mobile version on apps which is not available on browsers, except Chrome on mobile (I guess). It just redirects the user to the respective app store to download the app.
I assume it is done by checking the User-Agent field.
How far can i go with Webviews, in terms of having access to native features like camera, gps and all that good stuff?
You can use camera and gps via webview.
More info. here and here.

Running Website Natively On Phone Apps

I have customers wanting my website in app form, but the website is responsive. I've been looking for an open source project or code to just run the website in an app or open up their default browser to direct them to it. They just want the button.
Is there an open source project to make it easy to develop that code for iOS, Android, etc.
Are there any issues with running a website natively? Aka, same as cross-browser issues or..?
Thanks!
There is Apache-Cordova at this link. It is multi-platform and free/opensource.
In Android, you can use WebView.
Android WebView is a system component powered by Chrome that allows Android apps to display web content.
For more information about Android WebView, please visit the documentation

Chrome for Android content access from external app

Is there any way to read page content (html source or DOM) from the active Chrome tab on Android devices?
Chrome for Android doesn't support extensions and there is no plans to implement Extension API on Chrome for Android in the nearest future (however, Chrome for iOS now supports App Extensions).
Some apps (for example, LastPass) can access web content inside web browser.
How can I get read access to the active web page? Are there any external Chrome APIs or something similar?
Any suggestion will be appreciated. Thanks in advance.
It seems to be possible with Android Accessibility. I think the flag you need is FLAG_REQUEST_ENHANCED_WEB_ACCESSIBILITY, so you can inject JavaScript into the website.
As you can see in this blog by lastbpass, they use the same approach. In the video at 0:53, you see the accessibility features they use.

android webview using firefox render or engine

My Web site is html 5 and if website open in firefox browser than it work very well. so is it possible to use firefox rendering engine or can i change default webkit or is there any third part library
No. A website cannot decide what rendering engine should be used to render it. The best way is to fix your website so that it renders correctly on all major browsers.

Phone Gap external HTML intergration

I have built an application using phone gap, and plan to release the app for Apple iOS and Android OS.
The app it's self is fairly simple, and is essentially a glorified HTML website with a few jQuery mobile add-ins for slide functionality etc.
The client have an existing document management system which under request I have amended to be compatible for mobile displays. This being so that users can write notes and save them directly into the system from their phones.
The web document management system is restricted by login and locked out to a select group of static IPs, and because the App is going public, the want the functionality with the database to be limited to the same contraints as the web system...
To all intents and purposes, they want it to be an iframe within the app. So hey, this is what I did... iFrame complete and hey presto works a dream, oh wait, non of the form features work. I can't file upload or anything like this :/
So I tried using but no such luck here :/ same issues.
Over the weekend I looked into http://docs.phonegap.com/en/2.2.0/guide_cordova-webview_android.md.html but this looks to be completely in the wrong direction.
I've been looking all weekend for iFrame alternatives that will retain functionality, and am still looking as we speak.
Can I emphasise that this functionality works in the web system on Chrome for Android, Android native browser and also iOS's safari browser.
I essentially need a way of creating something like an iframe, but with the functionality of the native browsers :/ = bamboozled...

Categories

Resources