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 01-12-2010, 05:03 PM   #1 (permalink)
Registered Member
 
Join Date: Oct 2008
Location: London, UK
Posts: 250
mattjgalloway is on a distinguished road
Default Detect system UIAlertViews?

Does anyone know of a way to detect when a system alert (e.g. SMS, push, etc) comes up over your app? I'd like to be able to detect it and I think some apps (mostly games) seem to do it so there must be a way.

Any ideas?
__________________
Beard Booth HD - See what you'd look like with a beard today!

My iPhone Apps
My iPhone Tutorials
mattjgalloway is offline   Reply With Quote
Old 01-12-2010, 11:28 PM   #2 (permalink)
A Young Perfectionist
 
atothendrew's Avatar
 
Join Date: Jun 2009
Posts: 111
atothendrew is on a distinguished road
Send a message via AIM to atothendrew
Default

Quote:
Originally Posted by mattjgalloway View Post
Does anyone know of a way to detect when a system alert (e.g. SMS, push, etc) comes up over your app? I'd like to be able to detect it and I think some apps (mostly games) seem to do it so there must be a way.

Any ideas?
So what do you want to do with them? Pause your application? or block the alerts themselves?
__________________
Work Progress - The Perfect app for all!

The Advanced Random Number Generator

FPS Stats - Avaliable now!
The users are LOVING it! and new features are added Weekly!
"This is by far the greatest app I have ever used. Great Idea!" - KyRo .LV, 5 stars

atothendrew is offline   Reply With Quote
Old 01-13-2010, 02:53 AM   #3 (permalink)
Registered Member
 
Join Date: Oct 2008
Location: London, UK
Posts: 250
mattjgalloway is on a distinguished road
Default

Yep, I want to pause the app. Any ideas? I know one game I have does it (Let's Golf - was free during the 12 days of Christmas and is a great game!).
__________________
Beard Booth HD - See what you'd look like with a beard today!

My iPhone Apps
My iPhone Tutorials
mattjgalloway is offline   Reply With Quote
Old 01-13-2010, 01:09 PM   #4 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
smasher will become famous soon enough
Default

See if you get an applicationWillResignActive message in your app delegate.

iPhone Dev Center: UIApplicationDelegate Protocol Reference
__________________

Free Games!
smasher is offline   Reply With Quote
Old 01-13-2010, 05:49 PM   #5 (permalink)
Registered Member
 
Join Date: Oct 2008
Location: London, UK
Posts: 250
mattjgalloway is on a distinguished road
Default

Oooo, that looks exciting! I will check that one out and report back. Thanks!
__________________
Beard Booth HD - See what you'd look like with a beard today!

My iPhone Apps
My iPhone Tutorials
mattjgalloway is offline   Reply With Quote
Old 01-14-2010, 03:29 AM   #6 (permalink)
Registered Member
 
Join Date: Oct 2008
Location: London, UK
Posts: 250
mattjgalloway is on a distinguished road
Default

Quote:
Originally Posted by smasher View Post
See if you get an applicationWillResignActive message in your app delegate.

iPhone Dev Center: UIApplicationDelegate Protocol Reference
Thankyou! That's exactly what I needed. I should have just looked at the docs in the first place :-S. I thought I had to be honest, but clearly I did a "man look" and didn't actually look properly! I do this now:

Code:
- (void)applicationWillResignActive:(UIApplication *)application {
    // pause
}

- (void)applicationDidBecomeActive:(UIApplication *)application {
    // un-pause
}
__________________
Beard Booth HD - See what you'd look like with a beard today!

My iPhone Apps
My iPhone Tutorials
mattjgalloway 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: 329
11 members and 318 guests
2Apps1Day, akacaj, Domele, GraffitiCircus, michelle, NetGuru, NSString, Paul Slocum, Sloshmonster, soohyun, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,650
Threads: 94,114
Posts: 402,886
Top Poster: BrianSlick (7,990)
Welcome to our newest member, soohyun
Powered by vBadvanced CMPS v3.1.0

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