Giter Site home page Giter Site logo

sampleforegroundapplication's Introduction

SampleForegroundApplication

  1. Run the ContextMiddleware, first.
  2. Run the SampleForegroundApplication, next.

If you are using an emulator, you have to set the location explicitly for the middleware to understand that a change in location has taken place. You can either use the extended settings for the emulator or connect to the emulator using telnet.

It is not possible to simulate the headphone jack being connected or disconnected feature using the emulator. To test that functionality, use a physical device. Remember to enable USB debugging when using a physical device.

Testing the "Get Location" functionality

  1. Once the application starts running and the service is connected, click on the "Get Location" button.
  2. Change your location in settings (give random coordinates) or use a mock location app on the physical device.

Whenever the location is changed, the application will show the new coordinates.

Testing the "Notify at NewYork" functionality

  1. Set a random location as specified in the "Get Location" functionality above.
  2. Click on the "Notify at NewYork" button. This sets flag in the service to invoke the application when the user is detected to be in New York City
  3. Change your location in settings (give random coordinates) or use a mock location app on the physical device to somewhere close to (or same as) the following coordinates: [latitude = 40.7128; longitude = -74.0059]

Testing the headset status functionality

  1. Run the middleware, and then the application on a physical device.
  2. Click on the "Check Headset Status" button.

A message will be shown whether the headphones are connected or not.

sampleforegroundapplication's People

Contributors

pradeepmcl avatar

Watchers

James Cloos avatar  avatar Fazalul Rahman avatar

Forkers

fazalul92

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.