Git Product home page Git Product logo

findyourvenue's Introduction

FindYourVenue


Find Your Venue is a simple application for Android based on localization, user photos and local database. The main idea is that the user can select an area from integrated Google Maps and will be able to explore all the venues in that area. The user can save his favourite venues to local DB and can add photos. He can also see information about that place and share it.

Working flow

At the onCreate in MainActivity, the application will request permission of localization and will ask the user to activate GPS. The data about position is only stored on the SharedPreferences, so user will not have to worry about privacy issue. The flow of the application is explained in the following simple schema:

The HomeFragment is created at start and the map is loaded asynchronously. When the user select an area to explore, the drawMap() is called to draw the polygon. When the user selects the heart icon in the AppBar, the FavouriteFragment comes in and the HomeFragment is added to backstack, so the state of the fragment remain saved in memory. When the user select a venue from HomeFragment or FavouriteFragment, a new activity ActivityVenue starts, and here he can save place to local DB or remove if he’s in Favourites. With the FloatingActionButton of the MainActivity or the gallery icon in the AppBar, the user can take/select a photo and can add it to a saved venue with Intent StoreImage. This operations are done all asynchronously with contentResolver, that will use the URI specified in MyContentProvider, which contains all the logic for the operation of MyDatabase and interface VenueDao.

Further Details

The RecyclerView of the HomeFragment loads data asynchronously, waiting for the call to Foursquare API. In MainActivity onCreate, a LoaderManager loads data from local Database, and keep a copy of the Cursor in the companion object, so in this way when FavouriteFragment comes in it doesn’t need to load data again but it can use the shared cursor. However it has its own LoaderManager to reload data when the user modifies the database inside this fragment. To load photos asynchronously I have used Picasso library, it has automatic memory and disk caching and also it automatically handles recycling and download cancellation inside adapter. In ActivityVenue I have used a ViewPager to display multiple photos, and also there is the option to listen to place description using TextToSpeech library of Android. The missing permissions are requested at runtime using dialog pop-ups. In the FavouriteFragment there is also a search icon with searchview, so user can filter the places by name, using query of MyContentProvider.

Screenshots

findyourvenue's People

Contributors

matteodefra avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

siddeeqtech

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.