Author Topic: Push notifications to iPhone  (Read 1672 times)

Rip

  • Newbie
  • *
  • Posts: 23
Push notifications to iPhone
« on: September 01, 2009, 04:14:34 AM »
I just came across this app in the appstore.

Here's the english translation:

Notifications allows you to send yourself notifications through a web interface, or a standard REST API.

Notifications also allows you to check the latency of the notifications going through the servers.



Could this be used for IOBridge notifications rather than going through Twitter?

More info here.

Rip

  • Newbie
  • *
  • Posts: 23
Re: Push notifications to iPhone
« Reply #1 on: September 01, 2009, 07:03:28 AM »
Well, I decided to splash out and buy the app - £1.59!

It works well and has a web interface for sending messages direct to your iPhone. It also gives you an email address to send notifications to.

Sending from the web interface gives a nice clean message, rather than the cluttered email notifications.



Logging in gives access to other stuff that I won't at this stage pretend to understand however, I'm sure the facility could be incorporated into Actions to deliver nice clean iPhone messages.

Examples of the REST API (whatever that is):

RUBY
Code: [Select]
#!/usr/bin/env ruby
SINGLE_TOKEN = "[color=red]token goes here[/color]"

require 'rubygems'
require 'mechanize'
VERSIONLIB = '0.1'
HOSTNAME = "https://www.appnotifications.com"

a = WWW::Mechanize.new { |agent|
  agent.user_agent = "AppNotifications Ruby #{VERSIONLIB}"
}

# Send a notification
a.post("#{HOSTNAME}/account/notifications.xml",
  { :user_credentials => SINGLE_TOKEN,
     'notification[message]' => ARGV.join(" ")}) do |request|

end

CURL
Code: [Select]
# Send a notification
$ curl -d user_credentials=[color=red]credentials go here[/color] \
-d "notification[message]=my message" \
-d "notification[long_message]=<b>Some HTML for the full layout page notification</b>" \
-d "notification[title]=A notification title" \
-d "notification[long_message_preview]=the notif preview" \
-d "notification[message_level]=2" \
-d "notification[silent]=0" \
-d "notification[action_loc_key]=Approve me" \
-d "notification[run_command]=http://maps.google.com/maps?q=cupertino" \
https://www.appnotifications.com/account/notifications.xml

# Get your user credentials
$ curl -d 'user_session[email]=youremail@gmail.com' \
  -d 'user_session[password]=YOURPASS' \
https://www.appnotifications.com/user_session.xml
     

« Last Edit: September 01, 2009, 07:07:50 AM by Rip »

Rip

  • Newbie
  • *
  • Posts: 23
Re: Push notifications to iPhone
« Reply #2 on: September 01, 2009, 07:06:13 AM »
Well, I decided to spash out and buy the app £1.59!

It works well and has a web interface for sending messages direct to you iPhone. It also gives you an email address to send notifications to.

Sending from the web interface gives a nice clean message, rather than the email notification.



Logging in gives access to other stuff that I won't at this stage pretend to understand however, I'm sure the facility could be incorporated into Actions to deliver nice clean iPhone messages.

Examples of the REST API (whatever that is):

RUBY
Code: [Select]
#!/usr/bin/env ruby
SINGLE_TOKEN = "[color=red]token goes here[/color]"

require 'rubygems'
require 'mechanize'
VERSIONLIB = '0.1'
HOSTNAME = "https://www.appnotifications.com"

a = WWW::Mechanize.new { |agent|
  agent.user_agent = "AppNotifications Ruby #{VERSIONLIB}"
}

# Send a notification
a.post("#{HOSTNAME}/account/notifications.xml",
  { :user_credentials => SINGLE_TOKEN,
     'notification[message]' => ARGV.join(" ")}) do |request|

end

CURL
Code: [Select]
# Send a notification
$ curl -d user_credentials=[color=red]credentials go here[/color] \
-d "notification[message]=my message" \
-d "notification[long_message]=<b>Some HTML for the full layout page notification</b>" \
-d "notification[title]=A notification title" \
-d "notification[long_message_preview]=the notif preview" \
-d "notification[message_level]=2" \
-d "notification[silent]=0" \
-d "notification[action_loc_key]=Approve me" \
-d "notification[run_command]=http://maps.google.com/maps?q=cupertino" \
https://www.appnotifications.com/account/notifications.xml

# Get your user credentials
$ curl -d 'user_session[email]=youremail@gmail.com' \
  -d 'user_session[password]=YOURPASS' \
https://www.appnotifications.com/user_session.xml
     



I've found the notifications to be really fast and none get missed.

Can someone with more knowledge than me let me know if this is worth pursuing?

SMyers

  • Administrator
  • Jr. Member
  • *****
  • Posts: 93
    • ioBridge Support Team
Re: Push notifications to iPhone
« Reply #3 on: September 01, 2009, 09:38:52 PM »
Just skimming over it I think you could make a system to do what you want. I use a similar program Prowl (http://prowl.weks.net/) to send custom PUSH notifications to my iphone. It allows you to make a POST call to initiate a new message. This can be done with a serial board and your ioBridge.

 

Rip

  • Newbie
  • *
  • Posts: 23
Re: Push notifications to iPhone
« Reply #4 on: September 02, 2009, 11:41:45 AM »
I'd love to know how to do that. I already use Prowl (It's excellent) and have serial board and display.

Could you let me have some details please?