Intent for download cancellation

FTP client for Android handsets.
Post Reply
RadikalEdward
Posts: 2
Joined: Wed Mar 23, 2011 10:30 am
AntiSpam sum: 8

Intent for download cancellation

Post by RadikalEdward »

Hye.

I am using AndFTP for platform test purposes.
So we have an application that sends Intents to the phone in order to perform some measurements in certain conditions.

Is there any Intent that exist (and that may not be documented maybe) and that could be used to cancel a running FTP transfer ?
For example, my test script sends an Intent in order to start a FTP transfer. I would like to stop it after a certain amount of time (e.g: after 30 seconds) using another Intent.

Thank you for your help.
Best Regards

support
Posts: 853
Joined: Sun Apr 20, 2008 4:40 pm

Re: Intent for download cancellation

Post by support »

No, there only way to stop transfer is to press "Cancel" button.
A workaround would be to start "Browse" Intent, it should stop all currents transfer:
http://www.lysesoft.com/products/andftp/intent.html

RadikalEdward
Posts: 2
Joined: Wed Mar 23, 2011 10:30 am
AntiSpam sum: 8

Re: Intent for download cancellation

Post by RadikalEdward »

Thank you for your help.

The suggested method seems to work, but not in all cases.
For example, if the AndFTP activity is on the top, the Intent seems to be ignored.
But if I remove this activity from the top (e.g: pressing the "Home" button), the process is actually stopped.

I also tried the "ActivityManager.killAll..." method which seems to work with the same limitation as above.
I will look further for other clues.

Post Reply