Giter Club home page Giter Club logo

treasure-hunt's Introduction

Virtual Treasure Hunt

This is a simple app that demonstrates the use of Geofences in Android. The app tracks user device location and if it entered a Geofence a notification is generated, that the user found the treasure.

GeoFence

A geofence is a virtual perimeter defined by GPS or RFID around a real world area. Geofences can be created with a radius around a point location. The geofencing API uses the device sensors to accurately detect the location of the device in a battery-efficient way. Geofences have three transition types.

  • Enter - Indicates that the user entered the geofence(s).
  • Dwell - Indicates that the user enters and dwells in geofences for a given period of time.
  • Exit - Indicates that the user has exited the geofence(s).

Broadcast Receiver

The broadcast receiver is how Android apps can send or receive broadcast messages from the Android system and other Android apps, similar to the publish-subscribe pattern. The broadcasts are sent out and apps can register to receive specific broadcasts. When the desired broadcasts are sent out the apps are notified.

Pending Intent

PendingIntent is an intent that will perform at a later time. A PendingIntent is a description of an Intent and target action to perform with it. Even if its owning application's process is killed, the PendingIntent itself will remain usable.

Helpful Tips

  1. On Android apps targeting API 30+ are now no longer allowed to ask for background_permission at the same time as regular location permission. We have to split it into 2 separate asks:
  • Ask for regular foreground location permission, once granted,
  • Ask for background location permission on a new ask.

treasure-hunt's People

Contributors

pawanharariya avatar

Watchers

 avatar

Forkers

mattetom

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.