i2Step is an Android application developed using Kotlin and Java. The project uses Retrofit for network operations and SharedPreferences for local storage.
- Initiate and fetch orders
- Display success and error dialogs based on network responses
- Store and retrieve user display name and role using SharedPreferences
- Kotlin: A modern programming language that makes developers happier.
- Java: A widely-used programming language that is robust and secure.
- Retrofit: A type-safe HTTP client for Android and Java.
- SharedPreferences: A framework to save and retrieve key-value pairs of primitive data types.
- Android Studio Koala Feature Drop | 2024.1.2: The official IDE for Android development.
- Android Studio | 2023.x.x: Download and install from the official website.
- Gradle: A build automation tool used for managing dependencies and building the project. It comes bundled with Android Studio.
-
Clone the repository: Open a terminal and run the following command to clone the project repository:
git clone https://github.com/imnexerio/i2step.git
-
Open the project in Android Studio:
- Launch Android Studio.
- Click on
File
>Open...
and navigate to the directory where you cloned the repository. - Select the project folder and click
OK
.
-
Build the project:
- Android Studio will automatically start downloading the necessary dependencies.
- Wait for the build process to complete. You can monitor the progress in the
Build
window at the bottom of the IDE.
-
Connect an Android device or start an emulator:
- To use a physical device, connect it to your computer via USB and enable
USB Debugging
in the device's developer options. - To use an emulator, click on the
AVD Manager
icon in Android Studio and create a new virtual device if you don't have one already.
- To use a physical device, connect it to your computer via USB and enable
-
Run the app:
- Click on the green
Run
button (a play icon) in the toolbar at the top of Android Studio. - Select your device or emulator from the list and click
OK
.
- Click on the green
Handles the initiation and fetching of orders using Retrofit. Displays dialogs based on the network response.
- Initiate Order: Sends a network request to initiate an order and shows a success or error dialog based on the response.
- Fetch Orders: Retrieves a list of orders from the server and updates the UI.
Manages local storage of user display name and role using SharedPreferences.
- saveDisplayName: Saves the user's display name.
- getDisplayName: Retrieves the user's display name.
- saveRole: Saves the user's role.
- getRole: Retrieves the user's role.
The backend code for this project can be found in the following repository: Backend Repository
This project is licensed under the MIT License - see the LICENSE file for details.