Flashbuilder 4.5 Android Camera restarting my application

孤者浪人 提交于 2019-12-11 15:38:22

问题


I'm working with FlashBuilder 4.5 and trying to make an app for Android that uses the camera function. It works fine on iOS, but in Android, I am able to take the picture using the android Camera UI, but anything I do after that (hit cancel, or Accept), it restarts my application. I am taken to the splash screen and the app starts over. I do not have any sort of Event.DEACTIVATE listeners going on. I did, but I have them commented out. I am able to click Home, to return to the "desktop" of the phone, and when I relaunch my app, it returns to where I left it. The only problem is when I go out to the Camera from within my app, it causes my app to lose focus and forces a restart when I try and go back to it. I have scoured google for someone else with this problem but no one else seems to have it. Any thoughts?


回答1:


This problem was driving me crazy as well, but it can be solved by enabling session persistence on the main ViewNavigator or TabbedViewNavigator page.

See Adobe Flex 4.6 * Enable persistence in a mobile application for more information.




回答2:


I have been experiencing this problem for several months, both through FlashBuilder 4.5 (with Flex 4.5 and 4.5.1 sdk's) and through pure Flash (using Flex 4.6 sdk). I was hoping it was some sort of bug only in FB, but apparently not.

I notice that the problem is intermittent, but I can't predict when it will fail. Sometimes it fails on taking a new picture (Camera) and sometimes it fails on retrieving images from the CameraRoll. Any situation like this is obviously unacceptable, but I'm trying to figure out the situation in which it occurs.

Usually when I restart the phone, the problem will go away for some time. That makes me think about some memory thing, but I haven't confirmed anything.

I made a very simple test case in which it fails (just takes a picture), when I see it failing in my main app. I submitted it to Adobe as a bug (#3099508), but I don't know if they can reproduce it reliably.

Have you done any memory profiling to see if there is something up when the problem occurs? My only "hail Mary" option I can think of is to use a Native Extension for the camera, but I haven't tried that yet.



来源:https://stackoverflow.com/questions/8512165/flashbuilder-4-5-android-camera-restarting-my-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!