user1919
user1919

Reputation: 309

Chat App using GCM, PHP & MySQL

I am following this tutorial

Part-1

Part -2

part-1 has been done sucessfully and but in part -2 when i deploy app im my mobile then i am not getting any gcm registration token in toast and neither in logcat. As i have searched that due to my config.php file i am using ip s=address instead of hostname i had to change my link from this http://live_host_ip_address/gcm_chat/v1/user/login ----> to this http://live_host_ip_address/gcm_chat/v1/index.php/user/login

on using Postman Chrome REST API with this link-http://live_host_ip_address/gcm_chat/v1/user/login it was not working but on changing the link to http://live_host_ip_address/gcm_chat/v1/index.php/user/login the link begaun to work properly.

On testing its showing volley error:null

enter image description here

and in Logcat its showing

23676-24548/info.androidhive.gcm E/LoginActivity﹕ params: {[email protected], name=abc}
 23676-24548/info.androidhive.gcm E/LoginActivity﹕ params: {[email protected], name=abc}
 23676-23676/info.androidhive.gcm E/LoginActivity﹕ Volley error: null, code: null
 23676-23676/info.androidhive.gcm D/Volley﹕ [1] Request.finish: 7764 ms: [ ] http://live_ip_address/gcm_chat/v1/user/login 0x44e0acb1 NORMAL 7

I think the problem lies in that i am using http://live_host_ip_address/gcm_chat/v1/index.php/user/login from the Postman Chrome REST API but in logcat its showing http://live_host_ip_address/gcm_chat/v1/user/login

Upvotes: 0

Views: 2316

Answers (1)

Faruk
Faruk

Reputation: 5821

GCM is now deprecated, try to migrate using Firebase Cloud Messaging, Follow these tutorial series :

And this is an example to create simple chat app :

Upvotes: 2

Related Questions