This project allows users to search GitHub repositories and display JSON data in a WebView. It implements caching mechanisms for efficient data retrieval and management.
The project uses Kotlin as a development language and follows the MVVM (Model-View-ViewModel) design pattern. It utilizes Coroutines for asynchronous programming, Retrofit for making network requests, and Room Database for caching data. The main features include searching GitHub repositories, displaying JSON data in a WebView, taking screenshots of the preview screen, and implementing caching mechanisms.
To get started with the project, clone the repository to your local machine:
git clone https://github.com/amitbiswas1992/AndroidDemo.git
Open the project in Android Studio:
- Launch Android Studio.
- Choose "Open an existing Android Studio project".
- Navigate to the directory where you cloned the repository and select the project.
Build and run the project in Android Studio:
- After Gradle sync is successful, you can build and run the project on your preferred emulator or connected device by clicking on the green "Run" button in the toolbar.
- Kotlin
- MVVM
- Singleton
- Room DB
- ViewModel
- LiveData
- ViewBinding
- Retrofit
- Coroutines
- Users can search for GitHub repositories using keywords.
- JSON data retrieved from the GitHub API is displayed in a WebView.
- If the same keyword is searched within 10 minutes, the app retrieves data from the Room database instead of making an API call.
- Upon retrieving data from the WebView, the app automatically takes a screenshot and stores it in the device cache directory.
- Cache data older than 30 minutes is automatically deleted to maintain efficiency and manage storage space.