File upload field not working inside a web view in android - android

I have a webapplication made in Laravel Framework. I am launching it inside the web view of an android application. All works well but when i press the choose file It does no work. Its completely inactive. How to make it work?

I think you make use of the input attribute in your html, don't you?
As written here (FAQ part) it does not work out-of-the-box in webviews by now.
Maybe you can give the WebChromeClient.onShowFileChooser a shot (added API 21).

Related

How to set DiscoveryLookupBinding.url in onvif RemoteDiscovery

I'm trying to develop an Android APP to discover and access onvif cameras under VS2017 and Xamarin.
By 'Add Web Reference', I added Web Reference of DeviceMgmt and RemoteDiscovery of onvif website.
For generated DeviceMgmt code, there is DeviceBinding class and when I set its url to e.g.
"http://192.168.0.22/onvif/device_service",
all functions like GetCapabilities() and GetDeviceInformation() can work.
For generated RemoteDiscovery code, I noticed there is DiscoveryLookupBinding class, but don't know how to set its url to call Probe().
I tried "239.255.255.250", but it's invalid.
If anybody has the related experience? Any ideas are appreciated, thanks.
For people who may be interested in.
Later for DeviceMgmt and Media services, I used Xamarin-generated references code.
But for Device Discovery, I created a Binding Library (Android) to still use my old java code. And it works well.

How can I make a HTML Phone call with an extension number on Android via a website?

How can I make a HTML Phone call with an extension number on Android via a website?
I tried making a link like this
Call Me!
The link will put the first 10 digits in the android phone app but it will leave out the extension. I tried this on android 5.0 and 6.0. Does anyone know how to get this to work?
According to Problems using extensions in tel: hyperlinks on Android 4 one way of putting an extension number is using something like tel:12345678;ext=123
Another answer in that question says that this only work in some Android versions.

How to make a WebView android app with mobile friendly website as URL?

As I know i have to use android studio for this.
But i am looking for someone who can tell step by step process to change what all codes to make that app a web view app with a test URL foo.com .
What i did till now :
I open Android Studio
Choose a blank activity
Please let me know further steps that works
Please note that i am not looking to develop this on eclipse as new Android Studio is more preferable for me to work with
You need to make a setContentView(R.layout.your_layout) in your activity's onCreate method. You would then make an xml file in the layout folder containing the WebView. Those are the basics to get you started. You can look here for examples and the documentation. There are also lots of tutorials online.

Titanium iOS app to Android

I built an iOS app for a company i know, now I'm trying to make that same app for android. Just clicking the "Android" button in the xml file doesn't work. Do I have to rewrite the whole app again or is there some other way I can easily make that same app for android?
No, You don't need to rewrite the whole code again. But you should have to make some platform specific codes. Also some controls like Toolbar will not be available for Android. You can check the platform using Ti.Platform.osname or getOsname() method, which will return the osname(android/ios). In short, all other code will be work in android platform also.

Loading URL in WebView for Android 3.1 fails on device but works on emulator

I'm trying to load the following URL into a webview: index.html?name
This works fine on Android 2.2 device and emulator, as well as Android 3.1 emulator. However, when I load the app up on my Android 3.1 galaxy tab, I am met with an error:
Webpage not available
The webpage at file:///android_asset/index.html?name might be temporarily down or it may have moved permanently to a new web address.
Seems like it's not registering that it's a local asset and is trying to access the web for it. Any idea why this is happening, and only on the physical 3.1 device? If I try to load just index.html then it works fine on everything. I doubt it, but could it have something to do with the question mark?
Thanks in advance.
I had the same issue but there's a workaround...
Change ?name to #name instead and it will work, since named anchors are supported by Android. You can then use JavaScript like the following to detect the anchor and act upon it:
if (window.location.href.search('#name') > 0)
{
// Do something
}
I think you've answered your own question. Over HTTP, the '?' in a URL is used to separate URL parameters from the main URL; although it's interesting that this works with file:///android_asset in the emulators, I'd hesitate to call it a bug.
If you need to pass arguments to the HTML page (perhaps for javascript to use), one option would be to use anchor syntax (e.g. file:///android_asset/index.html#name)
As per the standard, file:// URLs don't support query strings, like your ?name. So this is hardly a bug. What are you trying to accomplish in the first place? Which part of your code is supposed to process the name? If JavaScript, then load the page, then invoke some JavaScript on it via another loadUrl() call with a javascript: URL.

Categories

Resources