Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nugwxa/troftey
App to provide user with historical facts about their location
https://github.com/nugwxa/troftey
adobe-xd android-studio java
Last synced: about 1 month ago
JSON representation
App to provide user with historical facts about their location
- Host: GitHub
- URL: https://github.com/nugwxa/troftey
- Owner: Nugwxa
- Created: 2022-12-04T23:43:19.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T15:46:16.000Z (almost 2 years ago)
- Last Synced: 2024-09-15T11:25:03.943Z (4 months ago)
- Topics: adobe-xd, android-studio, java
- Language: Java
- Homepage: https://drive.google.com/file/d/1UR7oeK57bMSrKxlISdDID84L4PzOacup/view?usp=share_link
- Size: 568 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Troftey App
Android App for providing historical facts about user's country
## Project Description
This project aims to create an Android app that provides the user with historical facts about their country by retrieving the user's current country using their device's GPS coordinates. The app has a button that, when pressed, obtains the user's GPS coordinates, converts them to a country name, and displays the country name along with a random fact in the text view.
The app uses the Android LocationManager class to access the device's GPS data, and the Geocoder class to convert the GPS coordinates to a country name. Additionally, the app implements error handling to ensure that it can handle cases where there is no internet connection.
## Screenshots
## Technologies Used
- Java
- Android LocationManager class
- Geocoder class## How to Use
To use this app, simply install it on your Android device and enable location permissions. Then open the app click the "Get Country" button to retrieve your current country, The app will then display your country name in the text view, then click the "Get Facts" button to get facts about your country.
## Code Description
The code is written in Java and includes a getCountryName method that is called when the button is pressed. The method uses the Geocoder class to convert the GPS coordinates to a country name, and the LocationManager class to access the device's GPS data. The method also implements error handling to handle cases where there is no internet connection. The facts in this project are stored in a string array resource file and the MainActivity.java file contains code to retrieve a random fact from the array when the button is clicked. The fact is then displayed using the textView.
## Contributions
Contributions to this project are welcome. If you would like to contribute, please follow the standard procedures for GitHub pull requests.
## License
This project is licensed under the [MIT License](https://opensource.org/licenses/MIT).