auto-fill not working in InAppBrowserObject external website on Android device - android

I have been struggling to get my app working the way I want it to. I have an ionic/angular based app that is meant to be only for the Android platform. It is basically a wrapper for an already-existing website from the company I work at. The InAppBrowserObject works great for this, it does exactly what I want except that it doesn't auto-fill the login credentials. It makes it so users need to login every time they open the app which is not what we want. We want the external website to open in the app itself and not in the device's browser, so I use "_self" as target.
I have noticed that when I use the device's browser (target: _system) that it asks for permission to save the credentials and then it does actually save them. It is only when I use the targets: "_self" or "_blank" that I get no popup asking to save it (it also doesn't save it). In the image below you can see the code in the app.component.ts file and some information about the app which might be important. The app is small, it literally only has the app.component files and that's it. It opens the external website immediatly when the app is started.
At this point I am clueless as to what to do about this problem. I think I have visited every website that is related to this subject and the solutions are either outdated or there is no solution at all. I hope I gave enough information as to what the problem is, if not, I can always add more.
Information:
using Angular(ts), Ionic in vs-code. Testing apk in Android Studio.
InAppBrowserObject (Cordova, #awesome-cordova-plugins/in-app-browser)
app.component.ts file ^
target set to _self and not auto-filling the inputs (the inputs in the website are set with autocomplete on)
target set to _system and auto-filling is working correctly.

Related

Navigation Epub3 on android

I've already built my app, I've got a backend CMS and whilst I can get it to work in opening my stories, I have an issue in being able to navigate within my stories. I've uploaded them using calibre and have the format in epub3 allowing extra features that I require. I've found that when I click within my stories, for a different chapter as an example, the corresponding chapter will open but it opens in a Web browser and from that Web page onto others if another click is submitted.
Is there anything within android studio that I can enable which may prevent this from happening?
I suspect it might be a feature of how calibre is scripted but if there is a way I can disable that function within android studio, it might prevent the user from being taken out of the app?

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.

Cant get to play.google.com from webview on some devices. ("This browser no longer supported")

We have written a library that at some point gets a list of play.google.com app links.
We have always opened these links in a webview as we dont want the user to leave the current app unless they absolutely have to.
On regression we have noticed that a few devices (Samsung s3 4.1.2 / Note2 4.3) when trying to open the links will now show the message:
"This browser is no longer supported"
My guess is the store site is blocking based on user-agent or something (the same message gets shown if the link is opened in the internet and Chrome apps but not firefox).
Other devices are working fine though with the webview going to the correct page.
Does anyone know the criteria or any other information about what is being blocked? We would like to know the scope of devices effected before making changes.
We can change our links to market links and open the play store app but links coming from 3rd party sources will still be urls. While we can pass those links to another app rather than a webview, if the user chooses chrome/internet it still wont work. And as mentioned before we don't want to leave the app unless we have to.
Appreciate any information or links on this subject.
Thanks
I think it's probably the user-agent set on the webview. Try changing it:
webview.getSettings().setUserAgentString("user-agent-string");
Here you can get a link of a bunch of user-agents:
http://www.useragentstring.com/pages/useragentstring.php

Can Android print directly from browser?

I am building a web application that takes reservations for rentals, the application needs to be able to print the reservation.
Is it possible to print directly from the browser on the Android platform? Currently my Print button works on desktop, and iOS-based devices. However, Android doesn't seem to even blink when the same button is clicked.
Can printing on the Android platform be done from the browser? Or does it require external applications?
You may want to look into Google Cloud Printing... This is the mechanism used to print for owners of the google chromebooks. It can be used for other purposes as well.
Can Android print directly from browser? not very directly but
of corse we can, first of all you have to set your content in a new tab(windows.open()) then you can print this page through browser share, most of the browsers have a share option from menu, find printer from options print it and DONE, that's it.

loading html file from web server using phone gap

i am planning to develop an hybrid application using phone gap. i want to download html pages,images & other resources from a web server instead of keeping it inside the phone gap application bundle.
is it possible to do so
is it the right way to avoid updating the application in the App Store frequently or
will android, iPhone, windows reject our application
Yes it is possible with phonegap, nothing can prevent you from loading html file from remote source. Here's my other answer on this question: https://stackoverflow.com/a/13996437/1848600
Unfortunately no. While we can say this is true, every error will brake every available app version, while if you create version by version customers will always be able to use previous ones. Also Apple apps store will ban such app.
Android/Win7-8 app will not be rejected, iOS will be rejected immediately. Here's my other answer on this question: https://stackoverflow.com/a/14436328/1848600, no point in repeating.
Yes, it's possible.
you have 2 choices to implement it. simple way is just start on web server url. but, you need a code for including cordova script file that matched target device.
another way is check & download files.
In this case, you need to write some code of phonegap for update-check, download contents & change start URL.
During you have no reason for changing native code, my answer is Yes.
exactly Apple doesn't allow to update app logic without AppStore or load page in web server, but i don't know really it is.

Categories

Resources