6

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

Vaibs_Cool
  • 6,126
  • 5
  • 28
  • 61
  • What you want to do actually? `User A likes or follows User B or does any activity which will give notification to User B.` plz explain in detail – M D Sep 16 '15 at 07:19
  • @MD 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. – Vaibs_Cool Sep 16 '15 at 07:27
  • Why don't you try SignalR? IMO, you can take a look at [my answer here](http://stackoverflow.com/questions/32573823/how-to-use-signalr-in-android/32574829#32574829) – BNK Sep 22 '15 at 10:15

2 Answers2

3

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.

Ilya Tretyakov
  • 6,848
  • 3
  • 28
  • 45
0

Use Ksoap2 to communicate between ASMX webservice and android.

you can check the following link that have an example how can use Soap Webservices in android application:

https://programmertoolbox.wordpress.com/2013/04/07/communicate-between-asp-net-webservice-and-android-app/

Manraj
  • 496
  • 2
  • 15