Yes the SenderID is setup properly.
This is my code:
'Activity module
Sub Process_Globals
Dim Package, DeviceBoardPassword, BoardUrl, SenderId, DeviceName As String
DeviceBoardPassword = "34f34fkj02dz"
BoardUrl = "http://b4aserver.basic4ppc.com/c2dm_board.php"
'both these fields should be set to match your application package and SenderId.
Package = "t24.database_test"
SenderId = "t24Ottawa@gmail.com"
End Sub
Sub Globals
Dim btnRegister As Button
Dim txtName As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
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
Sub Register(Name As String)
Dim r As Reflector
Dim i As Intent
i.Initialize("", "")
i.SetComponent(Package & "/.pushservice")
i.PutExtra("MyRequest", "Register")
DeviceName = Name
StartService(i)
End Sub
Sub Unregister(Name As String)
Dim i As Intent
i.Initialize("", "")
i.SetComponent(Package & "/.pushservice")
i.PutExtra("MyRequest", "Unregister")
DeviceName = Name
StartService(i)
End Sub
Manifest:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information:
Manifest Editor
AddManifestText(
<uses-sdk android:minSdkVersion="4" />
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
'C2DM Permissions
AddManifestText(<permission android:name="$PACKAGE$.permission.C2D_MESSAGE" android
rotectionLevel="signature" />)
AddPermission($PACKAGE$.permission.C2D_MESSAGE)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
' Push Service Receiver Attribute
SetReceiverAttribute(PushService, android
ermission, "com.google.android.c2dm.permission.SEND")
' Service Receiver Text
AddReceiverText(PushService,
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="$PACKAGE$" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="$PACKAGE$" />
</intent-filter>)