[android-developers] Re: Killi Process with files on SD card

2010-10-07 Thread Heartnet
I have found a solution on 2.2 : before receiving the intent ACTION_MEDIA_EJECT, there is a few line in the logcat that indicate the SD card is going to be unmounted. So I just check in the last few logcat lines with Runtime.getRuntime().exec(new String[]{logcat, -d, -t 10, VoldCmdListener:V

[android-developers] Re: Killi Process with files on SD card

2010-10-06 Thread mkellner
On Aug 28, 3:06 pm, Ken Yang kuas216...@gmail.com wrote: I did it the same way... but it only works on 1.6、2.1 device.. it's doesn't work on 2.2 device, no matter on nexus one or 2.2 emulator... My code was working fine, receiving ACTION_MEDIA_EJECT when the user unmounted the /sdcard.

[android-developers] Re: Killi Process with files on SD card

2010-10-01 Thread Heartnet
Hi, I'm having the same kind of issue, I can usually receive the media_eject intent, but I dont get it when my app is using the sd card at the same time, because it kill the process before i receive the intent =/ So i cant even try to close my file on the sdcard before the sdcard get unmounted,

[android-developers] Re: Killi Process with files on SD card

2010-10-01 Thread Heartnet
On 7 sep, 17:30, Zhenyu Jiang jfo...@gmail.com wrote: i think the problem here is that you really do not known when the user is going tounmountthe sdcard.. it can happen at any moment. so the only way is to make those open file closed, which seams to be difficult, especially for files

Re: [android-developers] Re: Killi Process with files on SD card

2010-09-07 Thread Zhenyu Jiang
i think the problem here is that you really do not known when the user is going to unmount the sdcard.. it can happen at any moment. so the only way is to make those open file closed, which seams to be difficult, especially for files read/written in a separate thread async... since i met with the

[android-developers] Re: Killi Process with files on SD card

2010-09-06 Thread redehm
I am experiencing something similar, except on a sporadic basis. For the most part, my application, on receipt of an ACTION_MEDIA_EJECT event, is able to close files and return before the reaper arrives to clean-up. However, sometimes, when the application is writing data to one of the files,

Re: [android-developers] Re: Killi Process with files on SD card

2010-09-06 Thread Frank Weiss
Can this data be written sooner rather than later? Can you put it or part of it in SQLite, where it's quicker to update just a part of a large data model? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Killi Process with files on SD card

2010-08-30 Thread Ken Yang
I find it works on 2.1 and 1.5 device(emualtor), but it doesn't work on my nexus one(2.2) or 2.2 emulator? why? On 7月15日, 上午12時23分, Streets Of Boston flyingdutc...@gmail.com wrote: It works fine for me on my motorola droid, nexus one and G1. Did you properly register your broadcast receiver,

[android-developers] Re: Killi Process with files on SD card

2010-08-30 Thread Ken Yang
Hi, Excuse.. I did it the same way... but it only works on 1.6、2.1 device.. it's doesn't work on 2.2 device, no matter on nexus one or 2.2 emulator... how can you do that on nexus one? this is my code public class serviceSDcard extends Service { private static Context

[android-developers] Re: Killi Process with files on SD card

2010-07-14 Thread Streets Of Boston
It works fine for me on my motorola droid, nexus one and G1. Did you properly register your broadcast receiver, both in code and in the Android Manifest XML? On Jul 13, 7:21 pm, ls02 agal...@audible.com wrote: I tried this on Motorola DROID and it does not work. I do not receive any events in

[android-developers] Re: Killi Process with files on SD card

2010-07-13 Thread ls02
I tried this on Motorola DROID and it does not work. I do not receive any events in receiver onReceive. On Jul 10, 9:23 pm, Streets Of Boston flyingdutc...@gmail.com wrote: Register your broadcast receiver like this: IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_EJECT);

[android-developers] Re: Killi Process with files on SD card

2010-07-11 Thread Streets Of Boston
The CursorUtils class is one I wrote myself to deal with external storage and phone storage (HTC Incredible). On Jul 10, 9:30 pm, Mark Murphy mmur...@commonsware.com wrote: Where is this CursorUtils class that you are using? I don't see it in the SDK or source code. Thanks! On Sat, Jul 10,

[android-developers] Re: Killi Process with files on SD card

2010-07-10 Thread ls02
I register for this broadcast. However the process is killed before I receive any broadcast event. On Jul 10, 2:59 pm, Dianne Hackborn hack...@android.com wrote: There is a broadcast sent when the SD card is being unmounted (sorry I don't remember the name off-hand).  You should close all your

[android-developers] Re: Killi Process with files on SD card

2010-07-10 Thread Streets Of Boston
Register your broadcast receiver like this: IntentFilter intentFilter = new IntentFilter(Intent.ACTION_MEDIA_EJECT); intentFilter.addAction(Intent.ACTION_MEDIA_MOUNTED); intentFilter.addDataScheme(file); intentFilter.addDataAuthority(*, null); intentFilter.addDataPath((mIsExternal

Re: [android-developers] Re: Killi Process with files on SD card

2010-07-10 Thread Mark Murphy
Where is this CursorUtils class that you are using? I don't see it in the SDK or source code. Thanks! On Sat, Jul 10, 2010 at 9:23 PM, Streets Of Boston flyingdutc...@gmail.com wrote: Register your broadcast receiver like this: IntentFilter intentFilter = new