Hi Joe, working on it...
Hi Joe, working on it...
Hello!
1) Your service URL should be this format codehttps://api.tiggzi.com/rest/push/reg/app/<appType>/<projectGUID>/code
It's incorrect URL codehttps://api.tiggzi.com/rest/push/reg/Trans_App/A/7cf54281-5407-4821-a8e8-783958ec1f0e/{deviceid}/{token}/code
Here is the correct one codehttps://api.tiggzi.com/rest/push/reg/app/A/7cf54281-5407-4821-a8e8-783958ec1f0e/code
2) You should use PUT method instead of GET
3) On Request tab rename deviceid to deviceID
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
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.
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
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?
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
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.
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
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.