I take a reference with http://www.androidhive.info/2016/02/android-push-notifications-using-gcm-php-mysql-realtime-chat-app-part-3/ to complete a chat app . The tutorial used Volley login and i found that it show Volley error: null, code: null , just like this:
03-24 01:04:43.141 2523-5531/tw.idv.mogoflash.gcmadvance1 E/LoginActivity: params: {email=morton9487@gmail.com, name=Morton}
03-24 01:04:45.639 2523-5531/tw.idv.mogoflash.gcmadvance1 E/LoginActivity: params: {email=morton9487@gmail.com, name=Morton}
03-24 01:04:46.796 2523-5531/tw.idv.mogoflash.gcmadvance1 D/Volley: [116] BasicNetwork.logSlowRequests: HTTP response for request=<[ ] http://10.0.2.2/gcm_chat/v1/user/login 0x1e7db229 NORMAL 1> [lifetime=3655], [size=0], [rc=404], [retryCount=1]
03-24 01:04:46.796 2523-5531/tw.idv.mogoflash.gcmadvance1 E/Volley: [116] BasicNetwork.performRequest: Unexpected response code 404 for http://10.0.2.2/gcm_chat/v1/user/login
03-24 01:04:46.797 2523-2523/tw.idv.mogoflash.gcmadvance1 E/LoginActivity: Volley error: null, code: com.android.volley.NetworkResponse@2ecd3e18
03-24 01:04:46.800 2523-2523/tw.idv.mogoflash.gcmadvance1 D/Volley: [1] Request.finish: 3676 ms: [ ] http://10.0.2.2/gcm_chat/v1/user/login 0x1e7db229 NORMAL 1
03-24 01:04:46.881 2523-2650/tw.idv.mogoflash.gcmadvance1 V/RenderScript: 0xaea5dc00 Launching thread(s), CPUs 2
It's my url setting:
public static final String BASE_URL = "http://10.0.2.2:8080/gcm_chat/v1/user/login";
I have no idea with this volley error , why it shows me null ?
I had tried to change my url like:
public static final String BASE_URL = "http://Webserver/gcm_chat/v1/user/login";
and
public static final String BASE_URL = "http://localhost/gcm_chat/v1/user/login";
they are no working for me.
I have checked MySQL that the user Morton was existed.
Is any one can tell me why ? Any help would be appreciated.
