is it possible to programmatically access the website that is currently displayed within the Android browser?
As far as I know the native Browser doesn't handle plugins (please correct me if I'm wrong), so I thought that reading the browser cache would be an option.
Is there a more sophisticated way to get the currently displayed HTML?
Thanks in advance!
S.
is it possible to programmatically access the website that is currently displayed within the Android browser?
That would be a security violation, so, no. Also bear in mind that there are several Web browsers for Android.
As far as I know the native Browser doesn't handle plugins (please correct me if I'm wrong)
The standard browser app supports plugins, but not ones downloaded on the fly. So, for example, it supports the Flash plugin (on Android 2.2+), but you have to install Flash separately first.
Related
Can you advise whether there is any way to get the dynamic, visual content from the website in the Android mobile app?
To explain it better – this is what we offer to the customers on computer & mobile device (any of those 2 visual, interactive toursis placed on the website through iframe):
https://itoma.co.uk/our-online-virtual-tours/
Instead of a browser on the mobile - we want to give our customers the same experience in Android app (with extra functionality already there) e.g. imagine this app with this added feature instead of pictures of a building.
Any ideas on how to deliver it please on Android?
Any apps that you'd know that already achieved that so we could check it out please?
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.
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
I have built a chrome extension that works fine. I know I can't deploy it to android. So I would have to build an app. The app may or may not have anything to do with chrome; I don't know. This isn't a chrome extension question.
But as to the integration between the app and the on-board browser, I see the android api doesn't have any functionality for browser or web integration? Is that correct?
I'm just making sure because building an app that is essentially it's own proprietary browser, just to get my functionality onto android, is not really something I think a lot of people would download. I'm looking for a more integrated way than that. Is there one?
For those who say impossible, I know for a fact there is an app which added a context menu inside chrome on android but I have no idea how they did that or what other integration is possible. It was a webpage pdf converter. Upon clicking that menu it converted the webpage to pdf, and opened the pdf in the app.
I am using Titanium to create a application for Android. The app uses webview to load external HTML5 webpages. The webpage uses a manifest to cache the page and some assets. This works fine on desktop browsers and third party app browsers in Android (Chrome).
When I view the page in a webview in the Titanium build app, it seems that the manifest is not used, the page just loads everything from the server. The same problem occurs when I use the build in browser of my phone (HTC one X).
What I am trying to accomplish is that the pages are offline available, so that internet is not required tot view cached pages. Is there a fix for this problem, or should I go look in another direction to solve my problem?
the manifest file:
CACHE MANIFEST
# version 1
leerlingen.html
jquery.js
style.css
handler.js
NETWORK:
*
First: Titanium provides much more than a WebView. If you planned to display only web pages you maybe should have a look at PhoneGap / Cordova which might fit your needs in a better way.
As you've noticed not all browsers support HTML5 Caching feature as expected. I can't say if it doesn't work for Android in general or only for your specific version because WebKit usually does support it but it depends of the used WebKit version. And this could be different.
EDIT: It seems that (in native android) this feature can be enabled as written here: Application cache in HTML5 doesn't work in Android PhoneGap application. This is currently not possible in Titanium (there might be inofficial tweaks i don't know but from http://docs.appcelerator.com this is not possible).
Personally i'd prefer another solution. Cache data by myself and display it if there is no network connection. But this depends on what you try to achieve. Having few content which doesn't change often this would make sense. Having dynamically changing data (like twitter stream for instance) this would be difficult. Also it depends on your users and where they want to access your app.
And there is an open question: When you want to use all the caching features why do you want to create an app? Creating a simple mobile webpage would do the same job. When creating an app i wouldn't use the Caching Features of HTML 5. You should keep all the static resources in your app and simply load data from the network. This can be achieved by both Titanium and PhoneGap / Cordova. Titanium is more useful for a native UI and some native Features while PhoneGap / Cordova would be more appropriate for HTML5 based layout.
Just in case someone else is running in the same problems that i was facing, here is what i've done. HTML5's application cache does not seem to work in the build-in browser of Android and with that the webviews. In Titanium there seems to be no way to control the webview as to enable the application cache.
The work around for me was to use Titanium and it's httpClient function (Titanium.Network.HTTPClient) to request the files (HTML, CSS, javascript) and store it in the local app filesystem (Titanium.Filesystem).