0

i have an Android app that needs to access offline a MySQL database that's hosted on my localhost (i'm using WampServer). i can't use USB tethering or port forwarding because my laptop won't have internet connection too. what can i do?

EmmaS
  • 171
  • 1
  • 1
  • 6
  • Try using Android emulator like `Genymotion` https://www.genymotion.com/ – S.R Jun 04 '17 at 10:27
  • @S.R i tried using GenyMotion but some of the functionalities (like the Calendar view) does not work. – EmmaS Jun 04 '17 at 13:49
  • In genymotion, you can go to android settings-> Date & Time uncheck the `automatic time zone`, and set your own timezone and your date & time. – S.R Jun 04 '17 at 14:02
  • This may help you https://stackoverflow.com/questions/43016713/wampserver-access-server-from-mobile-phone/43018881#43018881 – RiggsFolly Jun 04 '17 at 17:05
  • @RiggsFolly thank's , actually i configured a mobile hotspot between my laptop and my phone and now it works :) – EmmaS Jun 04 '17 at 17:11

1 Answers1

-1

You can setup wifi, connect your system which contains server and your android device to same wifi. Assign a static IP to your server system and let your android connect to that server's MySql through the IP you assigned. Basically it is nothing much different then your web api and db hosted on cloud server and your android application connect to that cloud using either the domain or ip.

Rajen Raiyarela
  • 5,526
  • 4
  • 21
  • 41