Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-09 Thread Mukesh Srivastav
@Haris..

You would need to store the GCM- Registration Id in the Database(Server
side) so that the Server API/Webservice api/ should able to pick the
Registration Id from the DB and send me message to the correct device
(Based on the registration id).

 here is the way i used it. I have an logistics app where in the Admin
decide the take a load or do a refresh upon receving the GCM Message. The
server db is having a GCM table with the following structure.

RegistrationID | DriverId | Message | Status|.

xxx | 2113 | Refresh | 1

The data will be pulled by the HTTP request which inturn send the message
to the device so that Driver get to know that there is a updated data and
it requires to download after downloading the data the APK will update the
status back to 3 so that the HTTP request should not pull the same record.










On Tue, Jul 8, 2014 at 11:09 PM, MS ms.jackspar...@gmail.com wrote:

 Hi Harri Smatt,

 Sender Id needs to be in the App to register with GCM server and get the
 GCM ID. I believe you are referring to GCM API key.

 We will be encrypting the GCM API Key in our app.
 On top of that we will be using DexGuard to obfuscate the code.
 And more over sending message to GCM is an *HTTPS *call.
 Considering all the above, we think that it should be secure enough.

 Thanks a lot for your reply. Do you foresee any other issues?

 Varun


 On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote:


 On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote:

 Are we missing anything by not choosing to push via our own server?

 Is following such an implementation correct?


 Guess it works - but isn’t it any concern to you that you need to bundle
 your Sender Id, usually stored only on 3rd party application server, within
 the application?

 And, well, can’t tell how Google reacts once their GCM server gets
 hammered from millions, if not trillions, different IPs with your Sender Id.

 —
 H

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




-- 
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-09 Thread Mukesh Srivastav
Further to that. . as soon the APK register the device it gets the
RegistrationId which inturn store in the Server DB so that the Server can
push the messsage. for example;

https://myserver/api/updategcmdata
driverid=2113
registrationid=x

The service will update/create the new record in the DB.


On Wed, Jul 9, 2014 at 12:55 PM, Mukesh Srivastav mukicha...@gmail.com
wrote:

 @Haris..

 You would need to store the GCM- Registration Id in the Database(Server
 side) so that the Server API/Webservice api/ should able to pick the
 Registration Id from the DB and send me message to the correct device
 (Based on the registration id).

  here is the way i used it. I have an logistics app where in the Admin
 decide the take a load or do a refresh upon receving the GCM Message. The
 server db is having a GCM table with the following structure.

 RegistrationID | DriverId | Message | Status|.

 xxx | 2113 | Refresh | 1

 The data will be pulled by the HTTP request which inturn send the message
 to the device so that Driver get to know that there is a updated data and
 it requires to download after downloading the data the APK will update the
 status back to 3 so that the HTTP request should not pull the same record.










 On Tue, Jul 8, 2014 at 11:09 PM, MS ms.jackspar...@gmail.com wrote:

 Hi Harri Smatt,

 Sender Id needs to be in the App to register with GCM server and get the
 GCM ID. I believe you are referring to GCM API key.

 We will be encrypting the GCM API Key in our app.
 On top of that we will be using DexGuard to obfuscate the code.
 And more over sending message to GCM is an *HTTPS *call.
 Considering all the above, we think that it should be secure enough.

 Thanks a lot for your reply. Do you foresee any other issues?

 Varun


 On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote:


 On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote:

 Are we missing anything by not choosing to push via our own server?

 Is following such an implementation correct?


 Guess it works - but isn’t it any concern to you that you need to bundle
 your Sender Id, usually stored only on 3rd party application server, within
 the application?

 And, well, can’t tell how Google reacts once their GCM server gets
 hammered from millions, if not trillions, different IPs with your Sender Id.

 —
 H

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.




 --
 Warm Regards,
 *Mukesh Kumar*,
 Android Consultant/Freelancer,
 India,Hyderabad.




-- 
Warm Regards,
*Mukesh Kumar*,
Android Consultant/Freelancer,
India,Hyderabad.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-09 Thread Harri Smatt
Yes, I believe we are talking about the same key (I did only a brief check
on GCM documentation and thought it's called Sender Id, my bad). Still, I
am not exactly sure how Google reacts if/once you start sending push
notifications from multiple IPs. I tend to think people are usually
limiting the IP space allowed to send notifications instead of depending on
no filtering takes place at all.

But if this is not an issue, I see absolutely no reason why this couldn't
work.

--
H
On Jul 8, 2014 8:39 PM, MS ms.jackspar...@gmail.com wrote:

 Hi Harri Smatt,

 Sender Id needs to be in the App to register with GCM server and get the
 GCM ID. I believe you are referring to GCM API key.

 We will be encrypting the GCM API Key in our app.
 On top of that we will be using DexGuard to obfuscate the code.
 And more over sending message to GCM is an *HTTPS *call.
 Considering all the above, we think that it should be secure enough.

 Thanks a lot for your reply. Do you foresee any other issues?

 Varun


 On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote:


 On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com wrote:

 Are we missing anything by not choosing to push via our own server?

 Is following such an implementation correct?


 Guess it works - but isn’t it any concern to you that you need to bundle
 your Sender Id, usually stored only on 3rd party application server, within
 the application?

 And, well, can’t tell how Google reacts once their GCM server gets
 hammered from millions, if not trillions, different IPs with your Sender Id.

 —
 H

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
 ---
 You received this message because you are subscribed to the Google Groups
 Android Developers group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to android-developers+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-08 Thread Harri Smått

On 7 Jul 2014, at 16:38, MS ms.jackspar...@gmail.com wrote:

 Are we missing anything by not choosing to push via our own server? 
 
 Is following such an implementation correct?
 
 

Guess it works - but isn't it any concern to you that you need to bundle your 
Sender Id, usually stored only on 3rd party application server, within the 
application?

And, well, can't tell how Google reacts once their GCM server gets hammered 
from millions, if not trillions, different IPs with your Sender Id.

--
H

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-08 Thread MS
Hi Harri Smatt,

Sender Id needs to be in the App to register with GCM server and get the 
GCM ID. I believe you are referring to GCM API key.

We will be encrypting the GCM API Key in our app. 
On top of that we will be using DexGuard to obfuscate the code.
And more over sending message to GCM is an *HTTPS *call.
Considering all the above, we think that it should be secure enough.

Thanks a lot for your reply. Do you foresee any other issues?

Varun 


On Tuesday, 8 July 2014 22:24:17 UTC+5:30, Harri Smatt wrote:


 On 7 Jul 2014, at 16:38, MS ms.jack...@gmail.com javascript: wrote:

 Are we missing anything by not choosing to push via our own server? 

 Is following such an implementation correct?


 Guess it works - but isn’t it any concern to you that you need to bundle 
 your Sender Id, usually stored only on 3rd party application server, within 
 the application?

 And, well, can’t tell how Google reacts once their GCM server gets 
 hammered from millions, if not trillions, different IPs with your Sender Id.

 —
 H


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android GCM without a 3rd party server (Device to Device push notification without 3rd party server via GCM)

2014-07-07 Thread MS


We are writing an Application that will exchange messages between users 
extensively. We are using Google App Engine

*The traditional way *is to have an Application Server that stores all the 
GCM_ID of the users. So if User 1 wants to send message to User 2, then


   1. The User 1 sends the message to Application server with payload which 
   contains message and recipient id (User 2 in our case)
   2. The application server retrieves the GCM_ID of User 2 and with the 
   help of sender API pushes the message to User 2 
   3. User 2 receives the message
   

*What we implemented:*

Now as the number of users and app usage increases ( We hope it does :) ), 
the costing related to AppEngine w.r.t number of instances, no. of 
read/writes etc increases.

We want to reduce this costing. Since pushing message to GCM server is a 
REST Call (via https://android.googleapis.com/gcm/send) , we came up with 
the idea of storing GCM_ID's of user's friends in the Android App (DB to be 
specific)  were able to push messages from one user to another.

So instead of a server having all GCM_ID's we are exchanging relevant 
GCM_ID's related to users via server and storing them in App DB

We also have designed the app to take care of change in GCM_ID of another 
user, Un-installation of App etc..


Are we missing anything by not choosing to push via our own server? 

Is following such an implementation correct?

Regards,

Varun



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.