Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Develop code that allows a user to log in. This means you should focus on the following functionality: The app should check the username and

  1. Develop code that allows a user to log in. This means you should focus on the following functionality:
    • The app should check the username and password against the database when the user attempts to log in.
    • If the user has never logged into the application before, the user should be able to have a new login and password. The application needs to save these to a table in the database.
  2. Develop code to make a database shell and display that database's information on a user's screen using a grid. The SQLLite database you m@ke will depend on the option you selected in Project One and will store either inventory items, event details, or daily weight. Any information needed for your application to function correctly should be held in the database, but remember you are only creating the shell for the database so its contents can later be populated by a user. Note that you will need tables in the database to store user information when it is not being displayed in the grid. This database will be persistent so no user information is lost when the app is closed. Be sure to test your code often with the Android Emulator. Your completed database should allow a user to accomplish the following:
    • Create: The user should be able to add items to a database.
    • Delete: The user should be able to remove items from a database.
    • Update: The user should be able to change the value associated with individual database items (e.g. the number of a specific item in an inventory or the date of an event).
    • Read: The user should be able to view all of the database items displayed as a grid.
  3. Develop code that prompts users for permission to send SMS messaging notifications and makes the app function based on the individual user's response. Keep in mind that the user of your application might deny access to the permissions needed for sending text messages via SMS. If they do, your application should still continue to function, just without this feature. Test both possible options for user response by using the Android Emulator. When you do, you will be looking for the following outcomes:
    • If the user grants permissions, the application should send alerts to the user as SMS messages. The alerts correspond to the specific notification trigger of the application you chose (low inventory, an upcoming event, or reaching a goal weight).
    • If the user denies permission, then the rest of the application should still continue to function without the SMS messaging notification feature.

I have the UI this is my code:

mainActivity.java

package com.zybooks.inventoryapp; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }

activity_main.xml

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java Programming

Authors: Joyce Farrell

9th edition

1337397075, 978-1337397070

More Books

Students also viewed these Programming questions