Webview and php page [closed]

0

I have an android WebView application and I developed an html form that validates and sends the information to my database, developed in MYSQL. As a manager, I'm using MySql Workbench. But as is the Web, sometimes it becomes more agile to access in phpMyAdmin.

I developed it totally in netbeans and then just added it in webview through android studio.

I would like to know how I do pro android studio understand the php file? I do not know if it would be through a local android studio server. I really do not know. Could you help me?

    
asked by anonymous 18.09.2017 / 06:05

1 answer

1

phpmyadmin is not a database, it is a manager that makes it easy to maintain and manage your banks, your bank works without it, just as your scripts will work without it, I recommend that you read :

Now understand something, PHP does not run along with your Android APP, communication has to be done via HTTP, ie your .php must be on an HTTP server, it can be local (if you are testing or creating) or hire a server if it is a ready project that needs any cell phone to access.

HTTP communication looks something like this:

Incasetheclient"may be" a browser or your webView.

Accessing localhost in the Android emulator

Note that in order to access the localhost of your computer via the Android Emulator it is necessary to configure the address at webView

Accessing the localhost on the mobile on the same network

If you are trying to open from your mobile phone it is necessary to use IP from the local network (it is not external IP), for example in my each IP range is 10.0.0.x, at work it is 192.168.2.x, etc. To know the IP of your computer type in the CMD and press the ENTER:

ipconfig

Assuming you have caught something like

C:\Users\Latitude E6410>ipconfig

Configuração de IP do Windows

Adaptador de Rede sem Fio Conexão Local* 1:

   Estado da mídia. . . . . . . . . . . . . .  : mídia desconectada
   Sufixo DNS específico de conexão. . . . . . :

Adaptador de Rede sem Fio Wi-Fi:

   Sufixo DNS específico de conexão. . . . . . :
   Endereço IPv4. . . . . . . .  . . . . . . . : 192.168.0.108
   Máscara de Sub-rede . . . . . . . . . . . . : 255.255.255.0
   Gateway Padrão. . . . . . . . . . . . . . . : 192.168.0.1

Adaptador de túnel isatap.{8A5C8F0E-51A8-4DF1-B724-B6D81425AF85}:

   Estado da mídia. . . . . . . . . . . . . .  : mídia desconectada
   Sufixo DNS específico de conexão. . . . . . :

The IP of your computer where this site is and Netbeans will be 192.168.0.108, so set the address of webView (as long as the phone is on the same network):

If the site is on an external site, just set it at the external site address.

    
25.09.2017 / 18:04