Last edited:
Yes, when i followed the tutorial first time, it was working fine. Now i have created a new project and trying to follow tutorial but at the moment the service is not even starting. I have pasted my code, can you please tell me wat m i missing?You said that you were able to run it with the b4aserver url, is this correct?
No problem Erel. Thank you.You should compare your project to the example. I cannot do it for you.
Thank you Erel. I have just signed up for different packages. I will confirm here once I test using different packages.I believe that you can use the same gmail account with multiple packages.
'C2DM Permissions
AddManifestText(<permission android:name="$PACKAGE$.permission.C2D_MESSAGE" android:protectionLevel="signature" />)
AddPermission($PACKAGE$.permission.C2D_MESSAGE)
AddPermission(com.google.android.c2dm.permission.RECEIVE)
' Push Service Receiver Attribute
SetReceiverAttribute(PushService, android:permission, "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>)
Thank you Erel.Good job!
No I don't think, you would need to set any environment variables to set up b4a. The installation is pretty straight forward, just follow the official guide.B4A runs fine. I remember having to point B4A to a 1.6 java installation when I set it up via Tools > Configure Paths.
I wonder if I need to set an env var to the 1.6 (or other version) location and then edit the commandline tool to use that var.
something like:
newjavavar -cp b4a_c2dm.jar anywheresoftware.b4a.c2dm.C2DM %*
I have several versions installed since I run other IDEs that require them.