Note that there are some explanatory texts on larger screens.

plurals
  1. PONotifications System for Social Android App - Push vs. Polling & How to make a server "Push"
    primarykey
    data
    text
    <p>For those of you wanting to just cut to the chase and know what im asking. My questions are numbered and bold-ed in the paragraph below.</p> <p>Im having a heck of a time trying to figure out <strong>1.)how to implement a proper notification system for a Android social networking app?</strong> So far all ive gathered is that there are 2 choices, polling vs. pushing , pushing is better than polling bc it conserves battery and the recommended way of pushing notifications is through the Google Cloud Messaging(GCM) , but what I dont get is <strong>2.)what makes my server push?</strong> and/or <strong>3.)how to setup my server side to push when there is new data available?</strong> Further research has hinted that Facebook is only able to achieve their nearly real-time notification system bc they have some sort of server side api/library/technology called thrift or something like that that detects whos online and who isnt (not positive why this matters yet) . <strong>4.)Is there anyone with some tips for me who has tried to implement a social notification system similar to Facebook ?</strong></p> <p>Other important info:</p> <ul> <li><p>Im currently using a Codeigniter Rest server for a api(PHP)</p></li> <li><p>I would prefer php solutions that I can implement using my existing API UNLESS there is a solution in another language(Java,Ruby, Javascript) that can be implemented independently( aka I can still use my existing api for everything else besides notifications)</p></li> <li><p>I am not looking for someone to explain how to use GCM or direct me to a tutorial. I have done research and gotten several "examples" of GCM push notifications up and running , but none of the tutorials ive found so far show me how i can make my server push on its own. </p></li> <li><p>The types of notifications I need to make to users are things like new friend requests, new private messages from other users , new comments on content posted by the user being notified , new comments on content the user has commented on ( similar to how fb notify's you if a comment is added to a status uve commented on) </p></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COPush is achieved by the use of sockets. Instead of having many different sockets open on the android for pushing notifications, GCM allows a single socket which then distributes the notification to the appropriate app (this is an assumption as I have no idea about GCM). You can create a socket server using PHP which pushes messages to GCM. I don't have more time to clarify. Maybe later.
      singulars
    2. COIts a start I suppose. I will look more into "sockets" , but I still dont understand how my server will "push" on its own only when new data is avalible and if GCM is the end all be all recommended solution for how to send out push notifications why isnt there a good tutorial that that shows a implementation of a mysql/php or mysql/java server that pushes automatically when a record is added? Shouldnt this be something fairly commonly needed by developers? Almost every social android app implements a system similar to facebooks these days yet ive found no "auto push" examples/tuts
      singulars
    3. COMy first search on Google with "google cloud messaging" and the first result I checked: http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/ You need to work on your google-fu.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload