Php Website and Android Application

This is a discussion on Php Website and Android Application within the Beginning Developers forums, part of the Android Development category; dear all, i am a beginner in android i have a website that contains forms and send mails using PHP, also at the same time ...

Results 1 to 2 of 2

Thread: Php Website and Android Application

  1. #1
    Android Lurker john_zakaria's Avatar
    Join Date
    Jun 2012

    Php Website and Android Application

    dear all, i am a beginner in android

    i have a website that contains forms and send mails using PHP, also at the same time the data will be saved into my database.

    and at the same project i have a login form with username and password which check my database and if the username and password matches changes will appear in home page

    my problem is that i need to make android application for my php website

    i want to know what is the best way to make this application??
    i want to use my php website as an application like facebook application.. but i dont know how.. can u put me in the right way coz i am a beginner in android

  2. is the premier Android Forum. Registered users do not see these ads. .

  3. #2
    Android Lurker Tramontana's Avatar
    Join Date
    Aug 2012
    Ventimiglia, Italy

    Building an Android web client

    It looks like you're wanting an Android client to interact with your website. You can do the job with some mixed Java/PHP code.

    1 On the server you need an AJAX-style handler that will decode an HTTP request, do something with it and send back a plain text response using print.

    2 On the phone you need to build your GUI and get it ready to make queries and present the data that comes back.

    3 Also on the phone you need a worker class that takes queries from the GUI and builds an HTTP request. It sends off the request and waits for a response. Then it decodes what it sees and calls back to the GUI to do something appropriate. I have sample code that does this if you need it.

    You'll want to devise a simple "language" that suits the needs of all the different things that have to be done. Such as sending in a login request or asking for a particular database record. I do it with a single word command/request keyword, then a space, then a URL-encoded message (to allow spaces and other troublesome characters). The receiving end in both directions decodes the message and calls a handler depending on what the command word was.

    Debugging the server can be a little tricky but you can paste a complete request into your browser and see what comes back. At the start it'll mostly be PHP errors...
    Last edited by Tramontana; 08-07-2012 at 02:24 PM.

Remove Ads

Sponsored Links

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Similar Threads

  1. Replies: 1
    Last Post: 04-14-2011, 04:48 PM

Search tags for this page

android login php


android php application


android web page with html and php


best way android php


login form using php in android sample code


make a php website for ndroid app


offline php webpage on android


php website and android


php website android apps


php website on androidapp


php website to android app

Click on a term to search our sites for related topics.
Android Forum