0

I am working on a application which upload images and videos to server. User can create a queue and upload files so it will take a lot of time to finish uploading, so while uploading we set the idle timer disabled to true

[[UIApplication sharedApplication] setIdleTimerDisabled:YES];

  But problem is that its working fine in WiFi network but sometimes its not working when i am in 3G network. Is apple overriding this call because 3G consumes more battery? If so can I stop the screen from sleeping.

My requirement is that the videos should continue upload even on 3G Thanks in advance,

sachin
  • 1,015
  • 4
  • 11
  • 24
  • IMHO 3G is not disabled in sleep so when you're downloading on 3G and the screen lock is activated, the d/l still continues. –  Jul 20 '12 at 05:54

1 Answers1

0

At last i solved this issue by calling below function every 10 second.

-(void) sleepModeDisable{
    [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
    [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
}
sachin
  • 1,015
  • 4
  • 11
  • 24