OK, I finally got the C2DM system working on my Droid2 phone. At this point I am only using Erel's C2DM sample coding. Mainly the device code and the command line batch file to send the msg.
I have two questions. (1) In the Sub below, what is the Regex function doing to the txtName.Text string?
I want to make the registration of C2DM transparent (if possible) to my users. (2) What name can I use to programatically register their devices?
In playing with the sample code Erel has kindly provided, I just chose 'droid2' because my phone is a Droid2. But clearly this won't work for many users with Droid2 phones as I need to message them one at a time and not as a group. Should I use the device ID string since this a unique string?
Update: I tried to use the Device ID string to register my device but it didn't work and wouldn't register my Droid2. I got the msg: Code=403, invalid server password.
So now I don't know what a correct registration string represents?
Thanks...
I have two questions. (1) In the Sub below, what is the Regex function doing to the txtName.Text string?
B4X:
Sub btnRegister_Click
If Regex.IsMatch("[\d\w]+", txtName.Text) = False Then
ToastMessageShow("Name not valid", True)
Return
End If
Register(txtName.Text)
End Sub
I want to make the registration of C2DM transparent (if possible) to my users. (2) What name can I use to programatically register their devices?
In playing with the sample code Erel has kindly provided, I just chose 'droid2' because my phone is a Droid2. But clearly this won't work for many users with Droid2 phones as I need to message them one at a time and not as a group. Should I use the device ID string since this a unique string?
Update: I tried to use the Device ID string to register my device but it didn't work and wouldn't register my Droid2. I got the msg: Code=403, invalid server password.
So now I don't know what a correct registration string represents?
Thanks...