I\'m newbie here. I want to connect my android app to wampserver database. I found a tutorial on this link, But where should I find my serverUrl in wampserver? It should loo
The "path" is probably the URL to your local web server, that is:
http://your_ip/your_path_to_your_php_script
you need to find your IPV4 address of your computer, run command prompt in your computer(go to Windows start button and start typig cmd) and type ipconfig and enter to see your IPV4 address of your computer.
Successfully Running WAMP server on your computer indicates a green icon on system tray, click on that, with a menu pop up click on put online item. Wait for few second to process its task.
To test your app for PHP MySQL in your android studio emulator, just enter address as http:\\IP Address\
followed by path of your PHP file in your code.
For example: http:\\192.168.1.7\test\example.php
The solution that worked for me was to use 10.0.2.2 as the ip address in my developing android app.
Thanks to @e4c5 (for the suggestions) and to @Laser for the answer(s).
I solved it!
So for the others who will stumble upon this problem, check this out! ^_^
Go to cmd >> type ipconfig
>> then look at IPv4 Address...
Then paste it on private final String serverUrl = "your path here"
Replace your path here
with http://192.168.1.8/android_user_api/index.php
Thank you guys!
Happy Coding!