Google Sheet As DATABASE for your Android Application Part – 4 | ADD IMAGES ( OPTIMIZED )

After so many experiments finally got this solution. Many of you asked this from so many days. first regret for late post, but Happy to present this experiment before You.. Make the best of the resource.

 

Note :

  • This is like simple prototype, and based on this try to design and develop your own applications.
  • Whole code contains simple work flow, I have reduced image quality in the code before upload.

Source Code

  1. APP SCRIPT

 

2. Android Part

Step 1: Create a new android Project

 

Step 2: Add required libraries in Gradle files. Add in app level Gradle file

1.Volley Library for network handling functionalities

2.Picasso Library to display images

 

Step 3: Add following layout files which are used in app

1.Go to Layouts –> Replace code in  activity_main.xml

 

2.  Go to Layouts –>  create new Layout add_user.xml

3.  Go to Layouts –>  create new Layout user_list.xml

4.  Go to Layouts –>  create new Layout list_row.xml

Step 4 : Add Java classes

 

  1. Add AddUser.java class which adds the user to Spread Sheet

     
  2. Add UserList.java class, which list the users in Spread Sheet

     
  3. Add UserListAdapter.java class, which helps in listing the users in UserList.java class

     
  4. Add JsonParser.java class, which parse the Json response sent from server side through app script, Spread sheet

     
  5. Add MainActivity.java class, which starts the activity and display the buttons to add and view users.

     
  6. Add Configuration.java class, which contains url, attributes and parameters

     

 

Step 5 : Add Manifest file

Step 6 : Run the App and check the results