Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push Service Setup

Hi Joe, working on it...

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push Service Setup

Hello!

1) Your service URL should be this format codehttps:&#47;&#47;api&#46;tiggzi&#46;com&#47;rest&#47;push&#47;reg&#47;app&#47;<appType>&#47;<projectGUID>/code

It's incorrect URL codehttps:&#47;&#47;api&#46;tiggzi&#46;com&#47;rest&#47;push&#47;reg&#47;Trans_App&#47;A&#47;7cf54281-5407-4821-a8e8-783958ec1f0e&#47;{deviceid}&#47;{token}/code

Here is the correct one codehttps:&#47;&#47;api&#46;tiggzi&#46;com&#47;rest&#47;push&#47;reg&#47;app&#47;A&#47;7cf54281-5407-4821-a8e8-783958ec1f0e/code

2) You should use PUT method instead of GET

3) On Request tab rename deviceid to deviceID

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Push Service Setup

Hi Marina,

Thank you for the information, I would just like to clarify your instructions:

In point 1) Your service URL should be this format
https://api.tiggzi.com/rest/push/reg/...

By the service URL do you mean the GetChannels service as you are saying to place the URL

https://api.tiggzi.com/rest/push/reg/...

In the RegisterDevice service? Do I replace the markers and with the true values?

Thanks and Regards,
Joe

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push Service Setup

Hi Joe,

In "RegisterDevice" service you shouldn't change markers {service_url}, {appType}, {guid} to values.
Project name, {deviceID} and {token} shouldn't be in service URL.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Push Service Setup

Hi Katya,

Phew thanks for your patience! maybe getting somewhere now. The RegisterDevice service returns a success but I get nothing returned in the success event of the service. I am using javascript in the event:

var D = JSON.stringify(data);
alert(D);
localStorage.setItem('gcm', D);

But this returns Null. In another question you said it was possible to obtain the the GCM registration id for the device. Is the RegisterDevice service the correct place to do this? If so how would I get the GCM registration id for the device?

Regards,
Joe

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push Service Setup

Hello! RegisterDevice doesn't return anything - that's why you've got null.

Could you clarify please what do you want to save to localStorage gcm and what you want to achive?

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Push Service Setup

Hi Marina,

I want to grab the GCM device ID returned from the server when a device is successfully registered for GCM on the Google server and save this to a database in order to use it to target push to specific devices. I understand that Tiggzi has this in the pipeline but it is not yet available.

Regards,
Joe

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Push Service Setup

If I understand you correctly you would need to use deviceID which you send while registration and there is no need to wait ID returned from the server after registration.

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

Push Service Setup

Hi Marina,

I have perhaps not been very clear but please take a look at the following which may clarify what I am looking to achive I want the device registration ID from GCM as in the following snippet taken from step3 in:

http://developer.android.com/google/g...:

onRegistered(Context context, String regId): Called after a registration intent is received, passes the registration ID assigned by GCM to that device/application pair as parameter. Typically, you should send the regid to your server so it can use it to send messages to this device.

I want to use the returned string to send push messages directly to the application.

regards,
Joe

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Push Service Setup

Hi Joe,

You mean deviceID sent while registration.

This can be checked. On Push Notifications page, Send push notification tab, you can specify ID of device that will get the message.

  • If correct DeviceID is specified (you can see it on Get ID button click) then message will be delivered to device.

  • If another DeviceID is specified then message won't be delivered to this device, it will be get by device with specified ID.

  • If DeviceID is not specified then message will be delivered to all devices by default.

Return to “Issues”