Implement Android GCM on Ruby on Rails 4 server using rpush gem? - android

I'm developing an Android app and I need to implement a GCM service for it. The server works on Ruby on Rails 4 and it uses the gem rpush (I can't change the gem because this was already used by someone else to implement the equivalent service for iOS). I really have no idea on how to start on this, becasue I'm pretty new developing in Android.
Is there any tutorial out there that you could recommend? or what are the steps to implement this service in my server?
Thanks in advance.

Well, I finally decided to stop using rpush pretty much because the docs sucks. I am now using Parse to send push notifications. It works pretty well so that's my recommendation.
Hope it works for you guys!

Rpush provides API for sending push messages via GCM. Additionally you can get inspired by the existing code for APNS (iOS pushes).

You can check this blog post that contains a minimal working example of an Android App with Rails server:
http://mateuyabar.com/blog/android/rubyonrails/gcm/2015/05/13/Google-Cloud_Messaging-with-Ruby-On-Rails.html
Or check its source at:
https://github.com/mateuyabar/blog_gcm_and_ror

Related

Ionic.io send push notification from node js server

I have successfully coded my ionic app to receive and display push notification from Ionic.io. I am deploying on a real Android device.
For this I am sending notifications from the web dashboard.
Now I want to move this mechanism to my node js server to send the push notifications from there to my ionic app. I am following the guidelines mentioned on ionic io's website but it is not working.
I have been struggling with this for hours and couldn't know what the blocking is, I am not sure if the POST parameters on the site are outdated or there is a specific way of achieving that.
What is the right way to send those notifications from a node js server?
I ended up using node-gcm for this task.
To implement it I followed the tutorials tutorial-1 and tutorial-2.
Update 2016
I forgot to mention that the following Youtube tutorial was extremely helpful too on the angular's side of ionic.

Phonegap and Parse.com Push Notifications android

I am creating an app using html,jquery,php and phone gap and i want to send push notification using parse.I don't know how to do that.
I have seen an example in SO But it is for ios. I need it for android. Will this work for android.
Please help me. Thank You.
Have a look at this answer I've just posted, I've just got the Android Parse PNs working:
How do I get Parse.com Push Notifications working in a Cordova/Phonegap Android app?
That will help you get the app to recieve push notifications. To trigger them from PHP you'll need to use the REST API or a Third Party PHP library:
https://parse.com/docs/rest
https://github.com/apotropaic/parse.com-php-library

How to Broadcast a Notification to the app when data is updated on Server?

I am working on an android app where I need to send a notifications to application from server when data on the server is updated. I have read about GCM and rss feed , but dont know how to implement it.
I want to know which procedure or technique is the best for this and how could I implement it. Please help I am eager to start working on this?
Here you will find steps to follow to create simple GCM client.
Also, a set of samples will be available when you install Extras/Google Cloud Messaging for Android Library from the SDK Manager. After installation, the sample sources will be available at %android install path%\android-sdk\extras\google\gcm\samples\

Server Implementation for Push Notifications Sent Between Android and iPhone Devices

I would like to write an instant messaging mobile application with push notifications. One requirement is to have both an iPhone and Android version able to send push notifications between 2 devices regardless of the device type.
I am having trouble coming up with a best solution to send push notifications for the following 4 cases:
Android client -> server -> Android client.
Android client -> server -> iPhone client.
iPhone client -> server -> iPhone client.
iPhone client -> server -> Android client.
I have a few questions:
Did you find pushd simple to handle your push notifications? Did you run into any unforeseen issues?
What are the pros and cons between creating my own node.js server implementation and using pushd for the 4 cases above (minus learning more from doing it myself)?
Would it be simpler to use a different server implementation such as python or php through Apache?
Were there any resources you found to be critical to writing your own server implementation?
Is there a simpler suggestion for implementing push notifications between 2 cross-platform devices?
I've come across UrbanAirship and Pushwoosh but I don't think they apply to my use cases.
I apologize if this question seems to open-ended for SO but I have been struggling with this for the past few nights and am having a hard time coming up with these answers.
Thanks and I appreciate the help!
Check out Parse.com
Its amazing, and their push notification service is much simplier than creating your own.
Set up an endpoint, gated to a database for your push notifications and post to that service w henever necessary. For clientside code, see here for Android and here for iOS. If you'd like server code, leave a comment and I'll post an edit to this answer,

Push Notifications using Rails server

I have a rails server and a backend. Is it possible to send a push message using my rails server to both iPhone and android app?
Yes, it is possible. Here are gems that I used recently in my projects: Android push service and Apple push service
They are well documented so you should not face big troubles about setup.
I created a gem in order to create a central push notifications, it supports iOS and Android at the moment, but i will add more platforms.
Maybe this will help you
here is the link: https://github.com/NicosKaralis/pushmeup
Try using grocer gem for ios push notifications. Thats pretty easy to setup and get going.

Categories

Resources