Motorola Droid 3 Camera app kills backgournd apps - android

I have application that opens native camera app and get the captured picture.
I have seen that when my application open native camera application it kills all background running applications(including my application).
This issue is also tested in other flow like : I have opened 3-4 other applications. After that I have opened native camera application directly from the home screen. In this case also it kills all the previously opened application.
I would like to have background app remains opens. Can anybody help me here.
I have tested same scenario with Samsung Galaxy ACE and HTC Desire HD. It's working fine.
Device configuration :
Motorola Droid 3 , Android version : 2.3.4

Yes got it. I have found the solution for it. My problem was like when I open Motorola Droid 3 camera application , it closes all the background running applications. After searching through blogs and apply some logic and found that it was Native camera issue.
So for the solution, I have saved my application state to bundle using method of
protected void onSaveInstanceState(Bundle outState)
and retrieve saved state from onCreate method again and it works. Now my application does not crash. But one more problem here is like whatever image I have captured from the native camera is not displayed to my screen because it is alreaded restarted so onActivityResult method will not be called.
To solve this issue we have to clear the data of native camera app and have to forced stop it once. After that I open native camera app from my application and it works for 2-3 times and again stops working. Again I clear data and force stop native camera apps and it works.
Other solution to this is I have installed Camera360 application and it works fine for me and no need to use default camera application.
I know this is again a work around but if anybody can give me other better solution then it's fine.
Enjoy.

Related

Samsung Camera Intent

let me address my issue here.
i'm using an Intent to grab an image from the camera file by passing a file along the Intent to return it, however in my tests in the Samsung Galaxy S5, if the image was taken normally the image will return, but lets say if Samsung tries to handle low light and do its "so called hard working" the application will crash. i'v tried storing the fileName in onSaveInstanceState and retreiving it in onRestoreInstanceState this prevent the application from crashing, but however it recreates my Activity which below it there is another Activity which has BroadcastReceiver that is been destroyed along when the Activity recreated, is there any workaround to tell Samsung to take the image without its crappy features to prevent this scenario from happening?
Edit
with test with only sending the Intent without passing a Uri file with it, it still if it handles low lights, the application will crash.
While developing our Cordova app on Android on a Samsung S5, I've noticed the same issues – in regular mode, the Samsung camera app appears to use less memory, so the Android garbage collector doesn't kill our app. However, in the low-light mode you're describing, the Android garbage collector kills our app in the background.
The Cordova camera plugin doesn't support the Android lifecycle, so I've had to fork it, and store the imageUri (and some other settings) to a Preference in order to retrieve it again once the app restarts.
I think you'll need to put a Debug.waitForDebugger() statement in your onActivityResult method, so that when your app restarts you can connect the debugger and step through your code that processes the result. My guess is that you're referencing a variable that isn't available because of the loss of state.

App Working Perfect with Android 4.2.2 but not with 4.4.4

I am kinda new to App development and working on my first app, which is taking a burst mode of pictures with the current gps coordinates attached to each picture.
I was trying this app with my Sony Xperia L with JellyBean 4.2.2 and it takes burst shots of any number I have input. I tried to run my App in 4.4.4 and it runs basically, open the number of cameras, but i click to 'take' picture, my app crashes.
NOTE:
Behind this take picture button is kinda loads of work loadI know it sounds stupid to put up all things in main activity, but i dont know how to take off the load.
The fact is its running on 4.2.2 as expected (with many errors in LOGCAT but still running cool) and it crashes when i click 'Snap' in 4.4.4.
in main activity, I am taking jpeg PictureCallBacks and put up the gps listener, pushing to make a photofile with the EXIF DATA embedded and all in MAIN ACTIVITY. here is the picture
You are not allowed to use the android.intent.action.MEDIA_MOUNTED broadcast anymore on Android 4.4, it's protected. Try to use ACTION_MEDIA_SCANNER_SCAN_FILE instead.
See this question, or also this one.

While selecting an image the app restarts on S3

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.

Android tablet camera not working

I am developing an application for Android ICS's 7 inch tablet. In application there is use of camera function to capture image. I allocate camera when somebody opens activity and after work completes camera releases. This is working fine. When I test this thing for 50 times continually with 4~5 frequency of opening and closing activity, application do not respond to application, Neither for in built applications and suddenly screen gets black and I need to restart system again to continue previous work. Why this problem is coming in system? Is any solution. Thanking you for reply.
It could be to do with the Nexus 7's lack of a back facing camera. This can cause problems as specified here
I can't think of anything else right now. Try adding a stack trace to your answer so we can see what went wrong.

Android Camera really choppy on Samsung Galaxy Tab with AIR Application

I'm building an AIR Application for Android devices and I'm using the Camera.
I found a really strange behaviour. When I first start the app and the camera initializes, I get around 1fps(!).
If I then press the home Button and klick on the app icon again, it's all good and I get the full framerate.
This same behaviour also occurs within the Tour de Mobile Flex app when I start the Raw Camera part.
As soon as I press home and then return to the app, everythings fine...
Anybody out there having the same issues and maybe a soulution?
Help is highly apreciated.
This is a bug in Adobe AIR that is fixed and soon to be released.
http://forums.adobe.com/message/3357078#3357078
Set <renderMode>direct</renderMode> in your app.xml. This configuration solve my problem

Categories

Resources