Giter Club home page Giter Club logo

android's Introduction

MyGeoApp is a getting started application-

Problem statement

Considering the Geo-coordinates of the rooms of you house are configured in the app, when you move from one room to other the message (say a welcome message)on the screen should change.
Say moving from Drawing room to kitchen , Message should change from "Welcome to Drawing room" to "Welcome to kitchen".

Possible Implementaion approach-

At top level there are 2 approachs to solve the problem

  1. Use location of the handset.
  2. Use place a bluetooth device in each of the room, the app on the mobile shows message based on the device in range.

Solution

MyGeoApp uses first approach i.e use the Geocoordinates to solve the problem.

Challenge with this solution

 Using Geofence is an obvious choise for this usecase, but the limitation with GeoFence is that it supports only Circular region. So we use Ray-Casting Algorith to check if the point is with in a polygon.

  • MainActivity.java is the entry point of the application.
  • It uses android native Location service to handle the locationChange events.
  • Each room represents a polygon, coordinates of each room is pre-configured/hard coded as of now in the app.
  • On locationChange event the Ray-Casting algorithm is executed on each room(polygon) and message is displayed accordingly.

android's People

Contributors

amitsaluja avatar

Watchers

James Cloos avatar  avatar

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.