{"id":87402,"date":"2023-03-31T13:27:13","date_gmt":"2023-03-31T07:57:13","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=87402"},"modified":"2026-06-03T12:54:04","modified_gmt":"2026-06-03T07:24:04","slug":"android-digi-locker","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/","title":{"rendered":"Android Digi Locker &#8211; The Future of Document Storage"},"content":{"rendered":"<p>In this project, we will be creating an Android Digi Locker app that allows users to securely save their documents and files on Firebase storage and download them when needed.<\/p>\n<p>With the increasing need for secure digital storage, a digital locker app can come in handy for individuals, students, and businesses alike. We will be using Android Studio and Firebase to build this app.<\/p>\n<h3>About Android Digi Locker<\/h3>\n<p>The objective of Android Digi Locker Project is to help you build your own digital locker app and understand the basics of Firebase storage integration in Android apps.<\/p>\n<p>By the end of this project, you will have a functioning app that allows users to upload and download files securely to and from Firebase storage.<\/p>\n<h3>Prerequisites for Digi Locker using Android<\/h3>\n<p>Before we begin, you will need to have some basic knowledge of Android app development and Java programming. You should also have Android Studio installed on your computer and a Firebase account set up.<\/p>\n<h3>Download Android Digi Locker Project<\/h3>\n<p>Please download the source code of Android Digi Locker Project from the following link: <a href=\"https:\/\/drive.google.com\/file\/d\/1t24ACBpsmBPeqxspjGxlF-hpqxZ57AC4\/view?usp=drive_link\"><strong>Android Digi Locker Project Code<\/strong><\/a><\/p>\n<h3>Steps to Create Digi Locker Project using Android<\/h3>\n<p>Following are the steps for developing the Android Digi Locker Project:<\/p>\n<p><strong>Step 1:<\/strong> Creating the android project using java as the language and adding the firebase library using the inbuilt firebase library assistant in the Android Studio.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-87442 aligncenter\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/android-project-digi-locker-output-scaled.webp\" alt=\"android project digi locker output\" width=\"2560\" height=\"1554\" \/><\/p>\n<p><strong>Step 2:<\/strong> <strong>Creating Login layout:<\/strong> This layout will help the users to login into the Digi locker. It will also allow users to reset their password if they forget their password.<\/p>\n<p><strong>activity_login.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n   android:id=\"@+id\/progressbarLogin\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:background=\"@drawable\/background\"\r\n   android:gravity=\"center\"\r\n   android:orientation=\"vertical\"\r\n   tools:context=\".Login\"&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/textView\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:gravity=\"center\"\r\n       android:text=\"Login to your account\"\r\n       android:textColor=\"#F4FF81\"\r\n       android:textSize=\"30sp\"\r\n       android:textStyle=\"bold\" \/&gt;\r\n\r\n   &lt;EditText\r\n       android:id=\"@+id\/email\"\r\n       style=\"@android:style\/Widget.DeviceDefault.Light.AutoCompleteTextView\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"55dp\"\r\n       android:layout_below=\"@+id\/textView\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginHorizontal=\"20dp\"\r\n       android:layout_marginTop=\"50dp\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:drawableLeft=\"@drawable\/custom_email_icon\"\r\n       android:drawablePadding=\"8dp\"\r\n       android:ems=\"10\"\r\n       android:hint=\"E-mail\"\r\n       android:inputType=\"textPersonName\"\r\n       android:padding=\"10dp\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textSize=\"20sp\" \/&gt;\r\n\r\n   &lt;EditText\r\n       android:id=\"@+id\/password\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"55dp\"\r\n       android:layout_below=\"@+id\/email\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginHorizontal=\"20dp\"\r\n       android:layout_marginTop=\"30dp\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:drawableLeft=\"@drawable\/custom_lock_icon\"\r\n       android:drawablePadding=\"8dp\"\r\n       android:hint=\"Password\"\r\n       android:inputType=\"textPassword\"\r\n       android:padding=\"10dp\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textSize=\"20sp\" \/&gt;\r\n\r\n   &lt;androidx.appcompat.widget.AppCompatButton\r\n       android:id=\"@+id\/loginBtn\"\r\n       android:layout_width=\"200dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_below=\"@+id\/password\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginTop=\"80dp\"\r\n       android:background=\"@drawable\/gradiant4\"\r\n       android:text=\"Login\"\r\n       android:textSize=\"28sp\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/registerDirect\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_below=\"@+id\/progressBar\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginTop=\"12dp\"\r\n       android:gravity=\"center\"\r\n       android:text=\"Don't have an account? Register\"\r\n       android:textColor=\"@color\/apk_view_background\"\r\n       android:textSize=\"18sp\" \/&gt;\r\n\r\n   &lt;ProgressBar\r\n       android:id=\"@+id\/progressBar\"\r\n       style=\"?android:attr\/progressBarStyle\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_below=\"@+id\/loginBtn\"\r\n       android:layout_centerInParent=\"true\"\r\n       android:visibility=\"invisible\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/forgetPassword\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_below=\"@+id\/password\"\r\n       android:layout_alignEnd=\"@id\/password\"\r\n       android:layout_alignRight=\"@id\/password\"\r\n       android:layout_marginTop=\"10dp\"\r\n       android:text=\"Forget Passord?\"\r\n       android:textColor=\"#FF9E80\" \/&gt;\r\n&lt;\/RelativeLayout&gt;<\/pre>\n<p><strong>Login.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Importing all the required packages\r\npackage com.techvidvan.digilocker;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.appcompat.app.AppCompatActivity;\r\n\r\nimport android.content.Intent;\r\nimport android.os.Bundle;\r\nimport android.text.TextUtils;\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.EditText;\r\nimport android.widget.ProgressBar;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\n\r\nimport com.google.android.gms.tasks.OnCompleteListener;\r\nimport com.google.android.gms.tasks.Task;\r\nimport com.google.firebase.auth.AuthResult;\r\nimport com.google.firebase.auth.FirebaseAuth;\r\n\r\n\/\/ Creating a class for Login\r\npublic class Login extends AppCompatActivity {\r\n\r\n   \/\/ Declaring all the variables\r\n   EditText mEmail,mPassword;\r\n   Button mLoginBtn;\r\n   TextView mCreateBtn,forpass;\r\n   ProgressBar progressBar;\r\n\r\n   \/\/ Creating an object for FirebaseAuth\r\n   FirebaseAuth fAuth;\r\n\r\n\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_login);\r\n\r\n       \/\/ Assigning the variables to the respective views\r\n       mEmail = findViewById(R.id.email);\r\n       mPassword = findViewById(R.id.password);\r\n       progressBar = findViewById(R.id.progressBar);\r\n       fAuth = FirebaseAuth.getInstance();\r\n       mLoginBtn = findViewById(R.id.loginBtn);\r\n       mCreateBtn = findViewById(R.id.registerDirect);\r\n       forpass = findViewById(R.id.forgetPassword);\r\n\r\n       \/\/ Setting an onclick listener for the login button\r\n       mLoginBtn.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View view) {\r\n\r\n               \/\/ Getting the values from the edit text\r\n               String email = mEmail.getText().toString().trim();\r\n               String password = mPassword.getText().toString().trim();\r\n\r\n               \/\/ Checking if the email and password fields are empty\r\n               \/\/ If empty, then display an error message\r\n               if(TextUtils.isEmpty(email)) {\r\n                   mEmail.setError(\"Email is Required.\");\r\n                   return;\r\n               }\r\n               if(TextUtils.isEmpty(password)) {\r\n                   mPassword.setError(\"Password is Required.\");\r\n                   return;\r\n               }\r\n               if(password.length() &lt; 8) {\r\n                   mPassword.setError(\"Password Must have 8 Characters\");\r\n                   return;\r\n               }\r\n\r\n               \/\/ Setting the progress bar to visible\r\n               progressBar.setVisibility(View.VISIBLE);\r\n\r\n               \/\/ Authenticating the user using the email and password\r\n               fAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {\r\n                   @Override\r\n                   public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {\r\n\r\n                       \/\/ Checking if the task is successful\r\n                       if(task.isSuccessful()) {\r\n\r\n                           \/\/ Checking if the user has verified the email\r\n                           if(fAuth.getCurrentUser().isEmailVerified()){\r\n                               Toast.makeText(Login.this, \"Logged in Successfully\", Toast.LENGTH_SHORT).show();\r\n                               startActivity(new Intent(getApplicationContext(), MainActivity.class));\r\n                               finish();\r\n                           }else{\r\n                               Toast.makeText(Login.this, \"Verify E-Mail first\", Toast.LENGTH_SHORT).show();\r\n\r\n                           }\r\n\r\n                       } else{\r\n                           \/\/ Displaying an error message if the task is not successful\r\n                           Toast.makeText(Login.this, \"Please first Sign-Up\"+task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n\r\n                       }\r\n                       progressBar.setVisibility(View.INVISIBLE);\r\n                   }\r\n               });\r\n\r\n\r\n           }\r\n       });\r\n\r\n       \/\/ Setting an onclick listener for the forget password text view\r\n       forpass.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View view) {\r\n\r\n               \/\/ Getting the value from the email edit text\r\n               String email = mEmail.getText().toString().trim();\r\n               if(email.isEmpty()){\r\n\r\n                   \/\/ Displaying an error message if the email field is empty\r\n                   mEmail.setError(\"Email Required\");\r\n               }\r\n               else {\r\n\r\n                   \/\/ Sending the password reset link to the email\r\n                   fAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener&lt;Void&gt;() {\r\n                       @Override\r\n                       public void onComplete(@NonNull Task&lt;Void&gt; task) {\r\n                           if (task.isSuccessful()) {\r\n                               Toast.makeText(Login.this, \"Password reset link send\", Toast.LENGTH_SHORT).show();\r\n                           } else {\r\n                               Toast.makeText(Login.this, \"Password reset fails\", Toast.LENGTH_SHORT).show();\r\n                           }\r\n                       }\r\n                   });\r\n               }\r\n\r\n           }\r\n       });\r\n\r\n       \/\/ Setting an onclick listener for the create account text view\r\n       \/\/ If the user clicks on the text view, then the user will be redirected to the Register activity\r\n       mCreateBtn.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n\r\n               startActivity(new Intent(getApplicationContext(),Register.class));\r\n           }\r\n       });\r\n\r\n   }\r\n\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87443\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/project-digi-locker-output-scaled.webp\" alt=\"project digi locker output\" width=\"2560\" height=\"1547\" \/><\/p>\n<p><strong>Step 3:<\/strong> Creating Registration Form Layout to register new users to the Digi locker. It will also verify user accounts through OTP.<\/p>\n<p><strong>activity_register.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n   xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:orientation=\"vertical\"\r\n   android:gravity=\"center\"\r\n   android:background=\"@drawable\/background\"\r\n   tools:context=\".Register\"&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/register\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:text=\"Register\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:textAppearance=\"@style\/TextAppearance.AppCompat.Display2\"\r\n       android:textColor=\"#B9F6CA\"\r\n       android:textStyle=\"bold\"\r\n       android:textSize=\"30sp\" \/&gt;\r\n   &lt;EditText\r\n       android:id=\"@+id\/username\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"50dp\"\r\n       android:layout_marginTop=\"70dp\"\r\n       android:layout_below=\"@+id\/register\"\r\n       android:layout_marginHorizontal=\"20dp\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:drawableStart=\"@drawable\/custom_user_icon\"\r\n       android:drawableLeft=\"@drawable\/custom_user_icon\"\r\n       android:drawablePadding=\"8dp\"\r\n       android:ems=\"10\"\r\n       android:hint=\"Full name\"\r\n       android:inputType=\"textPersonName\"\r\n       android:padding=\"15px\"\r\n       android:paddingStart=\"12dp\"\r\n       android:paddingEnd=\"12dp\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textSize=\"20sp\" \/&gt;\r\n\r\n   &lt;EditText\r\n       android:id=\"@+id\/email\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"50dp\"\r\n       android:layout_marginTop=\"30dp\"\r\n       android:layout_below=\"@+id\/username\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginHorizontal=\"20dp\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:drawableStart=\"@drawable\/custom_email_icon\"\r\n       android:drawableLeft=\"@drawable\/custom_email_icon\"\r\n       android:drawablePadding=\"8dp\"\r\n       android:ems=\"10\"\r\n       android:fontFamily=\"sans-serif\"\r\n       android:hint=\"E-mail\"\r\n       android:inputType=\"textPersonName\"\r\n       android:padding=\"15px\"\r\n       android:paddingStart=\"12dp\"\r\n       android:paddingEnd=\"12dp\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textSize=\"20sp\" \/&gt;\r\n\r\n   &lt;EditText\r\n       android:id=\"@+id\/password\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"50dp\"\r\n       android:layout_marginTop=\"30dp\"\r\n       android:layout_below=\"@+id\/email\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginHorizontal=\"20dp\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:drawableStart=\"@drawable\/custom_lock_icon\"\r\n       android:drawableLeft=\"@drawable\/custom_lock_icon\"\r\n       android:drawablePadding=\"8dp\"\r\n       android:ems=\"10\"\r\n       android:hint=\"Password\"\r\n       android:inputType=\"textPersonName\"\r\n       android:padding=\"15px\"\r\n       android:paddingStart=\"12dp\"\r\n       android:paddingEnd=\"12dp\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textSize=\"20sp\" \/&gt;\r\n\r\n   &lt;androidx.appcompat.widget.AppCompatButton\r\n       android:id=\"@+id\/registerBtn\"\r\n       android:layout_width=\"200dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_marginTop=\"28dp\"\r\n       android:layout_below=\"@+id\/password\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:background=\"@drawable\/gradiant4\"\r\n       android:text=\"Register\"\r\n       android:textSize=\"28sp\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/loginDirect\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_marginTop=\"8dp\"\r\n       android:layout_below=\"@+id\/registerBtn\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:gravity=\"center\"\r\n       android:text=\"Already have an account? Login\"\r\n       android:textColor=\"@color\/white\"\r\n       android:textSize=\"18sp\"\r\n       app:layout_constraintEnd_toEndOf=\"parent\"\r\n       app:layout_constraintStart_toStartOf=\"parent\"\r\n       app:layout_constraintTop_toBottomOf=\"@+id\/registerBtn\" \/&gt;\r\n\r\n\r\n\r\n   &lt;ProgressBar\r\n       android:id=\"@+id\/progressBar\"\r\n       style=\"?android:attr\/progressBarStyle\"\r\n       android:layout_width=\"wrap_content\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:visibility=\"invisible\"\r\n       app:layout_constraintBottom_toBottomOf=\"parent\"\r\n       app:layout_constraintEnd_toEndOf=\"parent\"\r\n       app:layout_constraintHorizontal_bias=\"0.465\"\r\n       app:layout_constraintStart_toStartOf=\"parent\"\r\n       app:layout_constraintTop_toBottomOf=\"@+id\/loginDirect\"\r\n       app:layout_constraintVertical_bias=\"0.12\" \/&gt;\r\n&lt;\/RelativeLayout&gt;<\/pre>\n<p><strong>RegisterActivity.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Importing all the required libraries\r\npackage com.techvidvan.digilocker;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.appcompat.app.AppCompatActivity;\r\n\r\nimport android.content.Intent;\r\nimport android.os.Bundle;\r\nimport android.text.TextUtils;\r\nimport android.util.Log;\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.EditText;\r\nimport android.widget.ProgressBar;\r\nimport android.widget.TextView;\r\nimport android.widget.Toast;\r\n\r\nimport com.google.android.gms.tasks.OnCompleteListener;\r\nimport com.google.android.gms.tasks.OnFailureListener;\r\nimport com.google.android.gms.tasks.OnSuccessListener;\r\nimport com.google.android.gms.tasks.Task;\r\nimport com.google.firebase.auth.AuthResult;\r\nimport com.google.firebase.auth.FirebaseAuth;\r\nimport com.google.firebase.auth.FirebaseUser;\r\nimport com.google.firebase.firestore.DocumentReference;\r\nimport com.google.firebase.firestore.FirebaseFirestore;\r\n\r\nimport java.util.HashMap;\r\nimport java.util.Map;\r\n\r\n\/\/ Creating a class for Register\r\npublic class Register extends AppCompatActivity {\r\n\r\n   \/\/ Declaring all the variables\r\n   EditText mFullname, mEmail, mPassword;\r\n   Button mRegistrationBtn;\r\n   TextView mLoginBtn;\r\n\r\n   \/\/ Creating an object for FirebaseAuth\r\n   FirebaseAuth fAuth;\r\n   ProgressBar progressBar;\r\n\r\n   \/\/ Creating an object for FirebaseFirestore\r\n   FirebaseFirestore db;\r\n\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_register);\r\n\r\n       \/\/ Assigning the variables to the respective views\r\n       mFullname = findViewById(R.id.username);\r\n       mEmail = findViewById(R.id.email);\r\n       mPassword = findViewById(R.id.password);\r\n       mRegistrationBtn = findViewById(R.id.registerBtn);\r\n       mLoginBtn = findViewById(R.id.loginDirect);\r\n       progressBar = findViewById(R.id.progressBar);\r\n\r\n       \/\/ Creating an instance for FirebaseAuth\r\n       fAuth = FirebaseAuth.getInstance();\r\n       db = FirebaseFirestore.getInstance();\r\n\r\n       \/\/ Setting an onclick listener for the register button\r\n       mRegistrationBtn.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View view) {\r\n\r\n               \/\/ Getting the values from the edit text\r\n               final String email = mEmail.getText().toString().trim();\r\n               final String password = mPassword.getText().toString().trim();\r\n               final String name = mFullname.getText().toString().trim();\r\n\r\n               \/\/ Checking if the email and password fields are empty\r\n               if(TextUtils.isEmpty(email)){\r\n                   mEmail.setError(\"Email is required!\");\r\n                   return;\r\n               }\r\n               if(TextUtils.isEmpty(password)){\r\n                   mPassword.setError(\"Password is required!\");\r\n                   return;\r\n               }\r\n\r\n               \/\/ Check if password is at least 8 characters\r\n               if(password.length()&lt;8){\r\n                   mPassword.setError(\"Password should be atleast 8 characters\");\r\n                   return;\r\n               }\r\n\r\n\r\n               \/\/ Check if email is valid\r\n               if (!email.matches(\"^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+$\")) {\r\n                   mEmail.setError(\"Email is invalid!\");\r\n                   return;\r\n               }\r\n\r\n               \/\/ Check if password has at least 8 characters, at least one letter and one number\r\n               if (!password.matches(\"^(?=.*[A-Za-z])(?=.*\\\\d)[A-Za-z\\\\d]{8,}$\")) {\r\n                   mPassword.setError(\"Password is invalid!\");\r\n                   return;\r\n               }\r\n\r\n               \/\/ Setting the progress bar to visible\r\n               progressBar.setVisibility(view.VISIBLE);\r\n\r\n               \/\/ Creating a user with email and password\r\n               fAuth.createUserWithEmailAndPassword(email,password).addOnCompleteListener(new OnCompleteListener&lt;AuthResult&gt;() {\r\n                   @Override\r\n                   public void onComplete(@NonNull Task&lt;AuthResult&gt; task) {\r\n                       if(task.isSuccessful()){\r\n\r\n                           FirebaseUser fuser = fAuth.getCurrentUser();\r\n\r\n                           \/\/ Sending a verification email to the user if the user is created successfully\r\n                           fuser.sendEmailVerification().addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {\r\n                               @Override\r\n                               public void onSuccess(Void aVoid) {\r\n                                   Toast.makeText(Register.this, \"Verification Email Has been Sent.\", Toast.LENGTH_SHORT).show();\r\n                               }\r\n                           }).addOnFailureListener(new OnFailureListener() {\r\n                               @Override\r\n                               public void onFailure(@NonNull Exception e) {\r\n                                   Log.d(\"TAG\", \"onFailure: Email not sent \" + e.getMessage());\r\n                               }\r\n                           });\r\n\r\n                           \/\/ Displaying a toast message\r\n                           Toast.makeText(Register.this,\"user created\",Toast.LENGTH_SHORT).show();\r\n\r\n                           \/\/ Creating a hashmap for storing the user data\r\n                           Map&lt;String,Object&gt; user = new HashMap&lt;&gt;();\r\n                           user.put(\"Name\",name);\r\n                           user.put(\"Email\",email);\r\n                           user.put(\"User ID\",fAuth.getCurrentUser().getUid());\r\n                           user.put(\"Password\",password);\r\n\r\n                           \/\/ Creating a document reference for storing the user data in the database\r\n                           DocumentReference documentReference = db.collection(\"User's Data\").document(fAuth.getCurrentUser().getUid());\r\n                           documentReference.set(user).addOnSuccessListener(new OnSuccessListener&lt;Void&gt;() {\r\n                               @Override\r\n                               public void onSuccess(Void aVoid) {\r\n                                   Log.d(\"TAG\",\"OnSuccess: user Profile is created for \"+fAuth.getCurrentUser().getUid());\r\n                               }\r\n                           }).addOnFailureListener(new OnFailureListener() {\r\n                               @Override\r\n                               public void onFailure(@NonNull Exception e) {\r\n                                   Log.w(\"TAG\",\"Error: user Profile is not created for \"+fAuth.getCurrentUser().getUid());\r\n                               }\r\n                           });\r\n\r\n                           startActivity(new Intent(getApplicationContext(),Login.class));\r\n                       }\r\n                       else{\r\n                           Toast.makeText(Register.this,\"Error! \"+task.getException().getMessage(),Toast.LENGTH_SHORT).show();\r\n                       }\r\n                   }\r\n               });\r\n\r\n           }\r\n       });\r\n\r\n       \/\/ Setting an onclick listener for the login button\r\n       \/\/ Redirecting the user to the login page\r\n       mLoginBtn.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n               startActivity(new Intent(getApplicationContext(),Login.class));\r\n           }\r\n       });\r\n\r\n\r\n   }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87444\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/android-digi-locker-output-scaled.webp\" alt=\"android digi locker output\" width=\"2560\" height=\"1547\" \/><\/p>\n<p><strong>Step 4:<\/strong> Creating Main Page Layout. It will allow the users to upload new documents and files to the firebase. Users can select the file using the file dialog. On the basis of the file type choosen an icon will be displayed on the screen. After selecting the file users can upload the file by clicking on the upload button to upload the file.<\/p>\n<p><strong>activity_main.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n   xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:layout_gravity=\"center\"\r\n   android:background=\"@drawable\/background\"\r\n   android:orientation=\"vertical\"\r\n   android:visibility=\"visible\"\r\n   tools:context=\".MainActivity\"&gt;\r\n\r\n   &lt;androidx.cardview.widget.CardView\r\n       android:id=\"@+id\/cardView\"\r\n       android:layout_width=\"150dp\"\r\n       android:layout_height=\"200dp\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginTop=\"20dp\"\r\n       android:background=\"@color\/white\"\r\n       android:backgroundTint=\"@color\/cardview3\"\r\n       android:visibility=\"gone\"\r\n       app:cardBackgroundColor=\"@color\/cardview3\"\r\n       app:cardCornerRadius=\"10dp\"\r\n       app:cardElevation=\"10dp\"\r\n       app:cardMaxElevation=\"10dp\"&gt;\r\n\r\n       &lt;ImageView\r\n           android:id=\"@+id\/imageView\"\r\n           android:layout_width=\"match_parent\"\r\n           android:layout_height=\"match_parent\"\r\n           android:layout_margin=\"10dp\"\r\n           android:contentDescription=\"@string\/image_content\"\r\n           android:scaleType=\"centerCrop\"\r\n           android:src=\"@drawable\/pdf\"\r\n           android:visibility=\"invisible\" \/&gt;\r\n\r\n   &lt;\/androidx.cardview.widget.CardView&gt;\r\n\r\n   &lt;EditText\r\n       android:id=\"@+id\/fileNameToBeSaved\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"100dp\"\r\n       android:layout_below=\"@+id\/cardView\"\r\n       android:layout_marginHorizontal=\"10dp\"\r\n       android:layout_marginTop=\"10dp\"\r\n       android:background=\"@drawable\/gradiantimage\"\r\n       android:gravity=\"bottom\"\r\n       android:hint=\"Enter name of File\"\r\n       android:lines=\"5\"\r\n       android:padding=\"20dp\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textColorHint=\"#535353\"\r\n       android:textSize=\"16sp\" \/&gt;\r\n  \r\n   &lt;LinearLayout\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"match_parent\"\r\n       android:layout_below=\"@+id\/fileNameToBeSaved\"\r\n       android:orientation=\"horizontal\"\r\n       android:weightSum=\"1\"&gt;\r\n\r\n       &lt;Button\r\n           android:id=\"@+id\/buttonChoose\"\r\n           android:layout_width=\"match_parent\"\r\n           android:layout_height=\"60dp\"\r\n           android:layout_below=\"@+id\/fileNameToBeSaved\"\r\n           android:layout_marginHorizontal=\"10dp\"\r\n           android:layout_marginTop=\"30dp\"\r\n           android:layout_weight=\"0.5\"\r\n           android:background=\"@drawable\/gradiant4\"\r\n           android:text=\"Choose\" \/&gt;\r\n\r\n       &lt;Button\r\n           android:id=\"@+id\/buttonUpload\"\r\n           android:layout_width=\"match_parent\"\r\n           android:layout_height=\"60dp\"\r\n           android:layout_below=\"@+id\/buttonChoose\"\r\n           android:layout_marginHorizontal=\"10dp\"\r\n           android:layout_marginTop=\"30dp\"\r\n           android:layout_weight=\"0.5\"\r\n           android:background=\"@drawable\/gradiant3\"\r\n           android:text=\"Upload\" \/&gt;\r\n\r\n   &lt;\/LinearLayout&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/showUploads\"\r\n       android:layout_width=\"250dp\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_alignParentBottom=\"true\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginBottom=\"10dp\"\r\n       android:background=\"@drawable\/gradiant5\"\r\n       android:gravity=\"center\"\r\n       android:onClick=\"showUploads\"\r\n       android:text=\"View Uploaded Files\"\r\n       android:textAllCaps=\"true\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textSize=\"20sp\"\r\n       android:textStyle=\"bold\" \/&gt;\r\n  \r\n&lt;\/RelativeLayout&gt;<\/pre>\n<p><strong>MainActivity.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Importing the required packages\r\npackage com.techvidvan.digilocker;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.appcompat.app.AppCompatActivity;\r\nimport androidx.cardview.widget.CardView;\r\n\r\nimport android.Manifest;\r\nimport android.app.ProgressDialog;\r\nimport android.content.Intent;\r\nimport android.graphics.Bitmap;\r\nimport android.graphics.drawable.Drawable;\r\nimport android.net.Uri;\r\nimport android.os.Bundle;\r\nimport android.provider.MediaStore;\r\nimport android.view.Menu;\r\nimport android.view.MenuInflater;\r\nimport android.view.MenuItem;\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.EditText;\r\nimport android.widget.ImageView;\r\nimport android.widget.Toast;\r\n\r\nimport com.google.android.gms.tasks.OnFailureListener;\r\nimport com.google.android.gms.tasks.OnSuccessListener;\r\nimport com.google.android.gms.tasks.Task;\r\nimport com.google.firebase.auth.FirebaseAuth;\r\nimport com.google.firebase.firestore.DocumentReference;\r\nimport com.google.firebase.firestore.FirebaseFirestore;\r\nimport com.google.firebase.storage.FirebaseStorage;\r\nimport com.google.firebase.storage.OnProgressListener;\r\nimport com.google.firebase.storage.StorageReference;\r\nimport com.google.firebase.storage.UploadTask;\r\nimport com.gun0912.tedpermission.PermissionListener;\r\nimport com.gun0912.tedpermission.TedPermission;\r\n\r\nimport java.io.IOException;\r\nimport java.util.HashMap;\r\nimport java.util.List;\r\nimport java.util.Map;\r\n\r\n\/\/ Creating a class for MainActivity\r\npublic class MainActivity extends AppCompatActivity implements View.OnClickListener {\r\n   \/\/ Creating a constant for the image request\r\n   private static final int PICK_IMAGE_REQUEST = 234;\r\n\r\n   \/\/ Creating variables for the buttons and imageview\r\n   private Button buttonChoose;\r\n   private Button buttonUpload;\r\n   private ImageView imageView;\r\n\r\n   \/\/ Creating a variable for the Uri and cardview\r\n   private Uri filePath;\r\n   private CardView cardView;\r\n\r\n   \/\/ Creating a variable for the Firebase Storage Reference and FirebaseAuth\r\n   private StorageReference storageReference = FirebaseStorage.getInstance().getReference();\r\n   private FirebaseAuth fAuth;\r\n\r\n\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_main);\r\n\r\n       \/\/ Assigning the variables to the respective views\r\n       buttonChoose = (Button) findViewById(R.id.buttonChoose);\r\n       buttonUpload = (Button) findViewById(R.id.buttonUpload);\r\n       cardView = (CardView) findViewById(R.id.cardView);\r\n       imageView = (ImageView) findViewById(R.id.imageView);\r\n\r\n       \/\/ Setting the onclick listener for the buttons\r\n       buttonChoose.setOnClickListener(this);\r\n       buttonUpload.setOnClickListener(this);\r\n\r\n       \/\/ Setting the visibility of the imageview\r\n       imageView.setVisibility(View.VISIBLE);\r\n\r\n       \/\/ Creating an instance for FirebaseAuth\r\n       fAuth = FirebaseAuth.getInstance();\r\n       Drawable myDrawable = getResources().getDrawable(R.mipmap.file_choose);\r\n       imageView.setImageDrawable(myDrawable);\r\n\r\n       \/\/ Checking if the user is logged in or not\r\n       \/\/ If the user is not logged in then the user will be redirected to the login page\r\n       if (fAuth.getCurrentUser() == null || (!fAuth.getCurrentUser().isEmailVerified())) {\r\n           startActivity(new Intent(getApplicationContext(), Login.class));\r\n           finish();\r\n       } else {\r\n\r\n           \/\/ If the user is logged and email is verified then it will ask for the permission\r\n           askPermission();\r\n       }\r\n\r\n\r\n   }\r\n\r\n   \/\/ Creating a method for the permission\r\n   private void askPermission() {\r\n\r\n       \/\/ Creating a permission listener\r\n       PermissionListener permissionListener = new PermissionListener() {\r\n\r\n           @Override\r\n           public void onPermissionGranted() {\r\n           }\r\n\r\n           @Override\r\n           public void onPermissionDenied(List&lt;String&gt; deniedPermissions) {\r\n           }\r\n       };\r\n\r\n       \/\/ Asking for the permission\r\n       TedPermission.with(MainActivity.this)\r\n               .setPermissionListener(permissionListener)\r\n               .setPermissions(Manifest.permission.READ_EXTERNAL_STORAGE, Manifest.permission.WRITE_EXTERNAL_STORAGE)\r\n               .check();\r\n\r\n   }\r\n\r\n   \/\/ Creating a method for the file chooser\r\n   private void showFileChooser() {\r\n       Intent intent = new Intent();\r\n       intent.setType(\"*\/*\");\r\n       intent.setAction(Intent.ACTION_GET_CONTENT);\r\n       startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE_REQUEST);\r\n   }\r\n\r\n   \/\/ Handling the image chooser activity result\r\n   @Override\r\n   protected void onActivityResult(int requestCode, int resultCode, Intent data) {\r\n       super.onActivityResult(requestCode, resultCode, data);\r\n       String retrieveFileName = null;\r\n\r\n       \/\/ Checking if the request code is the same as what is passed here it is 234\r\n       if (requestCode == PICK_IMAGE_REQUEST &amp;&amp; resultCode == RESULT_OK &amp;&amp; data != null &amp;&amp; data.getData() != null) {\r\n           filePath = data.getData();\r\n\r\n           retrieveFileName = data.getData().getLastPathSegment().toLowerCase();\r\n\r\n\r\n           \/\/ Setting the image to the imageview based on the file type\r\n           if (retrieveFileName.contains(\"image\")) {\r\n               try {\r\n                   Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\r\n                   imageView.setImageBitmap(bitmap);\r\n               } catch (IOException e) {\r\n                   e.printStackTrace();\r\n               }\r\n\r\n           } else if (retrieveFileName.contains(\".ai\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.ai);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".apk\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.apk);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".avi\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.avi);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".css\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.css);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".csv\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.csv);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".dbf\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.dbf);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".doc\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.doc);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".exe\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.exe);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".fla\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.fla);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".gif\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.gif);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".htm\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.html);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".html\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.html);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".jpg\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.jpg);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".json\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.jsn);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".htm\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.html);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".mp3\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.mp3);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".mp4\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.mp4);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".ods\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.ods);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".odt\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.odt);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".pdf\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.pdf);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".png\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.png);\r\n               imageView.setImageDrawable(myDrawable);\r\n\r\n           } else if (retrieveFileName.contains(\".ppt\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.ppt);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".pptx\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.ppt);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".svg\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.svg);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".txt\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.txt);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".xls\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.xls);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".xlsx\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.xls);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".xml\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.xml);\r\n               imageView.setImageDrawable(myDrawable);\r\n           } else if (retrieveFileName.contains(\".zip\")) {\r\n               Drawable myDrawable = getResources().getDrawable(R.drawable.zip);\r\n               imageView.setImageDrawable(myDrawable);\r\n           }\r\n       } else {\r\n           Drawable myDrawable = getResources().getDrawable(R.drawable.question);\r\n           imageView.setImageDrawable(myDrawable);\r\n       }\r\n\r\n       \/\/ Setting the visibility of the imageview\r\n       cardView.setVisibility(View.VISIBLE);\r\n\r\n       \/\/ Setting the name of the file to be saved\r\n       EditText choosenFileName = findViewById(R.id.fileNameToBeSaved);\r\n       if (retrieveFileName.contains(\"image\")) {\r\n           choosenFileName.setText(retrieveFileName + \".jpg\");\r\n       } else {\r\n           choosenFileName.setText(retrieveFileName);\r\n       }\r\n   }\r\n\r\n\r\n\r\n   \/\/ Creating the method to upload the file\r\n   private void uploadFile() {\r\n\r\n       \/\/ Getting the name of the file to be saved\r\n       EditText fileName = findViewById(R.id.fileNameToBeSaved);\r\n\r\n       \/\/ Checking whether the file type is supported or not, depending on the file extension\r\n       if (fileName.getText().toString().contains(\".jpg\") || fileName.getText().toString().contains(\".mp3\") || fileName.getText().toString().contains(\".mp4\")\r\n               || fileName.getText().toString().contains(\".pdf\") || fileName.getText().toString().contains(\".txt\") || fileName.getText().toString().contains(\".doc\")\r\n               || fileName.getText().toString().contains(\".docx\") || fileName.getText().toString().contains(\".ppt\") || fileName.getText().toString().contains(\".pptx\")\r\n               || fileName.getText().toString().contains(\".apk\") || fileName.getText().toString().contains(\".xls\") || fileName.getText().toString().contains(\".xlsx\")\r\n               || fileName.getText().toString().contains(\".zip\") || fileName.getText().toString().contains(\".gif\") || fileName.getText().toString().contains(\".htm\")\r\n               || fileName.getText().toString().contains(\".html\") || fileName.getText().toString().contains(\".jpeg\") || fileName.getText().toString().contains(\".jpg\")\r\n               || fileName.getText().toString().contains(\".ods\") || fileName.getText().toString().contains(\".odt\") || fileName.getText().toString().contains(\".svg\")\r\n               || fileName.getText().toString().contains(\".ai\") || fileName.getText().toString().contains(\".exe\") || fileName.getText().toString().contains(\".fla\")\r\n               || fileName.getText().toString().contains(\".json\") || fileName.getText().toString().contains(\".xml\") || fileName.getText().toString().contains(\".png\")\r\n               || fileName.getText().toString().contains(\".exe\")) {\r\n\r\n\r\n           \/\/ Checking whether the file is selected or not\r\n           if (filePath != null) {\r\n               \/\/ Code for showing progressDialog while uploading\r\n               ProgressDialog progressDialog = new ProgressDialog(this);\r\n               progressDialog.setTitle(\"Uploading\");\r\n               progressDialog.show();\r\n\r\n               \/\/ Getting the name of the file to be saved\r\n               String name = fileName.getText().toString().trim();\r\n               StorageReference riversRef = storageReference.child(fAuth.getCurrentUser().getEmail()).child(name);\r\n\r\n               \/\/ Adding addOnSuccessListener to second StorageReference\r\n               riversRef.putFile(filePath)\r\n                       .addOnSuccessListener(new OnSuccessListener&lt;UploadTask.TaskSnapshot&gt;() {\r\n                           @Override\r\n                           public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\r\n                               \/\/ If the upload is successfull, hiding the progress dialog\r\n\r\n                               taskSnapshot.getStorage().getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {\r\n                                   @Override\r\n                                   public void onSuccess(Uri uri) {\r\n\r\n                                       progressDialog.dismiss();\r\n                                       \/\/ Displaying a success toast message\r\n                                       Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\r\n\r\n                                       \/\/ Creating a map to store the name and link of the file\r\n                                       Map&lt;String, Object&gt; user = new HashMap&lt;&gt;();\r\n                                       user.put(\"name\", riversRef.getName());\r\n                                       user.put(\"link\", uri.toString());\r\n\r\n                                       \/\/ Adding the map to the Firestore database\r\n                                       FirebaseFirestore db = FirebaseFirestore.getInstance();\r\n                                       DocumentReference documentReference = db.collection(fAuth.getCurrentUser().getEmail()).document();\r\n                                       documentReference.set(user);\r\n                                   }\r\n                               });\r\n\r\n                           }\r\n                       })\r\n                       .addOnFailureListener(new OnFailureListener() {\r\n                           @Override\r\n                           public void onFailure(@NonNull Exception exception) {\r\n                               \/\/ If the upload is not successfull, hiding the progress dialog\r\n                               progressDialog.dismiss();\r\n\r\n                               \/\/ And displaying error message\r\n                               Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\r\n                           }\r\n                       })\r\n                       .addOnProgressListener(new OnProgressListener&lt;UploadTask.TaskSnapshot&gt;() {\r\n                           @Override\r\n                           public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\r\n                               \/\/ Calculating progress percentage\r\n                               double progress = (100.0 * taskSnapshot.getBytesTransferred()) \/ taskSnapshot.getTotalByteCount();\r\n\r\n                               \/\/ Displaying percentage in progress dialog\r\n                               progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\r\n                           }\r\n                       });\r\n           }\r\n           \/\/ If the file is not selected\r\n           else {\r\n               \/\/ Displaying an error toast\r\n               Toast.makeText(getApplicationContext(), \"File not Selected\", Toast.LENGTH_SHORT).show();\r\n           }\r\n       } else {\r\n           fileName.setError(\"File Extension required!\");\r\n           return;\r\n       }\r\n   }\r\n\r\n   \/\/ Creating the method for choose the file and uploading button\r\n   @Override\r\n   public void onClick(View view) {\r\n       \/\/ If the clicked button is choose\r\n       if (view == buttonChoose) {\r\n           showFileChooser();\r\n       }\r\n       \/\/ If the clicked button is upload\r\n       else if (view == buttonUpload) {\r\n           uploadFile();\r\n       } else {\r\n           return;\r\n       }\r\n   }\r\n\r\n   \/\/ Creating the Menu for the activity\r\n   @Override\r\n   public boolean onCreateOptionsMenu(Menu menu) {\r\n       MenuInflater inflater = getMenuInflater();\r\n       inflater.inflate(R.menu.main_menu, menu);\r\n       return true;\r\n   }\r\n\r\n   @Override\r\n   public boolean onOptionsItemSelected(@NonNull MenuItem item) {\r\n\r\n       \/\/ Creating the switch case for the menu items\r\n       switch (item.getItemId()) {\r\n\r\n           \/\/ If the item is logout, then sign out the user and redirect to the login page\r\n           case R.id.logout_id:\r\n               fAuth.signOut();\r\n               startActivity(new Intent(getApplicationContext(), Login.class));\r\n               finish();\r\n               break;\r\n           default:\r\n               Toast.makeText(MainActivity.this, \"Error\", Toast.LENGTH_SHORT).show();\r\n               break;\r\n       }\r\n\r\n       return true;\r\n   }\r\n\r\n   \/\/ If user clicks on the View Uploads button, then redirect to the DownloadFiles activity\r\n   public void showUploads(View view) {\r\n       startActivity(new Intent(getApplicationContext(), DownloadFiles.class));\r\n       finish();\r\n   }\r\n\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87445\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/digi-locker-output-scaled.webp\" alt=\"digi locker output\" width=\"2560\" height=\"1552\" \/><\/p>\n<p><strong>Step 5:<\/strong> Creating Download files Page Layout to view list of files uploaded by the user. It will show the name of the file and an icon, based on file type. From this page users can download and delete the uploaded files.<\/p>\n<p><strong>activity_download_files.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;RelativeLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n   xmlns:tools=\"http:\/\/schemas.android.com\/tools\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:background=\"@drawable\/background\"\r\n   android:orientation=\"vertical\"\r\n   android:layout_gravity=\"center\"\r\n   tools:context=\".DownloadFiles\"&gt;\r\n\r\n   &lt;androidx.recyclerview.widget.RecyclerView\r\n       android:id=\"@+id\/recycle\"\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"match_parent\"\r\n       android:layout_marginBottom=\"7dp\" \/&gt;\r\n\r\n   &lt;TextView\r\n       android:id=\"@+id\/textView2\"\r\n       android:layout_width=\"150dp\"\r\n       android:layout_height=\"50dp\"\r\n       android:layout_alignParentBottom=\"true\"\r\n       android:layout_centerHorizontal=\"true\"\r\n       android:layout_marginBottom=\"20dp\"\r\n       android:background=\"@drawable\/gradiant3\"\r\n       android:elevation=\"30dp\"\r\n       android:shadowColor=\"@color\/white\"\r\n       android:shadowDx=\"0\"\r\n       android:shadowDy=\"0\"\r\n       android:shadowRadius=\"10\"\r\n\r\n       android:onClick=\"goToDownloads\"\r\n       android:gravity=\"center\"\r\n       android:text=\"Back\"\r\n       android:textStyle=\"bold\"\r\n       android:textColor=\"@color\/black\"\r\n       android:textSize=\"24sp\" \/&gt;\r\n\r\n&lt;\/RelativeLayout&gt;<\/pre>\n<p><strong>DownloadFiles.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Importing the required libraries\r\npackage com.techvidvan.digilocker;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.appcompat.app.AppCompatActivity;\r\nimport androidx.recyclerview.widget.LinearLayoutManager;\r\nimport androidx.recyclerview.widget.RecyclerView;\r\n\r\nimport android.content.Intent;\r\nimport android.os.Bundle;\r\nimport android.view.View;\r\nimport android.widget.Toast;\r\n\r\nimport com.google.android.gms.tasks.OnCompleteListener;\r\nimport com.google.android.gms.tasks.OnFailureListener;\r\nimport com.google.android.gms.tasks.Task;\r\nimport com.google.firebase.auth.FirebaseAuth;\r\nimport com.google.firebase.firestore.DocumentSnapshot;\r\nimport com.google.firebase.firestore.FirebaseFirestore;\r\nimport com.google.firebase.firestore.QuerySnapshot;\r\n\r\nimport java.util.ArrayList;\r\n\r\n\/\/ Creating a class for DownloadFiles\r\npublic class DownloadFiles extends AppCompatActivity {\r\n\r\n   \/\/ Creating an object for FirebaseFirestore\r\n   FirebaseFirestore db;\r\n\r\n   \/\/ Declaring all the variables\r\n   RecyclerView mRecyclerView;\r\n   ArrayList&lt;DownModel&gt; downModelArrayList = new ArrayList&lt;&gt;();\r\n   MyAdapter myAdapter;\r\n   private FirebaseAuth fAuth = FirebaseAuth.getInstance();\r\n\r\n\r\n   @Override\r\n   protected void onCreate(Bundle savedInstanceState) {\r\n       super.onCreate(savedInstanceState);\r\n       setContentView(R.layout.activity_download_files);\r\n\r\n       \/\/ Calling the methods to set up the RecyclerView and Firebase\r\n       setUpRV();\r\n       setUpFB();\r\n\r\n       \/\/ Calling the method to get the data from Firebase\r\n       dataFromFirebase();\r\n\r\n   }\r\n\r\n   \/\/ Creating a method to get the data from Firebase\r\n   private void dataFromFirebase() {\r\n\r\n       \/\/ Checking if the ArrayList is empty or not\r\n       if(downModelArrayList.size()&gt;0)\r\n           downModelArrayList.clear();\r\n\r\n       \/\/ Getting the data from Firebase\r\n       \/\/ If the data is retrieved successfully, then the data is added to the ArrayList\r\n       db.collection(fAuth.getCurrentUser().getEmail())\r\n               .get()\r\n               .addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {\r\n\r\n                   @Override\r\n                   public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {\r\n\r\n                       for(DocumentSnapshot documentSnapshot: task.getResult()) {\r\n\r\n                           DownModel downModel= new DownModel(documentSnapshot.getString(\"name\"),\r\n                                   documentSnapshot.getString(\"link\"));\r\n                           downModelArrayList.add(downModel);\r\n\r\n                       }\r\n\r\n                       \/\/ Setting the adapter to the RecyclerView\r\n                       myAdapter= new MyAdapter(DownloadFiles.this,downModelArrayList);\r\n                       mRecyclerView.setAdapter(myAdapter);\r\n                   }\r\n               })\r\n\r\n               .addOnFailureListener(new OnFailureListener() {\r\n                   @Override\r\n                   public void onFailure(@NonNull Exception e) {\r\n                       Toast.makeText(DownloadFiles.this, \"Error ;-.-;\", Toast.LENGTH_SHORT).show();\r\n                   }\r\n               });\r\n\r\n\r\n   }\r\n\r\n   \/\/ Creating a method to set up the Firebase\r\n   private void setUpFB(){\r\n       db=FirebaseFirestore.getInstance();\r\n   }\r\n\r\n   \/\/ Creating a method to set up the RecyclerView\r\n   private void setUpRV(){\r\n       mRecyclerView= findViewById(R.id.recycle);\r\n       mRecyclerView.setHasFixedSize(true);\r\n       mRecyclerView.setLayoutManager(new LinearLayoutManager(this));\r\n   }\r\n\r\n   \/\/ Creating a method to go to the Downloads page\r\n   public void goToDownloads(View view){\r\n       startActivity(new Intent(getApplicationContext(),MainActivity.class));\r\n       finish();\r\n   }\r\n\r\n\r\n}<\/pre>\n<p><strong>DownModel.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ This is the model class for the download list\r\npackage com.techvidvan.digilocker;\r\n\r\n\/\/ Creating a class for DownModel\r\npublic class DownModel {\r\n\r\n   \/\/ Declaring all the variables\r\n   String Name,Link;\r\n\r\n\r\n   \/\/ Creating a getter and setter for each variable\r\n   public String getName() {\r\n       return Name;\r\n   }\r\n\r\n   public void setName(String name) {\r\n       Name = name;\r\n   }\r\n\r\n   public String getLink() {\r\n       return Link;\r\n   }\r\n\r\n   public void setLink(String link) {\r\n       Link = link;\r\n   }\r\n\r\n   \/\/ Creating a constructor for the DownModel class\r\n   public DownModel(String Name, String Link){\r\n       this.Link=Link;\r\n       this.Name=Name;\r\n\r\n   }\r\n\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87446\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/digi-locker-project-output-scaled.webp\" alt=\"digi locker project output\" width=\"2560\" height=\"1552\" \/><\/p>\n<p><strong>Step 6:<\/strong> Creating layout for the list in the Download Files page layout.<\/p>\n<p><strong>elements.xml<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;\r\n&lt;LinearLayout xmlns:android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\r\n   xmlns:app=\"http:\/\/schemas.android.com\/apk\/res-auto\"\r\n   android:layout_width=\"match_parent\"\r\n   android:layout_height=\"match_parent\"\r\n   android:orientation=\"vertical\"&gt;\r\n\r\n   &lt;androidx.cardview.widget.CardView\r\n       android:layout_width=\"match_parent\"\r\n       android:layout_height=\"wrap_content\"\r\n       android:layout_margin=\"10dp\"\r\n       android:outlineSpotShadowColor=\"@color\/white\"\r\n       app:cardCornerRadius=\"25dp\"\r\n       app:cardElevation=\"10dp\"&gt;\r\n\r\n       &lt;LinearLayout\r\n           android:layout_width=\"match_parent\"\r\n           android:layout_height=\"100dp\"\r\n           android:background=\"@drawable\/gradiantimage\"\r\n           android:orientation=\"horizontal\"&gt;\r\n\r\n           &lt;LinearLayout\r\n               android:layout_width=\"match_parent\"\r\n               android:layout_height=\"match_parent\"\r\n               android:layout_marginLeft=\"10dp\"\r\n               android:layout_weight=\"1\"\r\n               android:orientation=\"horizontal\"&gt;\r\n\r\n               &lt;androidx.cardview.widget.CardView\r\n                   android:layout_width=\"wrap_content\"\r\n                   android:layout_height=\"wrap_content\"\r\n                   app:cardCornerRadius=\"5dp\"\r\n                   app:cardElevation=\"10dp\"&gt;\r\n\r\n\r\n                   &lt;ImageView\r\n                       android:id=\"@+id\/image\"\r\n                       android:layout_width=\"62dp\"\r\n                       android:layout_height=\"82dp\"\r\n                       android:contentDescription=\"@string\/image_content\"\r\n                       android:scaleType=\"centerCrop\"\r\n                       android:src=\"@drawable\/apk\" \/&gt;\r\n\r\n               &lt;\/androidx.cardview.widget.CardView&gt;\r\n\r\n               &lt;TextView\r\n                   android:id=\"@+id\/name\"\r\n                   android:layout_width=\"match_parent\"\r\n                   android:layout_height=\"match_parent\"\r\n                   android:paddingLeft=\"15px\"\r\n                   android:paddingTop=\"6dp\"\r\n                   android:paddingBottom=\"6dp\"\r\n                   android:text=\"Name\"\r\n                   android:textColor=\"@color\/black\"\r\n                   android:textSize=\"16sp\" \/&gt;\r\n\r\n               &lt;TextView\r\n                   android:id=\"@+id\/link\"\r\n                   android:layout_width=\"match_parent\"\r\n                   android:layout_height=\"match_parent\"\r\n                   android:text=\"Download Link\"\r\n                   android:textSize=\"8sp\"\r\n                   android:visibility=\"gone\" \/&gt;\r\n\r\n           &lt;\/LinearLayout&gt;\r\n\r\n           &lt;androidx.appcompat.widget.AppCompatButton\r\n               android:id=\"@+id\/down\"\r\n               android:layout_width=\"wrap_content\"\r\n               android:layout_height=\"wrap_content\"\r\n               android:layout_gravity=\"center\"\r\n               android:layout_margin=\"5dp\"\r\n               android:layout_weight=\".350\"\r\n               android:background=\"@drawable\/gradiant4\"\r\n               android:elevation=\"7dp\"\r\n               android:foreground=\"@drawable\/download\" \/&gt;\r\n\r\n           &lt;androidx.appcompat.widget.AppCompatButton\r\n               android:id=\"@+id\/delete\"\r\n               style=\"@style\/Widget.AppCompat.Button\"\r\n               android:layout_width=\"wrap_content\"\r\n               android:layout_height=\"wrap_content\"\r\n               android:layout_gravity=\"center\"\r\n               android:layout_margin=\"5dp\"\r\n               android:layout_weight=\".350\"\r\n               android:background=\"@drawable\/gradiant4\"\r\n               android:elevation=\"7dp\"\r\n               android:foreground=\"@drawable\/delete\" \/&gt;\r\n\r\n       &lt;\/LinearLayout&gt;\r\n\r\n   &lt;\/androidx.cardview.widget.CardView&gt;\r\n&lt;\/LinearLayout&gt;<\/pre>\n<p><strong>MyViewholder.java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ This class is used to hold the view of the recycler view item.\r\n\r\n\/\/ Importing all the required packages\r\npackage com.techvidvan.digilocker;\r\n\r\nimport android.view.View;\r\nimport android.widget.Button;\r\nimport android.widget.ImageView;\r\nimport android.widget.TextView;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.recyclerview.widget.RecyclerView;\r\n\r\n\/\/ Creating a class for MyViewHolder\r\npublic class MyViewHolder extends RecyclerView.ViewHolder {\r\n\r\n   \/\/ Declaring all the variables\r\n   TextView mName;\r\n   TextView mLink;\r\n   ImageView mImage;\r\n   Button mDownload;\r\n   Button mDelete;\r\n\r\n   \/\/ Creating a constructor for MyViewHolder\r\n   public MyViewHolder(@NonNull View itemView) {\r\n       super(itemView);\r\n\r\n       \/\/ Assigning the variables to the respective views\r\n       mName=itemView.findViewById(R.id.name);\r\n       mLink=itemView.findViewById(R.id.link);\r\n       mDownload=itemView.findViewById(R.id.down);\r\n       mDelete=itemView.findViewById(R.id.delete);\r\n       mImage=itemView.findViewById(R.id.image);\r\n\r\n\r\n   }\r\n}<\/pre>\n<p><strong>MyAdapter:java<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ This is the adapter class for the recycler view\r\n\/\/ It is used to set the data to the recycler view\r\n\r\n\/\/ Importing the required packages\r\npackage com.techvidvan.digilocker;\r\n\r\nimport android.annotation.SuppressLint;\r\nimport android.app.AlertDialog;\r\nimport android.app.DownloadManager;\r\nimport android.content.Context;\r\nimport android.content.DialogInterface;\r\nimport android.graphics.drawable.Drawable;\r\nimport android.net.Uri;\r\nimport android.os.Environment;\r\nimport android.util.Log;\r\nimport android.view.LayoutInflater;\r\nimport android.view.View;\r\nimport android.view.ViewGroup;\r\nimport android.widget.Toast;\r\n\r\nimport androidx.annotation.NonNull;\r\nimport androidx.recyclerview.widget.RecyclerView;\r\n\r\nimport com.google.android.gms.tasks.OnFailureListener;\r\nimport com.google.android.gms.tasks.OnSuccessListener;\r\nimport com.google.android.gms.tasks.Task;\r\nimport com.google.firebase.auth.FirebaseAuth;\r\nimport com.google.firebase.firestore.DocumentSnapshot;\r\nimport com.google.firebase.firestore.FirebaseFirestore;\r\nimport com.google.firebase.firestore.QuerySnapshot;\r\nimport com.google.firebase.storage.FirebaseStorage;\r\nimport com.google.firebase.storage.StorageReference;\r\nimport com.squareup.picasso.Picasso;\r\n\r\nimport java.io.File;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\nimport static android.os.Environment.DIRECTORY_DOWNLOADS;\r\n\r\n\/\/ Creating a class for MyAdapter\r\npublic class MyAdapter extends RecyclerView.Adapter&lt;MyViewHolder&gt; {\r\n\r\n   \/\/ Declaring all the variables\r\n   DownloadFiles downloadFiles;\r\n   ArrayList&lt;DownModel&gt; downModels;\r\n   private StorageReference storageReference = FirebaseStorage.getInstance().getReference();\r\n   private FirebaseAuth fAuth = FirebaseAuth.getInstance();\r\n\r\n\r\n   \/\/ Creating a constructor for the MyAdapter class\r\n   public MyAdapter(DownloadFiles downloadFiles, ArrayList&lt;DownModel&gt; downModels) {\r\n       this.downloadFiles = downloadFiles;\r\n       this.downModels = downModels;\r\n   }\r\n\r\n   @NonNull\r\n   @Override\r\n   public MyViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {\r\n\r\n       \/\/ Setting the layout for the recycler view\r\n       LayoutInflater layoutInflater = LayoutInflater.from(downloadFiles.getBaseContext());\r\n       View view = layoutInflater.inflate(R.layout.elements, null, false);\r\n\r\n       return new MyViewHolder(view);\r\n   }\r\n\r\n\r\n   @Override\r\n   public void onBindViewHolder(@NonNull final MyViewHolder myViewHolder, @SuppressLint(\"RecyclerView\") final int i) {\r\n\r\n       \/\/ Setting the data to the recycler view\r\n       myViewHolder.mName.setText(downModels.get(i).getName());\r\n       myViewHolder.mLink.setText(downModels.get(i).getLink());\r\n\r\n       \/\/ Checking the file extension and setting the image accordingly\r\n       if (downModels.get(i).getName().endsWith(\".ai\") ){\r\n           myViewHolder.mImage.setImageResource(R.drawable.ai);\r\n       } else if (downModels.get(i).getName().endsWith(\".apk\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.apk);\r\n       } else if (downModels.get(i).getName().endsWith(\".avi\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.avi);\r\n       }  else if (downModels.get(i).getName().endsWith(\".css\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.css);\r\n       } else if (downModels.get(i).getName().endsWith(\".csv\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.csv);\r\n       } else if (downModels.get(i).getName().endsWith(\".dbf\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.dbf);\r\n       } else if (downModels.get(i).getName().endsWith(\".doc\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.doc);\r\n       } else if (downModels.get(i).getName().endsWith(\".docx\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.doc);\r\n       } else if (downModels.get(i).getName().endsWith(\".exe\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.exe);\r\n       } else if (downModels.get(i).getName().endsWith(\".fla\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.fla);\r\n       } else if (downModels.get(i).getName().endsWith(\".gif\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.gif);\r\n       } else if (downModels.get(i).getName().endsWith(\".html\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.html);\r\n       } else if (downModels.get(i).getName().endsWith(\".htm\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.html);\r\n       } else if (downModels.get(i).getName().endsWith(\".jpeg\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.jpg);\r\n       } else if (downModels.get(i).getName().endsWith(\".jpg\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.jpg);\r\n       } else if (downModels.get(i).getName().endsWith(\".mp3\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.mp3);\r\n       } else if (downModels.get(i).getName().endsWith(\".mp4\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.mp4);\r\n       } else if (downModels.get(i).getName().endsWith(\".pdf\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.pdf);\r\n       } else if (downModels.get(i).getName().endsWith(\".png\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.png);\r\n       } else if (downModels.get(i).getName().endsWith(\".ppt\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.ppt);\r\n       } else if (downModels.get(i).getName().endsWith(\".pptx\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.ppt);\r\n       } else if (downModels.get(i).getName().endsWith(\".ods\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.ods);\r\n       } else if (downModels.get(i).getName().endsWith(\".odt\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.odt);\r\n       } else if (downModels.get(i).getName().endsWith(\".svg\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.svg);\r\n       } else if (downModels.get(i).getName().endsWith(\".txt\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.txt);\r\n       } else if (downModels.get(i).getName().endsWith(\".xls\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.xls);\r\n       } else if (downModels.get(i).getName().endsWith(\".xlsx\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.xls);\r\n       } else if (downModels.get(i).getName().endsWith(\".xml\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.xml);\r\n       } else if (downModels.get(i).getName().endsWith(\".zip\")) {\r\n           myViewHolder.mImage.setImageResource(R.drawable.zip);\r\n       } else {\r\n           myViewHolder.mImage.setImageResource(R.drawable.question);\r\n       }\r\n\r\n       \/\/ Setting the click listener for the download button\r\n       myViewHolder.mDownload.setOnClickListener(new View.OnClickListener() {\r\n           @Override\r\n           public void onClick(View v) {\r\n               StorageReference riversRef = storageReference.child(fAuth.getCurrentUser().getEmail()).child(downModels.get(i).getName());\r\n\r\n               Task&lt;Uri&gt; url = riversRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener&lt;Uri&gt;() {\r\n\r\n                   public void onSuccess(Uri uri) {\r\n\r\n                       \/\/ Downloading the file\r\n                       DownloadManager.Request request = new DownloadManager.Request(uri);\r\n                       request.setAllowedNetworkTypes(DownloadManager.Request.NETWORK_WIFI | DownloadManager.Request.NETWORK_MOBILE);\r\n                       request.setTitle(downModels.get(i).getName());\r\n                       request.setDescription(\"Downloading file...\");\r\n\r\n                       request.allowScanningByMediaScanner();\r\n                       request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\r\n                       request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, downModels.get(i).getName());\r\n\r\n                       DownloadManager manager = (DownloadManager) downloadFiles.getSystemService(Context.DOWNLOAD_SERVICE);\r\n                       manager.enqueue(request);\r\n\r\n                       return;\r\n\r\n                   }\r\n               });\r\n\r\n           }\r\n       });\r\n\r\n       myViewHolder.mDelete.setOnClickListener(new View.OnClickListener() {\r\n\r\n           @Override\r\n           public void onClick(View view) {\r\n               \/\/Create a dialog box to confirm the deletion\r\n\r\n               Log.d(\"TAG\", \"Delete\");\r\n\r\n               AlertDialog.Builder builder = new AlertDialog.Builder(downloadFiles);\r\n               builder.setTitle(\"Delete\");\r\n               builder.setMessage(\"Are you sure you want to delete this file?\");\r\n\r\n               builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\r\n                   @Override\r\n                   public void onClick(DialogInterface dialog, int which) {\r\n                       StorageReference riversRef = storageReference.child(fAuth.getCurrentUser().getEmail()).child(downModels.get(i).getName());\r\n                       riversRef.delete();\r\n\r\n                       FirebaseFirestore.getInstance().collection(fAuth.getCurrentUser().getEmail())\r\n                               .whereEqualTo(\"name\", downModels.get(i).getName())\r\n                               .get()\r\n                               .addOnSuccessListener(new OnSuccessListener&lt;QuerySnapshot&gt;() {\r\n                                   @Override\r\n                                   public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\r\n\r\n\r\n                                       List&lt;DocumentSnapshot&gt; snapshotList = queryDocumentSnapshots.getDocuments();\r\n                                       for (DocumentSnapshot snapshot : snapshotList) {\r\n                                           FirebaseFirestore.getInstance().collection(fAuth.getCurrentUser().getEmail()).document(snapshot.getId()).delete();\r\n                                       }\r\n\r\n                                   }\r\n                               }).addOnFailureListener(new OnFailureListener() {\r\n                                   @Override\r\n                                   public void onFailure(@NonNull Exception e) {\r\n                                       Toast.makeText(downloadFiles, \"Error!\", Toast.LENGTH_SHORT).show();\r\n                                   }\r\n                               });\r\n\r\n                       myViewHolder.itemView.setVisibility(View.INVISIBLE);\r\n\r\n\r\n                   }\r\n               });\r\n\r\n\r\n               builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\r\n                   @Override\r\n                   public void onClick(DialogInterface dialog, int which) {\r\n                       dialog.dismiss();\r\n\r\n                   }\r\n\r\n               });\r\n\r\n               AlertDialog dialog = builder.create();\r\n               dialog.show();\r\n\r\n           }\r\n       });\r\n\r\n   }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\/\/                Log.d(\"TAG\",\"Delete\");\r\n\/\/\r\n\/\/                StorageReference riversRef = storageReference.child(fAuth.getCurrentUser().getEmail()).child(downModels.get(i).getName());\r\n\/\/                riversRef.delete();\r\n\/\/\r\n\/\/                FirebaseFirestore.getInstance().collection(fAuth.getCurrentUser().getEmail())\r\n\/\/                        .whereEqualTo(\"name\",downModels.get(i).getName())\r\n\/\/                        .get()\r\n\/\/                        .addOnSuccessListener(new OnSuccessListener&lt;QuerySnapshot&gt;() {\r\n\/\/                            @Override\r\n\/\/                            public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\r\n\/\/\r\n\/\/\r\n\/\/                                List&lt;DocumentSnapshot&gt; snapshotList = queryDocumentSnapshots.getDocuments();\r\n\/\/                                for(DocumentSnapshot snapshot: snapshotList){\r\n\/\/                                    FirebaseFirestore.getInstance().collection(fAuth.getCurrentUser().getEmail()).document(snapshot.getId()).delete();\r\n\/\/                                }\r\n\/\/\r\n\/\/                            }\r\n\/\/                        }).addOnFailureListener(new OnFailureListener() {\r\n\/\/                            @Override\r\n\/\/                            public void onFailure(@NonNull Exception e) {\r\n\/\/\r\n\/\/                            }\r\n\/\/                        });\r\n\/\/\r\n\/\/                myViewHolder.itemView.setVisibility(View.INVISIBLE);\r\n\/\/\r\n\/\/            }\r\n\/\/        });\r\n\/\/\r\n\/\/\r\n\/\/    }\r\n\r\n   public void downloadFile(Context context, String fileName,String destinationDirectory, String url) {\r\n\r\n       File file = new File(Environment.getExternalStorageDirectory(),\"Download\/\"+fileName);\r\n       DownloadManager downloadmanager = (DownloadManager) context.\r\n               getSystemService(Context.DOWNLOAD_SERVICE);\r\n       Uri uri = Uri.parse(url);\r\n       DownloadManager.Request request = new DownloadManager.Request(uri)\r\n\r\n       .setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED)\r\n       .setDestinationUri(Uri.fromFile(file));\r\n       downloadmanager.enqueue(request);\r\n   }\r\n\r\n\r\n   @Override\r\n   public int getItemCount() {\r\n       return downModels.size();\r\n   }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87447\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/android-digi-locker-project-output-scaled.webp\" alt=\"android digi locker project output\" width=\"2560\" height=\"1552\" \/><\/p>\n<p>Now the app is complete and ready to be used<\/p>\n<h3>Android Digi Locker Output<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87448\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/login-register-output.webp\" alt=\"login register output\" width=\"2188\" height=\"2078\" \/><\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-87449 alignnone\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/digi-locker-app-output.webp\" alt=\"digi locker app output\" width=\"2221\" height=\"2102\" \/><\/h3>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87450\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/digi-locker-app-project-output.webp\" alt=\"digi locker app project output\" width=\"2250\" height=\"2090\" \/><\/h3>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-87453\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2023\/03\/androi-digi-locker-app-output-1.webp\" alt=\"androi digi locker app output\" width=\"2227\" height=\"2060\" \/><\/h3>\n<h3>Summary<\/h3>\n<p>Congratulations, you have successfully created a digital locker Android app that allows users to securely upload and download files to and from Firebase storage. You can now customize the app to add more features according to your needs, such as file sharing, file encryption, and more.<\/p>\n<p>This project has given you a basic understanding of how to integrate Firebase storage in Android apps and build a functional digital locker app.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this project, we will be creating an Android Digi Locker app that allows users to securely save their documents and files on Firebase storage and download them when needed. With the increasing need&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":87441,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2791],"tags":[4935,4936,4937,4938,4910,3007,3010,4939,4940],"class_list":["post-87402","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-android","tag-android-digi-locker","tag-android-digi-locker-app","tag-android-digi-locker-app-project","tag-android-digi-locker-project","tag-android-project-for-practice","tag-android-project-ideas","tag-android-projects","tag-digi-locker-app-project","tag-digi-locker-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Android Digi Locker - The Future of Document Storage - TechVidvan<\/title>\n<meta name=\"description\" content=\"Lock up your worries, unlock your freedom with Android Digi Locker - the digital vault for your peace of mind!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Android Digi Locker - The Future of Document Storage - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Lock up your worries, unlock your freedom with Android Digi Locker - the digital vault for your peace of mind!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-31T07:57:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-03T07:24:04+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Android Digi Locker - The Future of Document Storage - TechVidvan","description":"Lock up your worries, unlock your freedom with Android Digi Locker - the digital vault for your peace of mind!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/","og_locale":"en_US","og_type":"article","og_title":"Android Digi Locker - The Future of Document Storage - TechVidvan","og_description":"Lock up your worries, unlock your freedom with Android Digi Locker - the digital vault for your peace of mind!","og_url":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2023-03-31T07:57:13+00:00","article_modified_time":"2026-06-03T07:24:04+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Android Digi Locker &#8211; The Future of Document Storage","datePublished":"2023-03-31T07:57:13+00:00","dateModified":"2026-06-03T07:24:04+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/"},"wordCount":520,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp","keywords":["android digi locker","android digi locker app","android digi locker app project","android digi locker project","android project for practice","android project ideas","android projects","digi locker app project","digi locker project"],"articleSection":["Android Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/","url":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/","name":"Android Digi Locker - The Future of Document Storage - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp","datePublished":"2023-03-31T07:57:13+00:00","dateModified":"2026-06-03T07:24:04+00:00","description":"Lock up your worries, unlock your freedom with Android Digi Locker - the digital vault for your peace of mind!","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2023\/03\/android-project-digi-locker.webp","width":1200,"height":628,"caption":"android project digi locker"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/android-digi-locker\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Android Digi Locker &#8211; The Future of Document Storage"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=87402"}],"version-history":[{"count":1,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87402\/revisions"}],"predecessor-version":[{"id":447991,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/87402\/revisions\/447991"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/87441"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=87402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=87402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=87402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}