Question: App Code Design Develop code that allows a user to log in . As you develop your code, use the Android Emulator feature of Android
App Code Design
Develop code that allows a user to log in
As you develop your code, use the Android Emulator feature of Android Studio to test your code. Your app should work for users who dont have accounts. Focus on the following functionality:
The app should check the username and password against the database when the user attempts to log inIf the user has never logged into the application before, they should be able to create a new login and password. The application needs to save these to a table in the database.
Develop code to create a database shell and display that databases information on a users screen using a grid.
The SQLite database you create will depend on the option you selected in Project One. The database will store either inventory items, event details, or daily weight. Any information your application needs to function correctly should be held in the database. But remember, you are only creating the shell for the database so a user can populate its contents later.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 actions:
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 eg the number of a specific item in an inventory or the date of an eventRead: The user should be able to view all the database items displayed as a grid.
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 your applications user might deny access to the permissions needed for sending text messages via SMS If they do the rest of your application should continue to function without this feature. Use the Android Emulator to test both possible user response options.When you do you will look 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 eg low inventory, an upcoming event, or reaching a goal weightIf the user denies permission, the rest of the application should continue to function without the SMS messaging notification feature.
Employ industrystandard best practices such as inline comments and appropriate naming conventions to enhance readability of the code.
This should be evident throughout all the code you create for this project and will be assessed comprehensively. As you code, ask yourself the following questions:
Have I kept my classes concise?Is my style consistent throughout the code?Would my naming conventions make sense to anyone else who looked at my code?Do my inline comments contain enough useful information?
here are my current codes
Activity main.xml
MainActivity.java
import android.osBundle;
import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
public class MainActivity extends AppCompatActivity
@Override
protected void onCreateBundle savedInstanceState
super.onCreatesavedInstanceState;
EdgeToEdge.enablethis;
setContentViewRlayout.activitymain;
ViewCompat.setOnApplyWindowInsetsListenerfindViewByIdRidloginButtonv insets
Insets systemBars insets.getInsetsWindowInsetsCompatType.systemBars;
vsetPaddingsystemBarsleft, systemBars.top, systemBars.right, systemBars.bottom;
return insets;
;
android:layoutwidth"matchparent"
android:layoutheight"matchparent"
android:orientation"vertical"
android:textStyle"bold"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
