does the amazon app use the native webview? - android

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.

Related

Adding a PWA to existing app. Are there benefits?

I have a client with two mobile apps. The first APP1 is built natively using Java and Objective-C. The second APP2 has been build using Unity.
Now the client wants to add a common functionality to both APP1 and APP2. The functionality is some new promo screens with user interaction to win credits.
I was considering to propose WebViews for this, however I came across to Progressive Web Apps.
I would like to ask whether is it possible to add a PWA in existing apps by properly initializing WebViews. I guess that the answer is 'yes'. But is there any benefit (apart from the caching) from using PWA instead of common HTML pages since the mobile app is already there?
Thank you!
A PWA is nothing more than a regular HTML webpage, which has added bonus functionality. Those bonus functionality is the incredible ease of install (if not on iOS, at least), and the offline capabilities.
The offline capabilities mostly means that the app will work (for the most part), even when no internet is available.
The easy install functionality means that if you open the site on Chrome for Android, you can "install" the app directly, without going through the app store. This doesn't work properly on iOS, however.
However, at the end a PWA is still just a webpage. This means that it is not just an app for iOS, or Android. It is an actual webpage, with an URL you can surf to. Installing a PWA just takes a local copy, and displays it in such a way that it looks like a native app.
So, in your case, there is no real bonus of making a PWA. If I read correctly, you just need to add a simple HTML page to both apps, right? You can make this a website, and then use WebView to navigate to it, sure. But there is no need to make it a PWA; it will just run in the native app itself.

How to embed a website into an Android App?

I have a mobile website, users user smart phone browser to access my site.
Now some users would like to have an Android App.
So is there any easy and fast way to create an Android App which will access the existing mobile website so that I can have an Android App without developing Android app?
You would have to create a "wrapper" Android App. That is a native Android App with a Main Activity that contains a WebView with JavaScript enabled and some sort of navigation controls either on the mobile website or the native app (buttons or menu) but you could bump into problems such as:
Users being stuck in a particular page with no way to navigating back or forward.
Google is now more picky with the apps and they have policies to reject or ban apps that are only wrappers or point to external websites (kind of what Apple did for iOS)
Any case, you would have to create a mobile layout for your website or a make it responsive (special CSS and JS UI/UX that fits better on mobile devices).
Another alternative is to make your website compatible with PROGRESSIVE WEB APPS (https://developers.google.com/web/progressive-web-apps/) which is basically a Web app with some special elements that allow it to receive push notifications, put a shortcut or app icon on the device's home screen, etc.
Good luck! Hope this helped!
You can use android WebView. For more details you go through the link Android Webview
the only way to do that, using WebView on your apps or you need to create manually
You can put your code into Cordova and convert it into other IDE like android studio or eclipse .
reference:
Import Cordova project in Android Studio

A website converted to android app using webview - Is it categoried as a native app?

3 mobile app categories exist in my understanding
Native app - built using java for android and objective-c/swift for ios
Hybrid app - built using HTML, CSS, Javascript but wrapped for each platform using Cordova (Phonegap), Iconic, etc...
HTML5 app - built entirely using HTML, CSS, Javascript and can be opened in mobile web browsers
I have the following questions:
Is a web application converted into an android app using a Webview placed in the category of a native app? Please clarify.
When you build an HTML5 app (category 3 above), you write code in HTML, CSS and Javascript but do you use a Webview or do you just access the HTML pages using a mobile browser?
Can a hybrid app be opened in a web browser in addition to accessing it as a native app?
Can one upload an HTML5 app to the app store? I understand it needs no approval. Can it even be priced?
What kind of apps are predominantly developed in companies?
Should the HTML, CSS code be made responsive before it can be used in Cordova? If no, can Bootstrap be used before using it in Cordova?
Thank you for your help in advance!
Is a web application converted into an android app using a Webview placed in the category of a native app? Please clarify.
This is probably more in the second category - you download the app from the app store and it exists as a real app on your phone, but it just displays a webpage. It's similar to Phonegap or Cordova, but less evolved.
When you build an HTML5 app (category 3 above), you write code in HTML, CSS and Javascript but do you use a Webview or do you just access the HTML pages using a mobile browser?
You just access it normally in a web browser, and it's coded exactly like you would code your desktop website.
Can a hybrid app be opened in a web browser in addition to accessing it as a native app?
No, a hybrid app is really an app - you must launch it on your phone like you would launch any other app.
Can one upload an HTML5 app to the app store? I understand it needs no approval. Can it even be priced?
If by HTML5 app you mean something not made with Cordova or contained in a Webview, then no, it can't be submitted to the app store, since it's only a website. If it is wrapped in Cordova or even in a simple Webview, it can be uploaded normally to the app store and even be priced, as it's an app like any other one.
What kind of apps are predominantly developed in companies?
Most companies want to build native apps since the look and feel is much better. Some companies will settle for the second category because it's cheaper, and some other, like a local business, will just make sure their website looks good on mobile (third category) since an app would be overkill.
Should the HTML, CSS code be made responsive before it can be used in Cordova? If no, can Bootstrap be used before using it in Cordova?
If you want to use the same code in Cordova, you should design your HTML and CSS to be responsive - making a website responsive later takes longer and is harder than just coding mobile-first from the start. bootstrap, like you mentioned, is a good starting point.

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...

Convert Mobile Web into Native Apllication Using WebView/phoneGap

I am gonna develop a mobile application for multiple devices, say iPhone, iPad and Android Devices like Samsung Galaxy, Samsung Tab and Samsung Galaxy Nexus,
The application is about listing set of information from webservice to list in the application, So I decided to go for Mobile Web app using jquery mobile,
I want to publish the app in Appstore and Android Market, So I want to wrap the Mobile web in to a Native app, I thought an idea of implementing it in a UIWebView in iOS and WebView in Android,
Another option I found out is phoneGap,which provide an SDk to wrap an Web app into a Native iOS or Android App.
Can you people suggest me , Is it better to go with WebView in your native application, or is it really required to use phoneGap, Whether apple will approve my Application if I am using Mobile Web app in a UIWebView, Kindly Suggest.
Note: In my application there is no real need of Using any native functionality of iOS like, Camera, Contacts etc, I just wanna have a list with information fetched from the Webservice.
If you don't need any of the native features phonegap/callback gives you, do not use it. It's a bloated project that will probably add a ton of features you don't need, if you only need a wrapped web application.
Just use a regular webview, enable JS, caching etc and load your HTML into it.
Use phonegap. http://phonegap.com/
If u use it you can use the phonegap build service to generate apps for all platforms via it. you will only have to worry about the js, html part of the app, like you said.
Or if you dont want to use the phonegap build, still creating your own apps with phonegap is way easier as you dont have to write ANY native code.
There were some issues in Phonegap before because of which Apple was rejecting Phonegap apps previously. Thats fixed now, so thats no problem. :)

Categories

Resources