Just a simple gem to send push notificaitons through Ionic Push API.
Add this line to your application's Gemfile:
gem 'ionic_push'
And then execute:
$ bundle
Or install it yourself as:
$ gem install ionic_push
Before all You'll need your Ionic API TOKEN and a Security Profile. For more details about Ionic Push see the official documentation.
You'll have create a configuration file.
Ex.initializers/ionic_push.rb
IonicPush.configure do |config|
config.api_key = '<YOUR-API-KEY>'
config.profile = '<YOUR-SECURIY-PROFILE>'
end
IonicPush.push(['your', 'devices', 'tokens'], { title: 'Push Title', message: 'Push Message' })
notification_params = {
title: 'Push Title',
message: 'Push Message',
ios: {
message: "Hello iOS",
},
android: {
message: "Hello Android"
}
}
IonicPush.push(['your', 'devices', 'tokens'], notification_params)
notification_params = {
title: 'Push Title',
message: 'Push Message',
android: {
data: "https://pbs.twimg.com/profile_images/617058765167329280/9BkeDJlV.png"
}
}
IonicPush.push(['your', 'devices', 'tokens'], notification_params)
notification_params = {
title: 'Push Title',
message: 'Push Message',
android: {
message: 'Hello Android',
icon: 'ionitron.png'
},
ios: {
message: 'Hello iOS',
badge: 3,
sound: 'ios-sound.wav'
}
}
IonicPush.push(['your', 'devices', 'tokens'], notification_params)
- Basic API Usage
- Adding custom data to your notificaitons
- Phonegap Push plugin options
- Customizing Notification appearance
- Sengind Push to Ionic User ID's
- Scheduling a push for later delivery
- Templating your push notification
- Notification's priority
- Checking the status of push
After checking out the repo, run bin/setup
to install dependencies. Then, run rake spec
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags, and push the .gem
file to rubygems.org.
Bug reports and pull requests are welcome on GitHub at https://github.com/kidush/ionic_push.