Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 10-30-2009, 09:07 AM   #1 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
loloviolo is on a distinguished road
Default Avoid Alerts

Hi,

I wrote an app that run some batches/checkings on my server.

I run this app at night so I prevented Iphone going Standby by adding :
PHP Code:
[[ UIApplication sharedApplication setIdleTimerDisabledYES ]; 
Now the problem is that When I got Alert on top of my app (text received for example) The Alert stay displayed and Iphone go StandBy that cause my app to quit.

I tried the following bt not working
PHP Code:
    // Avoid Incomming Alerts
    
[[ UIApplication sharedApplication unregisterForRemoteNotifications]; 
Thanks for your Help.

LoLoVioLo
loloviolo is offline   Reply With Quote
Old 10-30-2009, 05:10 PM   #2 (permalink)
Beast Mode
 
Join Date: Dec 2008
Age: 21
Posts: 1,971
Bertrand21 is on a distinguished road
Default

Code:
[[ UIApplication sharedApplication ] unregisterForRemoteNotifications]
this code is for stopping push notifications from WITHIN your app. There is no API that you can stop regular notifications (texts, calls) from happening in the SDK
__________________
Haters gonna Hate
Likers gonna Like
Bertrand21 is offline   Reply With Quote
Old 10-30-2009, 05:16 PM   #3 (permalink)
Registered Member
 
kierster's Avatar
 
Join Date: Mar 2009
Location: Canada!
Posts: 261
kierster is on a distinguished road
Default

According the apple's guidelines, your app should allow the iphone to continue its normal dealings (receiving text messages). Even if you found out how, Apple would reject an app that un-connected you from the cell network temporarily.
__________________
Check out some of my apps:
Boltz ($0.99)
FreeBoltz (FREE)
Cross Digits ($2.99) [Universal!]
Cross Digits Lite (FREE) [Universal!]
Targets ($0.99) (Facebook | YouTube Demo)
Greg's Apps
kierster is offline   Reply With Quote
Old 10-31-2009, 05:00 AM   #4 (permalink)
Registered Member
 
Join Date: Oct 2009
Posts: 3
loloviolo is on a distinguished road
Default

Thanks a lot for your answers and advices.

My aim is not to avoid any communication but only avoid Alert popup.

There is something strange to me on this case. My app is running a 1min timer and process some batches like this
PHP Code:
- (voidmyProcess {    
    if (
onoffSwitch.on) {
        
// Avoid Iphone to go StandBy
        
[[ UIApplication sharedApplication setIdleTimerDisabledYES ];    
        
// Process Sending
        
[self sendProcess];
    }

That means each minute the IdleTimer that put Iphone to StandBy is Disable.
This working perfectly fine but as soon as an Alert pops up - Even my app is still processing under the Alert Window - and even Idle Timer is still being disabled each minute - Iphone enter standby

Don't you think it is strange ?

Thanks for your help
loloviolo is offline   Reply With Quote
Old 01-11-2010, 05:56 AM   #5 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 4
seligmanc is on a distinguished road
Default

Hi there,

I have been building an alarm clock ..but with a difference

I came across a similar problem when using:
[[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ];

I read online that if you regularly reset the idleTimer by putting the following into a 30 second NSTimer, then it should work:

{
[[ UIApplication sharedApplication ] setIdleTimerDisabled: NO ];
[[ UIApplication sharedApplication ] setIdleTimerDisabled: YES ];
}

It does seem to have helped, but last night I received a Calendar Event Alert and this morning my iPhone had gone into Standby

Has anyone else come across this problem and knows of a fix?

Cheers
seligmanc is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 346
10 members and 336 guests
alexP, ClerurcifeDer, Duncan C, givensur, glenn_sayers, guusleijsten, JmayLive, Punkjumper, whitey99, yys
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,649
Threads: 94,114
Posts: 402,883
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Anwerbl
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 09:40 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0