I got a,
<input type="file" multiple accept="image/*" />
and I want my android users to be able to upload multiple files at a time. Users using nexus-5 report being unable to upload multiple files at a time. I also tried adding capture="camera" to the input but this only auto open the camera and only associate one picture at a time again. This works everywhere except on Android.
Is there anything I am missing?
I've hit the same brick wall. I've tried a number of mobile browsers and can't find any that work.
I found this link that tells you that none of the Android browsers support this:
http://caniuse.com/#feat=input-file-multiple
From extensive searching, I've seen information that suggests that Chromium supports this (but no beta yet) and it should make it into Chrome for Android but no indication of time-frame.
This seems to have changed since my last answer. If you now look at:
http://caniuse.com/#feat=input-file-multiple
You'll now see that Chrome 42 (or better) for Android does now support multiple file upload provided you're running Android 5.0 or better. That's quite a limitation but at least it's an improvement. As Android 5 (Lollipop) gains market share (18.1% in August 2015) this become more practical.
Here's one trick. Hit your normal <input type='file' multiple> button. File picker appears: do a long press on a file to select it, then select other files.
On the top bar an "Open" appears, select it and then multiple files are added to the files collection.
Kudos to Simon#atp for this.
However, not all available file pickers may work.
As of 12/20/2017, the new Chrome browser is allowing multiple file selection. Just select your files and click "Open" in the upper right hand corner.
You could work around this limitation by using javascript, canvas and blobs.
See https://github.com/josefrichter/resize/blob/master/public/preprocess.js for some example code to get you started.
I have a similar problem. And I tested the latest chrome and FireFox, both not working.
But the QQ browser which is using X5 core is seems to be the only browser works as I expected. So My solution would be using a App shell to encapsulate the X5 SDK.
I found a solution from GoNative(https://gonative.io/) link. As per our requirement we have to check and enter our URL. And they will send Android code link and DEMO apk over mail. In this file using we can upload multiple files in our web view. If we have to publish the app we have to purchase that thing. I tried to understand the multi file upload code. But couldn't find any thing help full. If any one crack that thing please tell us.
Related
Prerequisites: Got a working app from a friend who needs some changes made. They were outsourcing and now want to internally manage it.
I come from a web and game dev background, so Android/IOS development is new to me, but a lot of the principles seem to be the same.
I got the project onto my device, installed all of the dependencies, and fixed all of the file paths.
The app successfully builds, and I have my virtual Android device running it great!
However, my buddy wants some really simple layout changes, and for the life of me, I can't find where to just edit the home screen layout. I was trying to solve my issue from a web dev approach, by grepping where the logo screen is used in the app, but those files seem to just load a white "background" layer, and not the entire composed page?
I'm missing something really silly here, and I just want to ask a real person on here, instead of digging through documentation and trying to word a condensed question in a Google search.
Here are my condensed questions: How can I just edit the home screen of my app in Android Studio? Where can I find the full home page file to view the entire layout, and not just a fragment?
Edit: The app also utilizes the Flutter SDK, which may explain why I have been having trouble with layout edits. I'm going to look at it again after work today, and hopefully answer my own question. I appreciate the help so far!
Edit 2: After going back to the app with a different approach, I found out my project had defaulted to the "android" sub folder of my master, and wasn't showing any of the Flutter .dart documents. After going up one folder directory, I was finally able to access that Main.Dart file with the display information.
I was able to mount it for inspection, but its saying my emulated device isn't supported. I need to look at it when I have time tonight, and may need to ask a separate question for it. I have my project sdk set to Android 33, and my virtual device is set to Android version 33. I searched around Stack, with a few people with reporting similar issues. I tried following their solutions, but it didn't seem to work.
I'm trying to use codeanywhere's app to do some coding on my android phone while on the road. It works fine except I'd like to make backups of my files and can't figure out a way. My attempts:
Download files and folders from the app. There is an option to do this in a ... menu but it doesn't work; it takes me to a blank page where nothing happens
Through scp. This is only possible using an ssh key, and I couldn't find an easy to use android app for scp with keys instead of password.
By connecting to github. After reading this I decided to create a new github account for this purpose. However I can't figure out how to set up a new repository on android. Also this seems a bit elaborate just to take backups of a toy project..
Any ideas? Or suggestions for other ways to do on the road coding (I'm writing in Haskell)?
In case anyone has the same problem: downloading files / folders works from the website (not the app)
Is it possible to get a photo from camera in a phonegap app only with HTML input, without Camera API?
Scenario
I developed an app and encapsulated it through Phonegap (Build)
Users can submit photos using html file input. But there is no option to take a new photo from camera, only gallery and files (and any other storage app like drive or dropbox, if it is the case).
I would like to enable the camera option, but without the PhoneGap's Camera API.
Solutions
I've tried the following solutions without success:
1. The "capture" attribute (from Raymond Camden post)
With this method, all you have to do is to add the "capture" attribute like this:
<input type="file" capture="camera" accept="image/*" id="JustChooseAnID">
Raymond explains that with this method you don't need to use PhoneGap's Camera API since Google developed this option and showed it in a Google IO presentation and, according to Google devs and also Raymond, it works.
But.. not for me.
2. Config Phonegap to ask camera's permission (from Jorge Lizaso's question)
"Maybe the camera option is not showed up because your app doesn't have the proper permissions"
In the above question, 4 methods are mentioned to indirectly ask and receive the proper permissions to use the camera.
I have already tried methods 2 and 4 and, although my app now asks for camera permission and I allowed it properly, when I use the file input, all the options are presented (like gallery and files), but no camera.
3 (and 1). Use the latest version of webkit with Crosswalk to ensure solution #1
With the possibility of my android webview be outdated (and not compatible with solution #1), I decided to include in my app the best webview possible: the latest version of Google Chromium.
But.. no success again.
1, 2 and 3 combined
The result: no... success.
Yes, there is a solution, without the need for Cordova/PhoneGap's Camera API.
For reasons that are beyond my knowledge, the webkit used in CocoonJS (named WebView+) is far more optimized and adjusted to HTML5 apps than phonegap's Crossswalk (please, I am not related to Cocoon).
I discarded completely my Phonegap config.xml settings and tried Cocoon builder. I used the solution #1 (the capture attribute in file input) and added these plugins, via Cocoon:
<cocoon:plugin name="cordova-plugin-camera"/>
<cocoon:plugin name="cordova-plugin-media-capture"/>
<cocoon:plugin name="cordova-plugin-media"/>
<cocoon:plugin name="cordova-plugin-file"/>
<cocoon:plugin name="cordova-plugin-device"/>
It's important to note that I just installed these plugins in order to obtain the wanted permissions, but I am not using them at all.
Probably, more experienced developers will have better solutions but, for now, this is the best way I found to solve this problem.
I have searched high and low for several days for this problem and I just can't figure it out, hopefully someone else has solved this.
The problem is simple, I have created a web-based game using mainly createjs, preloadjs, and soundjs. The plan was to load the content inside a UIWebView on iOS and WebView on Android to create the two apps.
The problem occurs on Android 4.4 and lower. Neither the videos or the sounds are playing. I'm starting with the simplest scenario; I have an image on a web page, attached a preloaded sound to play onclick;
init:
createjs.Sound.registerSound("sounds/sound_must_be_on.mp3", "soundOn");
$('.btn.sound').click(soundMustBeOn);
onclick listener:
function soundMustBeOn() {
createjs.Sound.setMute(false);
createjs.Sound.setVolume(1);
createjs.Sound.play("soundOn");
}
This works perfect on all modern desktop browsers, iOS and Android 5.x and higher. But on Android 4.4 (on a WebView) it just crashes. What have I missed? I have tried Cordova, Phonegap, SoundJS CordovaAudioPlugin, file:// paths, resources outside the android_asset folder, and plenty of other things. My quess is that I have used Phonegap totally wrong, I could really use a "for dummies" example.
Solved it.
I did what I didn't want to do, but I guess it had to be done. I encapsulated my entire web application within Cordova/Phonegap, downloaded and added the CordovaAudioPlugin.js file from SoundJS and simply registered the plugin as others have already done (also updated the file path)
createjs.Sound.registerPlugins([createjs.CordovaAudioPlugin]);
createjs.Sound.registerSound("/android_asset/www/sounds/sound_must_be_on.mp3", "soundOn");
My real problem is that I need to get youtube videos to play from my app but I can't seem to get it to work... all my research has brought me to this point (hence why I am asking):
As documented here in order to allow external content to open in an iFrame with phonegap you need to modify phonegap.plist.
I've been using their "Build" service which allows you to just add a .zip file and it complies everything for you (spitting out complied code in different formats)
Is there a way to edit phonegap.plist and still use the "Build" service?
Is there a way to edit phonegap.plist and still use the "Build" service?
No, although you can configure some of the items that end up in the phonegap.plist through a config.xml (see docs), the ExternalHosts is not one of the current configurable options.
Also see this related discussion on their feedback forum.