Published on Dec 09,2015
827 Views
Email Post


My Introduction : My name is Rajib Deb and I have more than 14 years of experience in the IT industry . I am a Group Project Manager working in one of the top 2 IT companies in India. As part of the Android project, I have developed an application through which user can choose and buy books online.

If you are not clear with the basic concepts of Android, please attend this Android Course.

Small details of Activities:

MainActivity.java

This is the entry point to the application. This class displays the initial login/register page to the client. If the client is an existing customer, he/she enters the email-id/password and then presses the log-in button. If the client is a new user, he/she will press the register button to get themselves registered to use the application.

Login.java

This class is called as an intent from the MainActivity class. This in turn calls a PHP code GETUSERS.php which takes the email id entered by user as the input and retrieves the corresponding password. If the retrieved password matches with the one entered by the user, the GetListofBooks class is called and the user is shown a screen with the list of books to choose.

Register.java

This class is called when the user pressed the “Sign Up” button. User is shown a screen where he/she can enter email id and password to get registered. Once registration is successful, the GetListofBooks class is called and the user is shown a screen with the list of books to choose.

GetListofBooks.java

This class calls the GETBOOKS.php program to retrieve the list of books from the database and populate the Spinner . User can select a book from the Spinner and add it to the cart. When user presses the Add Cart button, the AddCart class is called.

AddCart.java

The AddCart class allows the user to specify the number of copies of the book he/she wants to buy, once the user specifies the number of copies, he or she clicks on Payment Details and is directed to the payment screen where the user provides the necessary credit card information and then clicks on proceed to checkout button. The is the last step in the shopping process. Once the user presses the button, the Checkout.java program is called.

Checkout.java

This class takes all the order details as input from the user and calls the ORDER.php program. This program creates the order record in the database and upon successful creation of the order throws a success message to the user. On this screen, the user can press the OK button that will direct the user back to the screen where the list of books are displayed in the spinner. User can choose another book and can repeat the entire checkout process

How I have handled the images : I converted the image to bytearray and stored it as BLOB in the database. While displaying the image, I have converted the bytearray back to image

Widgets used for this Android Project:

  • Below are the list of widgets used in the application
  • ImageView
  • TextView
  • Button
  • ProgressBar
  • Spinner
  • EditText
  • ImageButton

Layouts used for this Android Project:

  • RelativeLayout
  • LinearLayout

For the spinner I have used a custom layout to adjust the text size and color of the Spinner.

[dl url=”#” class=’eModal eModal-13′ title=”Download Code” desc=”” type=”” align=”” for=”download”]
Happy Learning!

You may also like these related posts:

About Author
Gaurav Shankhdhar
Published on Dec 09,2015

Share on

Browse Categories

Comments
6 Comments