I have the strangest thing happening with my web application today. When I want to take a picture from my Android browser or Chrome, it throws away the whole page with this error:
Unable to complete previous operation due to low memory
I use:
<input type="file" accept="image/*" capture="camera" name="file" id="file" />
And then I take the picture, tap "save" and then everything is gone. My phone has enough memory to save the picture and everything, but still the error is displayed.
How to solve this problem?
Ok I managed to solve my own issue. I always received the following message:
unable to complete previous operation due to low memory
On my android device I activated developer options (by tapping the build version 3-5 time I think). And then in Developers Options I ticked "Do not keep activities". Now that was my problem. If I really think about it, it makes sense. When I open my camera from my browser to take a picture, it basically leaves the page (which is stupid from the developers because I did not close the browser) and that made the problem.
So by remove the tick from "Do not keep activities" I solved the problem. Hope this can help someone in the future.
Related
again I got a really strange Bug on Android devices for my app with the use of videogular.
I also use a Fullscreen-Plugin, and a plugin for Screen-Orientation to make sure which orientation is in use.
But anyway, the problem now is, that when I play a video and change to "FullScreen"-Mode, go to landscape-mode, and then cancel the Fullscreen-Mode I see my app in the "Ultimate Zoom-Mode" (not real, I only call it in that way). Which means everything is too big and in fact I only see the upper left corner of my app.
That is kind of a strange thing. And I have no idea where it comes from or what I can do against it.
First I fixed the issue by change to landscape mode when the user go to fullscreen. But now I found out, when the user click on the "Hardware-Back-Button" instead of the "Cancel Fullscreen"-Button on the screen, the "Ultimate Zoom..." returns.
Does anybody have an idea what I can do against it?
Thank you, and sorry for the long post.
First off, this has never happened before on any other android device I've used (multiple devices have been tried and tested before this).
Now I have an app that I have worked on for a little over a year now, it is called AutomatedId (on the app store) and it has worked quite well for my company for quite some time.
Recently I have been given a device to add compatibility to the app (specifically for reading UHF tags) but that isn't the problem.
The problem comes whenever you open the app, the screen stops reading inputs completely, as well as buttons cease to function. I turned on developer options to see the screen inputs and as i suspected, it completely stops and does not read any of the inputs after the app is opened. Clicks don't work, buttons don't work, keyboard doesn't open, hardware buttons on the device stop working. It's a mess, does anyone know what could have caused this?
This is a S98 from here: http://www.wepoy.com/product_view_18.html
moved my comment to the answer as you said. This may be due to memory leak. Here are some references that may help you fix them: Fixing-Memory-Leaks-in-Android-Studio & use this library from square to detect memory leaks early: leakcanary
I have a problem using the intel xkd.
I used it for 2-3 month and it worked well.
Since the last update, my app doesn't work anymore.
The application works, but it seems that the device doesn't handle the tap on screen.
if i click on a button with the mouse on the pc it works, but i i tap it on the phone the event doesn't work.
I don't know why.
if i start a new project from a default template the problem is still there so i think it's a problem related to the XDK/Cordova, but searching on their forum i didn't found nothing.
Check the js file via the embedded editor. There's a high probability that you will see errors/warnings. It could be a missing semicolon or an unclosed bracket.
Secondly, add onclick like this:
function Tap(){
alert("tapped");
}
<button onclick="Tap();">ClickMe</button>
I am developing an app that need to upload images to the server using WebView. But when user clicks on File Chooser button and selects Gallery or Camera to select the photo. My app restarts.
This is surely a memory issue, because if I restart my mobile phone, it starts working fine.
This issue is only seen on S3 and a few other devices. On most of the devices it works fine.
Edit:
The issue is not related to the IMAGE SIZE. Even if I choose the gallery to select the image and when the gallery opens I just click back button to go back to the app and the app restarts.
That means it has nothing to do with the image size. When the gallery opens in full screen and my app goes to background, Android kills my app because of low memory or something like that. But I don't know how to handle it.
i am saving my webview state and restoring it....but its not helping
It's normal for the system to terminate your activities. What you can and should do is to write your app so that it can restore its state correctly. See the Android documentation Recreacting an Activity for more information.
It is tough to say what should be causing the error, as you are unable to post your logcat output. However, here are a few answers to the similar issue, try this and this, and see if you are able to solve your issue.
I have a mobile web page which includes an input element of type 'file', to allow users to upload image files to a server. The page works fine on iOS, and on a Nexus 4 (Android 4.2.1) in the Chrome Browser.
When I use a Samsung S3 (Android 4.0.4) with the default browser clicking on the 'Choose file' button opens the image selection dialog as expected, however after I choose an image and close the dialog the web page gets refreshed, so I lose the image that was selected. Has anyone else seen this behaviour? Any suggestions for a workaround?
The input element that I'm using is fairly standard, and looks like this:
<input id="addPhoto" type="file" accept="image/*"/>
Even without the 'accept' attribute I get the same problem.
Have a look a this issue:
https://code.google.com/p/android/issues/detail?id=53088
Basically, what seems to be happening is this:
Android does not have enough memory available for the file-chooser or camera app.
It frees up memory by closing the browser
After the file chooser/camera is closed the browser is opened again, triggering a page refresh, which renders the whole file choosing exercise useless.
It seems to me that this is beyond the control of any browser based solution but I would love to be proven wrong on this assumption.
I'm having the same problem on a phone with Andriod 2.3.6. One of my colleagues does not have the problem on his phone (can't recall what that is running). He suggested it may be a memory issue. If the phone doesn't have enough available memory, the browser might actually be forced to reload the page after selecting the picture, which defeats the purpose. I have not yet been able to confirm that this is the problem, but my phone does have considerably less available memory than his.
You could try this JQuery Method: http://blueimp.github.com/jQuery-File-Upload/
Uploadify also looks promising: http://www.uploadify.com/
Here's a demo of it: http://www.uploadify.com/demos/
I think the problem is not your code, but the default Android browser you are using.