• I am developing an Android application which is needed to retrieve custom data from WordPress DB. From my own Web App, I am receiving posts in 3 below steps:
    1- The Mobile application sends request containing the required post ID to the web app.
    2- Web app, executes query where id is equal to requested ID.
    3- Web app parses selected data to JSON format and response the JSON file back to Mobile Application.

    Now, I need to receive such a data from WordPress DB. Please let me know if you know any solution.
    Thanks.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You could have your web app access the DB directly without using WP at all. If it’s PHP based, use mysqli class methods or the equivalent procedural functions if you prefer.

    That is likely the best approach because initializing the WP environment incurs a lot of overhead. If for some reason you really need to go through WP, several options exist. XMLRPC is built in. There is a REST API plugin. You can make AJAX requests through admin-ajax.php. You can send requests through admin-post.php. There is also a WP-CLI interface you can install.

Viewing 1 replies (of 1 total)

The topic ‘Selecting custom data from wordpress db to android app’ is closed to new replies.