Android Question Problem executing b4a_gcm.bat

stingrae

Member
Licensed User
Longtime User
Hi,

I'm going through this tutorial here:

https://www.b4x.com/android/forum/t...ion-gcm-framework-and-tutorial.19226/#content

Everything is going well, except to now I'm trying to call b4a_gcm.bat

When I run it, I get the following error. Has something changed since the tutorial was created?


java.lang.RuntimeException: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>301 Moved Permanently</title>
</head><body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.b4x.com/android/b4aserver/c2dm_board.php?server_password=9034f3po4gj34&amp;name=stingrae">here</a>.</p>
</body></html>
at anywheresoftware.b4a.c2dm.C2DM.getIdForName(C2DM.java:98)
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:48)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:218)
 

stingrae

Member
Licensed User
Longtime User
I tried changing the config.txt file to have this line:

B4X:
board_url=https://www.b4x.com/android/b4aserver/c2dm_board.php

but that generated this error:

java.lang.RuntimeException: java.io.FileNotFoundException: https://www.b4x.com/android/b4aserver/c2dm_board.php?server_password=9034f3po4gj34&name=stingrae
at anywheresoftware.b4a.c2dm.C2DM.getIdForName(C2DM.java:98)
at anywheresoftware.b4a.c2dm.C2DM.sendMessageTo(C2DM.java:48)
at anywheresoftware.b4a.c2dm.C2DM.main(C2DM.java:218)
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
You should use the b4j app to send pushes.
Or host your own php file on your server.

The link you are using seems to be moved to another location.

Edit to add: It is possible that the gcm.bat is not compatible with Firebase and therefore have been removed.
The php-script was for the old Google Cloud Messaging (GCM)
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Edit to add: It is possible that the gcm.bat is not compatible with Firebase and therefore have been removed.
The php-script was for the old Google Cloud Messaging (GCM)
That's true. You shouldn't use the old GCM based implementation. Use B4X Push Server if you want to work hard for no real reason or use Firebase.
 
Upvote 0
Top