Webview in standard android browser doesn't open files - android

When I try upload files opening via standard Android browser, I can't do it. I read in internet, that this trouble of webview.
My system is 4.2.
Is there way to solve this trouble, maybe install any patch? Or maybe in another version of android there is no this problem and the easy way is updating to new system. How to make webview to work forcibly?
Please don't recommend to use any another browser, I need standard.

Related

How to avoid Open button when embedding a pdf in an Android mobile web app?

I'm building a web app for internal use of a company that uses Samsung tablets (Android 9 and Chrome latest versions). I have a page with a list of links to PDF documents and the problem is that when I click any of them, they do not open automatically but instead show an Open button asking to open the document. If I click Open, the document opens as expected with the default viewer (Google PDF Viewer). When I go back, the Open button is still there. If the document has already been downloaded, the browser asks whether to download it again. These images show the situation:
http://www.maresme.net/stackoverflow/chrome_android_pdf/open_button.jpg
http://www.maresme.net/stackoverflow/chrome_android_pdf/allow_auto_downloads.jpg
Is it possible to bypass this step and have the docs open automatically without showing this button? I want to avoid this button and that when users go back from reading the doc they find again the list of links to other PDFs.
I've tried different methods of embedding PDFs (embed, object and iframe) without success. Also, I considered using pdf.js with the canvas tag but my webapp must also work offline and this solution uses too much resources.
Searching the net I found references about an option in Chrome under "Privacy and security" to allow automatic opening of the PDFs but this option does not appear in the tablets I'm using. Is it a security restriction that can't be bypassed?
I will really thank any help with this, it's driving me nuts.
I'm going to answer myself: the problem with Chrome mobile is that it has no support for extensions, so there is no PDF plugin that allows to view this kind of files within the browser. When you intend to open a PDF file the browser has to open it in an external app, be the default viewer (if defined) or any other which is capable (a list will be presented). This is why it asks permission, which I suppose it's a security measure and don't know how/if it can be circumvented.
With pdf.js (and other commercial kits) you can parse the PDF file using JavaScript in the browser, so no plugins are required. However, you must include all this code in your PWA for offline use (and there is some). Another approach that has worked for me is to use the Kiwi browser which supports extensions (I have a closed group of users and I can force this) and then use a plugin, for instance, the plugin version of pdf.js.
Hope this helps someone.

How to develop the next best alternative to chrome extension in android

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.

How to use an PDF viewer in Flex mobile

I am developing a mobile application in Flex in Adobe Flash buillder 4.6 that will run on Android and iOS.
I need a way to view PDF files stored in the application storage directory. Searched in several forums and none of the suggestions worked for me.
In iOS'm using a StageWebView but Android still have not found a working solution.
Can be used ANE or not.
It needs to work offline, so I can not use google docs as a proxy.
Any suggestions?
I solved as was mentioned earlier.
Continued using webview in iOS and a ANE made a call to the Android application registered to open PDF.
Sorry for delay in giving feedback.
Thans for all

childbrowser on iPhone vs Android?

I use the childbrowser in my jqtouch - phonegap iPhone app and have now created it in Eclipse aswell, I have got the childbrowser to work in Android.
In the iPhone the childbrowser has a Done button and in the Android it opens a window with a address field at the top, is this how it suppose to look like - work?
When I open a .pdf or .doc document in the iPhone it opens in the childbrowser so I can read it, but in the Android it downloads the document, is this what it suppose to do?
If so, is there a way to open .pdfs so you can read it without downloading it first?
3. Is the childbrowser suppose to work in the emulator?
Thanks.
Yes, that's how it's supposed to work. The child browser is a bit non-idiomatic on the Android platform, since the Android way is generally more to open content that isn't native to the app on another app where it is (see question 2). The typical way in Android when you encounter a link is rather to open the web browser with that link, but in iOS the Child Brower UI pattern is very common. The Child Browser Android plugin also have a way of sending links to the web browser, I'd recommend you try it and consider using that instead of the Child Browser for your Android app version.
Also yes, that's also how Android generally works. Creating in-app viewers for .doc of .pdf -files would be too difficult if that's not the app's primary task.

Accessing the currently displayed website of the Android browser

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.

Categories

Resources