• Home
Name Date Size #Lines LOC

..--

.google/03-May-2024-1712

Application/03-May-2024-1,022501

Wearable/03-May-2024-461267

gradle/wrapper/03-May-2024-76

screenshots/03-May-2024-

CONTRIB.mdD03-May-20241.6 KiB3627

CONTRIBUTING.mdD03-May-20241.5 KiB3627

LICENSED03-May-202411.1 KiB202169

NOTICED03-May-2024613 1611

README.mdD03-May-20243.1 KiB8461

build.gradleD03-May-202414 150

gradlewD03-May-20245 KiB165122

gradlew.batD03-May-20242.3 KiB9166

settings.gradleD03-May-202436 21

README.md

1Android Geofencing Sample
2===================================
3
4When the user enters the vicinity of the Android building (B44) or the Yerba Buena
5Gardens near the Moscone center in San Francisco, a notification silently appears on their
6wearable with an option to check in. This notification automatically disappears when they leave
7the area, and reappears the next time they are at one of these locations.
8
9Introduction
10------------
11
12Geofencing combines awareness of the user's current location with awareness of
13nearby features, defined as the user's proximity to locations that may be of
14interest. To mark a location of interest, you specify its latitude and longitude.
15To adjust the proximity for the location, you add a radius. The latitude,
16longitude, and radius define a geofence. You can have multiple active
17geofences at one time.
18
19To use geofencing, start by defining the geofences you want to monitor.
20Although you usually store geofence data in a local database or download
21it from the network, you need to send a geofence to Location Services as
22an instance of [Geofence][2], which you create with `Geofence.Builder`. Each
23Geofence object contains the following information:
24
251. Latitude, longitude, and radius
262. Expiration time
273. Transition type
284. Geofence ID
29
30Read more about geofences in [Creating and Monitoring Geofences][1].
31
32[1]:http://developer.android.com/training/location/geofencing.html
33[2]:http://developer.android.com/reference/com/google/android/gms/location/Geofence.html
34
35Pre-requisites
36--------------
37
38- Android SDK v21
39- Android Build Tools v21.1.1
40- Android Support Repository
41
42Screenshots
43-------------
44
45<img src="screenshots/android_building_check_in.png" height="400" alt="Screenshot"/>
46
47Getting Started
48---------------
49
50This sample uses the Gradle build system. To build this project, use the
51"gradlew build" command or use "Import Project" in Android Studio.
52
53Support
54-------
55
56- Google+ Community: https://plus.google.com/communities/105153134372062985968
57- Stack Overflow: http://stackoverflow.com/questions/tagged/android
58
59If you've found an error in this sample, please file an issue:
60https://github.com/googlesamples/android-Geofencing
61
62Patches are encouraged, and may be submitted by forking this project and
63submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
64
65License
66-------
67
68Copyright 2014 The Android Open Source Project, Inc.
69
70Licensed to the Apache Software Foundation (ASF) under one or more contributor
71license agreements.  See the NOTICE file distributed with this work for
72additional information regarding copyright ownership.  The ASF licenses this
73file to you under the Apache License, Version 2.0 (the "License"); you may not
74use this file except in compliance with the License.  You may obtain a copy of
75the License at
76
77http://www.apache.org/licenses/LICENSE-2.0
78
79Unless required by applicable law or agreed to in writing, software
80distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
81WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
82License for the specific language governing permissions and limitations under
83the License.
84