The Device Management Admin Portal is an Android application built using the MVVM (Model-View-ViewModel) architecture. It enables administrators to manage and monitor devices in an organization, with data synchronization between Room Database and Firestore. The application supports both online and offline modes.
- Login: Only administrators can log in to the system.
- Dashboard: Provides an overview of the total devices used in the organization, displayed using a categorized pie chart (phone, laptop, dashboard, peripherals).
- Device Listing: View a list of devices with search functionality to filter data based on device type, device ID, and employee ID.
- Device Details: Provides detailed information about individual devices.
- Delete Device: Long-press on a device in the list to open a dialog to delete the device.
- User Listing: View a list of users with search functionality to filter employees based on name and employee ID.
- User Details: View user details, including the total device count allocated to the user.
- Device Allocation: Clicking on the device count for a user opens a dialog sheet displaying the list of devices allocated to that user. Includes a search box to filter devices based on device ID.
- Assign Device:This screen allows the admin to choose a user and allocate a device to them from the available devices.
- Profile Screen: View and update the admins profile information. Includes a logout button.
- Signup Screen: Allows the creation of new user accounts.
- Password Reset Screen: In case a user forgets their password, they can initiate a password reset by entering their email address. The user will receive an email containing a password reset link. Clicking on the link will redirect the user to a screen where they can enter a new password.
- Launch the application on your Android device.
- Log in to the system using your administrator credentials.
- Upon successful login, you will be directed to the dashboard, displaying the total devices used in the organization.
- Navigate through the various sections using the bottom navigation bar to access device listing, user listing, and profile screens.
- Use the search box provided in the device listing and user listing screens to filter the data based on your requirements.
- Click on a device from the device listing to view its details, including specifications and allocation status. If the device is assigned to a user, the user's id will also be displayed.
- Long-press on a device from the device listing to delete it from the system.
- Click on a user from the user listing to view their details, including the total device count allocated to them.
- Click on the device count for a user to view the list of devices allocated to them. Use the search box to filter the devices based on the device ID.
- Click on assign devices to assign device to the particular user. This screen allows the admin to choose a user and allocate a device to them from the available devices.
- Visit the profile screen to view and update your admin profile information. You can change your name and phone number.
- To log out from the system, click on the "Logout" button on the profile screen.
- Use the signup screen to create new user accounts.
- If a user forgets their password, they can reset it by accessing the "Password Reset" screen. The user needs to enter their email, and they will receive an email with instructions to reset the password.
The application follows the MVVM (Model-View-ViewModel) architectural pattern.
The major components of the architecture are:
- Model: Represents the data and business logic of the application. It includes data models, repositories for data access, and remote data sources (Firestore).
- View: Represents the UI layer of the application. It includes activities, fragments, XML layout files, and corresponding view models.
- ViewModel: Acts as a mediator between the View and the Model. It contains the presentation logic, handles UI-related events, and exposes observable data to the View using LiveData.
Before running the application, ensure you have the following:
- Android Studio
- Android SDK
- Kotlin
- JDK
- Gradle
- Download the ZIP folder containing the project code.
- Extract the contents of the ZIP folder to a location on your computer.
- Open Android Studio.
- Click on "Open an Existing Project" and navigate to the extracted project folder.
- Select the project folder and click "OK" to open it in Android Studio.
- Connect your Android device or start an emulator.
- Click on the "Run" button in the toolbar or go to "Run" > "Run 'app'" to build and run the application on the emulator.
APK file is attached in the zip folder (devicemanagement_adminportal.apk) for the application, you can directly install and run it on an Android device.
Here's how:
- Transfer the APK file to your Android device.
- On your Android device, go to "Settings" > "Security" or "Privacy"and enable the "Unknown Sources" option to allow installation from sources other than the Play Store.
- Using a file manager app, navigate to the location of the APK file on your device.
- Tap on the APK file to start the installation process.
- Follow the on-screen prompts to install the application.
- Once installed, you can find the application on your device's app launcher.
- Tap on the app icon to run it.
To configure the application, follow these steps:
- Open the
appmodule. - Update the
app/src/main/res/values/strings.xmlfile with your desired configurations, such as API endpoints, keys, or other settings. - Build and run the application.
The Device Management Admin Portal utilizes two databases for data storage:
-
Firebase Firestore: Firestore is a flexible, scalable NoSQL cloud database provided by Firebase. It serves as the remote database for real-time data synchronization. The application uses the following Firestore dependencies:
implementation 'com.google.firebase:firebase-firestore-ktx:24.6.1': Firestore Kotlin extension for Android.implementation 'com.google.firebase:firebase-auth-ktx:22.0.0': Firebase Authentication Kotlin extension for Android.
To set up Firestore for your project, follow the Firebase documentation: Add Firebase to your Android project.
-
Room Database: Room is an SQLite object mapping library provided by Android Jetpack. It acts as the local database for offline data storage. The application uses the following Room dependencies:
implementation "androidx.room:room-runtime:2.4.0": Room library for runtime support.kapt "androidx.room:room-compiler:2.4.0": Room annotation processor for generating necessary code.implementation "androidx.room:room-ktx:2.2.5": Room Kotlin extensions for simplified database operations.
To set up Room Database for your project, refer to the Android Developer documentation: Android Room Persistence Library.
The Device Management Admin Portal utilizes several libraries and dependencies to support its functionality. Here's a list of the major dependencies used in the project:
-
Kotlin core and coroutines:
implementation 'androidx.core:core-ktx:1.10.1': Kotlin extensions for Android.implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.1"): Coroutines support for Android.implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.1"): Core coroutines library.
-
AndroidX libraries:
implementation 'androidx.appcompat:appcompat:1.6.1': AppCompat library for compatibility across different Android versions.implementation 'com.google.android.material:material:1.9.0': Material Design components.implementation 'androidx.constraintlayout:constraintlayout:2.1.4': ConstraintLayout for flexible UI design.
-
Testing packages:
testImplementation 'junit:junit:4.13.2': JUnit testing framework.androidTestImplementation 'androidx.test.ext:junit:1.1.5': JUnit extensions for Android.androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1': Espresso UI testing framework.testImplementation 'androidx.arch.core:core-testing:2.1.0': Architecture Components testing library.
-
Gson:
implementation 'com.google.code.gson:gson:2.9.1': Gson library for JSON parsing.
-
Lifecycle component:
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1": ViewModel Kotlin extensions for the Lifecycle components.
-
Hilt:
implementation "com.google.dagger:hilt-android:2.44": Hilt dependency injection library for Android.kapt "com.google.dagger:hilt-compiler:2.44": Annotation processor for Hilt.
-
Pie chart dependency:
implementation "com.github.PhilJay:MPAndroidChart:v3.1.0": MPAndroidChart library for pie chart visualization.
The complete list of dependencies can be found in the build.gradle file of the project.
For any inquiries or support, please contact ishikanimade56@gmail.com.
Feel free to customize the sections and content as per your specific application requirements and reach out to us with any questions, feedback, or suggestions you may have.