android-mesosfer-integration

How to Edit and Update Data Android Mobile Apps in Mesosfer Backend as a Service

This is a tutorial about How to Edit and Update Data Android Mobile Apps in Mesosfer Backend as a Service

Introduction

This Tutorial is the eighth session of Android Mobile Apps series. In this tutorial you will be required some dependency source code you created in the previous session. In this session, we’ll create module to edit and update data in a Mesosfer Bucket.

Prerequisites

To follow this tutorial, you will need to prepare these items below :

  • Sign up for an account in Mesosfer Backend as a Service.
  • Have a Mesosfer Bucket.
  • Install latest android studio. In this tutorial, the author used android studio version 2.2.1
  • Download code from previous section.

Getting Started

In previous sessions, you have tried to add and edit data bucket in Mesosfer Backend as a Service. Next you will create a function to edit and update data. You have to add item in variable menu in the Class DataActivity.

Then you can add action menu edit.

Add method editAnimal and set mode with value FORM_MODE_EDIT to navigate to the form edit.

Then edit Class DataFormActivity, add in method onCreate code below:

Add method fetchData to get data asynchronously.

If the data is founded, it will be updated into TextInput. Add method updateView below:

In mobile apps, it will show result as in picture below.

how-to-edit-and-update-data-android-mobile-apps-in-mesosfer-backend-as-a-service-edit-mobile

To handle action save, you will need to add this method:

Add method saveAnimal, to update data to Bucket Animal in Mesosfer.

In mobile apps, it will show result as in picture below.

how-to-edit-and-update-data-android-mobile-apps-in-mesosfer-backend-as-a-service-animal-save

To ensure that the data you add is working, you need to check into the Mesosfer Backend as a Service.

how-to-edit-and-update-data-android-mobile-apps-in-mesosfer-backend-as-a-service-backend-result

Everything is done! Download full version code here.

Conclusion

We have created module to edit and update data on Mesosfer Bucket. Very simple and quick, isn’t it? Mesosfer helps you connect your project to the cloud. Cut off the development process so you can straight into the delivery process instead stumble on the complicated infrastructure.

Having more than 5 years experience in IT Consultant with the last position as Backend as a Service Developer and has an experience in planning, implementing IT Information System.