Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is best way to communicate between asp.net website activities and android app?

We have a asp.net Web application which has functions of user activities like notification,messages,etc. And we have a native android app for this web app as well. Now we have to make functions of user activities like notification and messaging.

For eg. User A likes or follows User B or does any activity which will give notification to User B. notification or messaging system like facebook. in which if you tag your friend in some activity or like your friend activity then your friend will know via notification in android app as it shows in website

What will be best way or efficient way in android to detect the user activity and get the push notifications get going.

i have done bit of research but not getting the correct idea/track.

i have got some like

1) Android Push Notification using Parse

2) Android Push Notification using GCM

3) Android Service BroadcastReciever

like image 830
Vaibs_Cool Avatar asked Sep 16 '15 07:09

Vaibs_Cool


1 Answers

3) Android Service BroadcastReciever

Pros:

  • no need to change anything in your website API. Your simply download friend's activities each N minutes and check if there are new one.

Cons:

  • battery will be drained very quickly
  • your messages may have some delay between activity and notification about

Do not use this approach.

2) Android Push Notification using GCM

Pros:

  • easy to integrate (mobile)
  • free of charge

Cons:

  • no nice looking form for sending push (only from the code or http-request)
  • works only on the devices with Google Play Services
  • requires additional work on the server (storing user's ids, sending pushes)

1) Android Push Notification using Parse

Pros:

  • easy to integrate (mobile)
  • no need to do on the your server (except initiating push)
  • it have own solution for Push-notification for devices that doesn't have Google Play Services
  • you can send Push from the developer console

Cons:

  • paid (but have some free limit)
  • require some setup and coding in the parse console

My opinion:

If you have your own server(and database) use GCM. Integration with Parse doesn't worth it.

But if you have a lot of users with phones without Google Play Services it make sense to look at Parse.

like image 81
Ilya Tretyakov Avatar answered Nov 14 '22 22:11

Ilya Tretyakov