Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 6, 2013, 11:29 PM   #1
Mav3rick40
macrumors newbie
 
Join Date: Feb 2013
Help!!!! - Push Notifications activated by Location Services?

Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2
Mav3rick40 is offline   0 Reply With Quote
Old Mar 7, 2013, 07:38 AM   #2
waterskier2007
macrumors 68000
 
waterskier2007's Avatar
 
Join Date: Jun 2007
Location: White Lake, MI
Send a message via AIM to waterskier2007
Quote:
Originally Posted by Mav3rick40 View Post
Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2
It actually may not even be a push notification. If you figure out some way to determine when you need to send a notification you can just send a local notification scheduled for one second in the future (or some small duration of time so that it gets fired right away).

There is a google places API that can find the location of things around the user, you could use that to find local stuff. After that, figuring out things like "Does XXXX have a special right now," I would leave up to you

Visit the page here to learn about local notifications
__________________
2012 Mac Mini, 2.6 GHz, 16GB RAM, 1TB HDD
2.4Ghz 15" Macbook Pro
16 GB iPhone 5 : 32 GB iPhone 4S : 16 GB iPad 3
16 GB Nexus 7 (2012)
waterskier2007 is offline   0 Reply With Quote
Old Mar 7, 2013, 08:07 AM   #3
Mav3rick40
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Quote:
Originally Posted by waterskier2007 View Post
It actually may not even be a push notification. If you figure out some way to determine when you need to send a notification you can just send a local notification scheduled for one second in the future (or some small duration of time so that it gets fired right away).

There is a google places API that can find the location of things around the user, you could use that to find local stuff. After that, figuring out things like "Does XXXX have a special right now," I would leave up to you

Visit the page here to learn about local notifications
Awesome, thanks for the quick response and information. I'll look into it. Thanks again.
Mav3rick40 is offline   0 Reply With Quote
Old Mar 8, 2013, 06:51 AM   #4
waterskier2007
macrumors 68000
 
waterskier2007's Avatar
 
Join Date: Jun 2007
Location: White Lake, MI
Send a message via AIM to waterskier2007
Quote:
Originally Posted by Mav3rick40 View Post
Awesome, thanks for the quick response and information. I'll look into it. Thanks again.
No problem. The huge advantage to using local notifications is that they are created on the device, so no web server is necessary to send them out
__________________
2012 Mac Mini, 2.6 GHz, 16GB RAM, 1TB HDD
2.4Ghz 15" Macbook Pro
16 GB iPhone 5 : 32 GB iPhone 4S : 16 GB iPad 3
16 GB Nexus 7 (2012)
waterskier2007 is offline   0 Reply With Quote
Old Mar 8, 2013, 08:16 AM   #5
KoolStar
macrumors Demi-God
 
KoolStar's Avatar
 
Join Date: Oct 2006
Location: Kentucky
Send a message via AIM to KoolStar Send a message via Skype™ to KoolStar
Your going to want to use the region tracking of core location and significant location change as to not impact the battery as much.
__________________
"Innovation distinguishes between a leader and a follower." : S.J.
KoolStar is offline   0 Reply With Quote
Old Mar 8, 2013, 04:12 PM   #6
moonman239
macrumors 65816
 
Join Date: Mar 2009
Quote:
Originally Posted by KoolStar View Post
Your going to want to use the region tracking of core location and significant location change as to not impact the battery as much.
This may not be sufficient in some cases. If I remember correctly, I read a blog post where a guy did a test run. The testers drove a few miles before their devices triggered the "significant change" event. Maybe Apple changed the definition of "significant location change" so that it would actually be useful in this context. I say a better idea would be to get the user's location at least once every few seconds. Don't turn the GPS receiver on.
__________________
The funny thing about this signature is that by the time you get to the end of it, you will have spent between five and ten seconds doing so.
moonman239 is offline   0 Reply With Quote
Old Mar 8, 2013, 06:40 PM   #7
Mav3rick40
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Quote:
Originally Posted by moonman239 View Post
This may not be sufficient in some cases. If I remember correctly, I read a blog post where a guy did a test run. The testers drove a few miles before their devices triggered the "significant change" event. Maybe Apple changed the definition of "significant location change" so that it would actually be useful in this context. I say a better idea would be to get the user's location at least once every few seconds. Don't turn the GPS receiver on.
Ok, but a push notification, doesn't it send it to everyone with that app?
Mav3rick40 is offline   0 Reply With Quote
Old Mar 8, 2013, 07:09 PM   #8
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
Quote:
Originally Posted by moonman239 View Post
I say a better idea would be to get the user's location at least once every few seconds. Don't turn the GPS receiver on.
It's gonna be kinda hard to get the user's location without the GPS receiver turned on.
__________________
dejo is offline   0 Reply With Quote
Old Mar 8, 2013, 08:00 PM   #9
Mav3rick40
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Quote:
Originally Posted by dejo View Post
It's gonna be kinda hard to get the user's location without the GPS receiver turned on.
That is true.
Mav3rick40 is offline   0 Reply With Quote
Old Mar 9, 2013, 06:46 AM   #10
MacMan988
macrumors 6502a
 
Join Date: Jul 2012
Quote:
Originally Posted by Mav3rick40 View Post
Hello, my name is Marc and I'm new to the forums, and I'm a first year student trying to make an iPhone/ipad app. It's a radio app the customer wants push notifications, where when you drive by like Walmart and if they have a special on soda it will push it to the app. I've tried Google to find out how to implement it but can't find anything so I don't know if it's even possible to do that. Thought I would ask here see if anyone can help.

Thanks in advance.

Sent from my ADR6400L using Tapatalk 2
I have used pushwoosh push notifications in an app and they provide location based push notification service although I havent used that specific feature from pushwoosh.
MacMan988 is offline   0 Reply With Quote
Old Mar 11, 2013, 06:09 PM   #11
Mav3rick40
Thread Starter
macrumors newbie
 
Join Date: Feb 2013
Thanks for all the help I appreciation all the information.
Mav3rick40 is offline   0 Reply With Quote
Old Mar 12, 2013, 08:13 AM   #12
waterskier2007
macrumors 68000
 
waterskier2007's Avatar
 
Join Date: Jun 2007
Location: White Lake, MI
Send a message via AIM to waterskier2007
Quote:
Originally Posted by Mav3rick40 View Post
Ok, but a push notification, doesn't it send it to everyone with that app?
No, when a user agrees to get push notifications, you should handle that in the App Delegate. You are given a unique "token" for each user (a unique identifier string) that you would then store on your server somewhere, tying it to that specific user. When you wanted to send a push notification to that user, you provide that token as part of the bundle you send to apples push notification service, and it gets sent to that specific user.
__________________
2012 Mac Mini, 2.6 GHz, 16GB RAM, 1TB HDD
2.4Ghz 15" Macbook Pro
16 GB iPhone 5 : 32 GB iPhone 4S : 16 GB iPad 3
16 GB Nexus 7 (2012)
waterskier2007 is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Location icon activated when using camera app sunking101 iOS 7 14 Mar 17, 2014 05:07 AM
Location services! MaximoMark iPhone 2 Dec 8, 2013 11:58 AM
Anyway to create notifications activated by stimulus? urunmeri iPhone 2 Dec 24, 2012 12:09 AM
YouTube using location (but location services are off) Roc P. iOS 6 23 Oct 28, 2012 09:02 AM
Notifications 'current weather' location services SomeonePlzHelp iOS 6 8 Sep 22, 2012 02:21 PM

Forum Jump

All times are GMT -5. The time now is 06:05 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC