Android Networking Tutorial with Retrofit, PHP and MySQL

Networking is part of almost all applications. Applications don’t work in isolation they communicate with a backend server with the help of Web Services often called RESTful APIs to perform various operations (e.g saving or retrieving data). Hence, networking is crucial thing in app development. In this Android Networking Tutorial we will learn everything that is needed for you to get started.

The android development can be categorize in two parts.

  1. Building Web Services (RESTful APIs)
  2. Building Android App

This Android Networking Tutorial will cover both parts. So you will learn in detail that how to build web services and how to consume those services in your android application.

For building web services here in this tutorial we will be using PHP and MySQL. And in android side for making network calls we will use the Retrofit Library which is the most popular library among android developers.

Pre Requisites

Even if you have very little idea about android development you can start this course. But still if you have the knowledge of the following things then it will help you.

  • Basics of PHP
  • Understanding of XAMPP or LAMP for Linux
  • Basics of Android Studio

Android Networking Tutorial with Retrofit, PHP and MySQL

If you are ready to follow this course, then start from here. And make sure you watch the complete course from start to end. Don’t skip any video every video is equally important if you want to understand everything.

Retrofit Android Tutorial – Source Code

In case you need the source code of the RESTful APIs or the Android Project, you can get it from the following link. (Links are locked and you need to SHARE or SUBSCRIBE to unlock it).


git hub repository
Get the Source Code

git hub repository
Get the Source Code

If you think this course is worth watching and providing value to you, then please let your friends know about this course as well. In case you have any confusion or problem following the tutorial, let me know by commenting here or in the specific video where you are having issue.

 

6 thoughts on “Android Networking Tutorial with Retrofit, PHP and MySQL”

  1. please help me.
    i get error on part 4 :

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Slim\App::__construct(), 0 passed in E:\xampp\htdocs\MyApi\public\index.php on line 8 and at least 1 expected in E:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php:57 Stack trace: #0 E:\xampp\htdocs\MyApi\public\index.php(8): Slim\App->__construct() #1 {main} thrown in E:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php on line 57

    Reply
  2. please help me.
    i got error on part 4 :

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function Slim\App::__construct(), 0 passed in E:\xampp\htdocs\MyApi\public\index.php on line 8 and at least 1 expected in E:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php:57 Stack trace: #0 E:\xampp\htdocs\MyApi\public\index.php(8): Slim\App->__construct() #1 {main} thrown in E:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php on line 57

    Reply
    • Hi Moha,
      Struggled with the same too for a long time 🙁 . I realised it was an issue of Slim versions. Belal used Slim 3 while the current one in the Slim website is version 4. When you run the code as per the tutorial, what is automatically downloaded is version 4 which uses App Factory and the creation configurations are different.

      Also, make sure you use ‘composer require psr/7’. I recommend this repo which has a good example on Slim 4: https://github.com/slimphp/Slim

      Otherwise, this was a very great tutorial by Belal. I have become an addict of the channel.

      Reply
      • Hey!! I am getting the same error!! have you resolved your error?? Please do help e how to resolve this?

        Reply
  3. Fatal error: Uncaught Slim\Exception\HttpNotFoundException: Not found. in C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php:93 Stack trace: #0 C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\Routing\RouteRunner.php(72): Slim\Middleware\RoutingMiddleware->performRouting(Object(Slim\Psr7\Request)) #1 C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\MiddlewareDispatcher.php(81): Slim\Routing\RouteRunner->handle(Object(Slim\Psr7\Request)) #2 C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php(215): Slim\MiddlewareDispatcher->handle(Object(Slim\Psr7\Request)) #3 C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\App.php(199): Slim\App->handle(Object(Slim\Psr7\Request)) #4 C:\xampp\htdocs\MyApi\public\index.php(20): Slim\App->run() #5 {main} thrown in C:\xampp\htdocs\MyApi\vendor\slim\slim\Slim\Middleware\RoutingMiddleware.php on line 93

    Reply

Leave a Comment