user3792429
user3792429

Reputation: 203

Unable to connect to xampp server from android device

I am using BrainTree Payment service in my android app.For server ,I am using php and XAMPP. Now when I use emulator and access server with "http://10.0.2.2:80".

IP address, everything works fine but if I put my laptop's IP address(where server is running),it does't work on android device and emulator.

I am getting :

"Connection Timeout Error"

Upvotes: 0

Views: 1890

Answers (4)

Matheus Alves
Matheus Alves

Reputation: 1

Try to disable Windows Defender, change Apache's require all granted config among others and try disabling the Windows firewall.

Upvotes: 0

user3792429
user3792429

Reputation: 203

Thank You !It turned out to be McAfee was blocking the connection request..SO after disabling McAfee,it worked!

Upvotes: 1

Make sure you are using the ipv4 that you see when you type ipconfig into command prompt.

Upvotes: 0

(1) make sure both your android device and your laptop are on the exact same wireless network. This has to be the same router so I would avoid testing in a public area where there may be many routers serving a network.

(2) sometimes your firewall a might be blocking incoming connections, temporarily disable it.

(3) double check you're connecting to the correct IP address in your code. CMD -> ipconfig, then it's ipv4

Upvotes: 0

Related Questions