Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 76 | |
| 77 | |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 85 | |
| 86 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 87 | <html> |
| 88 | <head> |
| 89 | |
| 90 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 91 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| 92 | <meta name="viewport" content="width=device-width" /> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 93 | |
| 94 | <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" /> |
| 95 | <title>LocationRequest | Android Developers</title> |
| 96 | |
| 97 | <!-- STYLESHEETS --> |
| 98 | <link rel="stylesheet" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 99 | href="//fonts.googleapis.com/css?family=Roboto+Condensed"> |
| 100 | <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" |
| 101 | title="roboto"> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 102 | <link href="/assets/css/default.css?v=2" rel="stylesheet" type="text/css"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 103 | |
| 104 | |
| 105 | |
| 106 | <!-- JAVASCRIPT --> |
| 107 | <script src="//www.google.com/jsapi" type="text/javascript"></script> |
| 108 | <script src="/assets/js/android_3p-bundle.js" type="text/javascript"></script> |
| 109 | <script type="text/javascript"> |
| 110 | var toRoot = "/"; |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 111 | var metaTags = []; |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 112 | var devsite = false; |
| 113 | </script> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 114 | <script src="/assets/js/docs.js?v=2" type="text/javascript"></script> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 115 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 116 | <script> |
| 117 | (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| 118 | (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| 119 | m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| 120 | })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 121 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 122 | ga('create', 'UA-5831155-1', 'android.com'); |
| 123 | ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); |
| 124 | ga('send', 'pageview'); |
| 125 | ga('universal.send', 'pageview'); // Send page view for new tracker. |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 126 | </script> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 127 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 128 | </head> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 129 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 130 | <body class="gc-documentation google |
| 131 | develop" itemscope itemtype="http://schema.org/Article"> |
| 132 | <div id="doc-api-level" class="" style="display:none"></div> |
| 133 | <a name="top"></a> |
| 134 | |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 135 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 136 | <a name="top"></a> |
| 137 | |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 138 | <!-- Header --> |
| 139 | <div id="header-wrapper"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 140 | <div id="header"> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 141 | <div class="wrap" id="header-wrap"> |
| 142 | <div class="col-3 logo"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 143 | <a href="/index.html"> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 144 | <img src="/assets/images/dac_logo.png" |
| 145 | srcset="/assets/images/dac_logo@2x.png 2x" |
| 146 | width="123" height="25" alt="Android Developers" /> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 147 | </a> |
| 148 | <div class="btn-quicknav" id="btn-quicknav"> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 149 | <a href="#" class="arrow-inactive">Quicknav</a> |
| 150 | <a href="#" class="arrow-active">Quicknav</a> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 151 | </div> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 152 | </div> |
| 153 | <ul class="nav-x col-9"> |
| 154 | <li class="design"> |
| 155 | <a href="/design/index.html" |
| 156 | zh-tw-lang="設計" |
| 157 | zh-cn-lang="设计" |
| 158 | ru-lang="Проектирование" |
| 159 | ko-lang="디자인" |
| 160 | ja-lang="設計" |
| 161 | es-lang="Diseñar" |
| 162 | >Design</a></li> |
| 163 | <li class="develop"><a href="/develop/index.html" |
| 164 | zh-tw-lang="開發" |
| 165 | zh-cn-lang="开发" |
| 166 | ru-lang="Разработка" |
| 167 | ko-lang="개발" |
| 168 | ja-lang="開発" |
| 169 | es-lang="Desarrollar" |
| 170 | >Develop</a></li> |
| 171 | <li class="distribute last"><a href="/distribute/index.html" |
| 172 | zh-tw-lang="發佈" |
| 173 | zh-cn-lang="分发" |
| 174 | ru-lang="Распространение" |
| 175 | ko-lang="배포" |
| 176 | ja-lang="配布" |
| 177 | es-lang="Distribuir" |
| 178 | >Distribute</a></li> |
| 179 | </ul> |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | <div class="menu-container"> |
| 185 | <div class="moremenu"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 186 | <div id="more-btn"></div> |
| 187 | </div> |
| 188 | <div class="morehover" id="moremenu"> |
| 189 | <div class="top"></div> |
| 190 | <div class="mid"> |
| 191 | <div class="header">Links</div> |
| 192 | <ul> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 193 | <li><a href="https://play.google.com/apps/publish/" target="_googleplay">Google Play Developer Console</a></li> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 194 | <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> |
| 195 | <li><a href="/about/index.html">About Android</a></li> |
| 196 | </ul> |
| 197 | <div class="header">Android Sites</div> |
| 198 | <ul> |
| 199 | <li><a href="http://www.android.com">Android.com</a></li> |
| 200 | <li class="active"><a>Android Developers</a></li> |
| 201 | <li><a href="http://source.android.com">Android Open Source Project</a></li> |
| 202 | </ul> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 203 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 204 | |
| 205 | |
| 206 | <div class="header">Language</div> |
| 207 | <div id="language" class="locales"> |
| 208 | <select name="language" onChange="changeLangPref(this.value, true)"> |
| 209 | <option value="en">English</option> |
| 210 | <option value="es">Español</option> |
| 211 | <option value="ja">日本語</option> |
| 212 | <option value="ko">한국어</option> |
| 213 | <option value="ru">Русский</option> |
| 214 | <option value="zh-cn">中文 (中国)</option> |
| 215 | <option value="zh-tw">中文 (台灣)</option> |
| 216 | </select> |
| 217 | </div> |
| 218 | <script type="text/javascript"> |
| 219 | <!-- |
| 220 | loadLangPref(); |
| 221 | //--> |
| 222 | </script> |
| 223 | |
| 224 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 225 | <br class="clearfix" /> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 226 | </div><!-- end 'mid' --> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 227 | <div class="bottom"></div> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 228 | </div><!-- end 'moremenu' --> |
| 229 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 230 | <div class="search" id="search-container"> |
| 231 | <div class="search-inner"> |
| 232 | <div id="search-btn"></div> |
| 233 | <div class="left"></div> |
| 234 | <form onsubmit="return submit_search()"> |
| 235 | <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 236 | onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" |
| 237 | onkeydown="return search_changed(event, true, '/')" |
| 238 | onkeyup="return search_changed(event, false, '/')" /> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 239 | </form> |
| 240 | <div class="right"></div> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 241 | <a class="close hide">close</a> |
| 242 | <div class="left"></div> |
| 243 | <div class="right"></div> |
| 244 | </div><!-- end search-inner --> |
| 245 | </div><!-- end search-container --> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 246 | |
| 247 | <div class="search_filtered_wrapper reference"> |
| 248 | <div class="suggest-card reference no-display"> |
| 249 | <ul class="search_filtered"> |
| 250 | </ul> |
| 251 | </div> |
| 252 | </div> |
| 253 | |
| 254 | <div class="search_filtered_wrapper docs"> |
| 255 | <div class="suggest-card dummy no-display"> </div> |
| 256 | <div class="suggest-card develop no-display"> |
| 257 | <ul class="search_filtered"> |
| 258 | </ul> |
| 259 | <div class="child-card guides no-display"> |
| 260 | </div> |
| 261 | <div class="child-card training no-display"> |
| 262 | </div> |
quddusc | 563daee | 2013-12-03 19:31:14 -0800 | [diff] [blame] | 263 | <div class="child-card samples no-display"> |
| 264 | </div> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 265 | </div> |
| 266 | <div class="suggest-card design no-display"> |
| 267 | <ul class="search_filtered"> |
| 268 | </ul> |
| 269 | </div> |
| 270 | <div class="suggest-card distribute no-display"> |
| 271 | <ul class="search_filtered"> |
| 272 | </ul> |
| 273 | </div> |
| 274 | </div> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 275 | </div><!-- end menu-container (search and menu widget) --> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 276 | |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 277 | |
| 278 | |
| 279 | <!-- Expanded quicknav --> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 280 | <div id="quicknav" class="col-13"> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 281 | <ul> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 282 | <li class="about"> |
| 283 | <ul> |
| 284 | <li><a href="/about/index.html">About</a></li> |
| 285 | <li><a href="/wear/index.html">Wear</a></li> |
| 286 | <li><a href="/tv/index.html">TV</a></li> |
| 287 | <li><a href="/auto/index.html">Auto</a></li> |
| 288 | </ul> |
| 289 | </li> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 290 | <li class="design"> |
| 291 | <ul> |
| 292 | <li><a href="/design/index.html">Get Started</a></li> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 293 | <li><a href="/design/devices.html">Devices</a></li> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 294 | <li><a href="/design/style/index.html">Style</a></li> |
| 295 | <li><a href="/design/patterns/index.html">Patterns</a></li> |
| 296 | <li><a href="/design/building-blocks/index.html">Building Blocks</a></li> |
| 297 | <li><a href="/design/downloads/index.html">Downloads</a></li> |
| 298 | <li><a href="/design/videos/index.html">Videos</a></li> |
| 299 | </ul> |
| 300 | </li> |
| 301 | <li class="develop"> |
| 302 | <ul> |
| 303 | <li><a href="/training/index.html" |
| 304 | zh-tw-lang="訓練課程" |
| 305 | zh-cn-lang="培训" |
| 306 | ru-lang="Курсы" |
| 307 | ko-lang="교육" |
| 308 | ja-lang="トレーニング" |
| 309 | es-lang="Capacitación" |
| 310 | >Training</a></li> |
| 311 | <li><a href="/guide/index.html" |
| 312 | zh-tw-lang="API 指南" |
| 313 | zh-cn-lang="API 指南" |
| 314 | ru-lang="Руководства по API" |
| 315 | ko-lang="API 가이드" |
| 316 | ja-lang="API ガイド" |
| 317 | es-lang="Guías de la API" |
| 318 | >API Guides</a></li> |
| 319 | <li><a href="/reference/packages.html" |
| 320 | zh-tw-lang="參考資源" |
| 321 | zh-cn-lang="参考" |
| 322 | ru-lang="Справочник" |
| 323 | ko-lang="참조문서" |
| 324 | ja-lang="リファレンス" |
| 325 | es-lang="Referencia" |
| 326 | >Reference</a></li> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 327 | <li><a href="/sdk/index.html" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 328 | zh-tw-lang="相關工具" |
| 329 | zh-cn-lang="工具" |
| 330 | ru-lang="Инструменты" |
| 331 | ko-lang="도구" |
| 332 | ja-lang="ツール" |
| 333 | es-lang="Herramientas" |
| 334 | >Tools</a> |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 335 | </li> |
| 336 | <li><a href="/google/index.html">Google Services</a> |
| 337 | </li> |
| 338 | |
| 339 | <li><a href="/samples/index.html">Samples</a> |
| 340 | </li> |
| 341 | |
| 342 | </ul> |
| 343 | </li> |
| 344 | <li class="distribute last"> |
| 345 | <ul> |
| 346 | <li><a href="/distribute/googleplay/index.html">Google Play</a></li> |
| 347 | <li><a href="/distribute/essentials/index.html">Essentials</a></li> |
| 348 | <li><a href="/distribute/users/index.html">Get Users</a></li> |
| 349 | <li><a href="/distribute/engage/index.html">Engage & Retain</a></li> |
| 350 | <li><a href="/distribute/monetize/index.html">Monetize</a></li> |
| 351 | <li><a href="/distribute/tools/index.html">Tools & Reference</a></li> |
| 352 | <li><a href="/distribute/stories/index.html">Developer Stories</a></li> |
| 353 | </ul> |
| 354 | </li> |
| 355 | </ul> |
| 356 | </div><!-- /Expanded quicknav --> |
| 357 | </div><!-- end header-wrap.wrap --> |
| 358 | </div><!-- end header --> |
| 359 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 360 | |
| 361 | <!-- Secondary x-nav --> |
| 362 | <div id="nav-x"> |
| 363 | <div class="wrap"> |
| 364 | <ul class="nav-x col-9 develop" style="width:100%"> |
| 365 | <li class="training"><a href="/training/index.html" |
| 366 | zh-tw-lang="訓練課程" |
| 367 | zh-cn-lang="培训" |
| 368 | ru-lang="Курсы" |
| 369 | ko-lang="교육" |
| 370 | ja-lang="トレーニング" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 371 | es-lang="Capacitación" |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 372 | >Training</a></li> |
quddusc | 563daee | 2013-12-03 19:31:14 -0800 | [diff] [blame] | 373 | <li class="guide"><a href="/guide/index.html" |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 374 | zh-tw-lang="API 指南" |
| 375 | zh-cn-lang="API 指南" |
| 376 | ru-lang="Руководства по API" |
| 377 | ko-lang="API 가이드" |
| 378 | ja-lang="API ガイド" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 379 | es-lang="Guías de la API" |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 380 | >API Guides</a></li> |
| 381 | <li class="reference"><a href="/reference/packages.html" |
| 382 | zh-tw-lang="參考資源" |
| 383 | zh-cn-lang="参考" |
| 384 | ru-lang="Справочник" |
| 385 | ko-lang="참조문서" |
| 386 | ja-lang="リファレンス" |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 387 | es-lang="Referencia" |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 388 | >Reference</a></li> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 389 | <li class="tools"><a href="/sdk/index.html" |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 390 | zh-tw-lang="相關工具" |
| 391 | zh-cn-lang="工具" |
| 392 | ru-lang="Инструменты" |
| 393 | ko-lang="도구" |
| 394 | ja-lang="ツール" |
| 395 | es-lang="Herramientas" |
| 396 | >Tools</a></li> |
| 397 | <li class="google"><a href="/google/index.html" |
| 398 | >Google Services</a> |
| 399 | </li> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 400 | |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 401 | <li class="samples"><a href="/samples/index.html" |
| 402 | >Samples</a> |
| 403 | </li> |
| 404 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 405 | </ul> |
| 406 | </div> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 407 | </div> |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 408 | <!-- /Sendondary x-nav DEVELOP --> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 409 | |
| 410 | |
| 411 | |
Quddus Chong | 26ca3fa | 2014-05-06 17:02:49 -0700 | [diff] [blame] | 412 | <div id="searchResults" class="wrap" style="display:none;"> |
| 413 | <h2 id="searchTitle">Results</h2> |
| 414 | <div id="leftSearchControl" class="search-control">Loading...</div> |
| 415 | </div> |
| 416 | </div> <!--end header-wrapper --> |
| 417 | |
| 418 | <div id="sticky-header"> |
| 419 | <div> |
| 420 | <a class="logo" href="#top"></a> |
| 421 | <a class="top" href="#top"></a> |
| 422 | <ul class="breadcrumb"> |
| 423 | |
| 424 | <li class="current">LocationRequest</li> |
| 425 | </ul> |
| 426 | </div> |
| 427 | </div> |
| 428 | |
| 429 | |
| 430 | |
| 431 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 432 | |
| 433 | |
| 434 | <div class="wrap clearfix" id="body-content"> |
| 435 | <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> |
| 436 | <div id="devdoc-nav" class="scroll-pane"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 437 | |
| 438 | |
| 439 | |
| 440 | <ul id="nav"> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 441 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 442 | <li class="nav-section"> |
| 443 | <div class="nav-section-header empty"><a href="/google/index.html"> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 444 | <span class="en">Overview</span> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 445 | </a></div> |
| 446 | </li> |
| 447 | |
| 448 | <li class="nav-section"> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 449 | <div class="nav-section-header empty"><a href="/google/play-services/games.html"> |
| 450 | <span class="en">Games</span> |
| 451 | </a></div> |
| 452 | </li> |
| 453 | <li class="nav-section"> |
| 454 | <div class="nav-section-header empty"><a href="/google/play-services/location.html"> |
| 455 | <span class="en">Location</span> |
| 456 | </a></div> |
| 457 | </li> |
| 458 | <li class="nav-section"> |
| 459 | <div class="nav-section-header empty"><a href="/google/play-services/plus.html"> |
| 460 | <span class="en">Google+</span> |
| 461 | </a></div> |
| 462 | </li> |
| 463 | <li class="nav-section"> |
| 464 | <div class="nav-section-header empty"><a href="/google/play-services/maps.html"> |
Dirk Dougherty | eb76848 | 2013-10-29 22:25:12 -0700 | [diff] [blame] | 465 | <span class="en">Maps</span> |
| 466 | </a></div> |
| 467 | </li> |
| 468 | <li class="nav-section"> |
Dirk Dougherty | 1654264 | 2014-02-07 19:58:28 -0800 | [diff] [blame] | 469 | <div class="nav-section-header empty"><a href="/google/play-services/drive.html"> |
| 470 | <span class="en">Drive</span> |
| 471 | </a></div> |
| 472 | </li> |
| 473 | <li class="nav-section"> |
| 474 | <div class="nav-section-header empty"><a href="/google/play-services/cast.html"> |
| 475 | <span class="en">Cast</span> |
| 476 | </a></div> |
| 477 | </li> |
| 478 | <li class="nav-section"> |
Dirk Dougherty | eb76848 | 2013-10-29 22:25:12 -0700 | [diff] [blame] | 479 | <div class="nav-section-header"><a href="/google/play-services/ads.html"> |
| 480 | <span class="en">Ads</span></a> |
| 481 | </div> |
| 482 | <ul> |
| 483 | <li><a href="/google/play-services/id.html"> |
| 484 | <span class="en">Advertising ID</span></a> |
| 485 | </li> |
| 486 | </ul> |
| 487 | </li> |
| 488 | <li class="nav-section"> |
| 489 | <div class="nav-section-header empty"><a href="/google/play-services/wallet.html"> |
| 490 | <span class="en">Wallet</span> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 491 | </a></div> |
| 492 | </li> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 493 | |
| 494 | |
| 495 | <li class="nav-section"> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 496 | <div class="nav-section-header"><a href="/google/play-services/index.html"> |
| 497 | <span class="en">Google Play Services</span></a> |
| 498 | </div> |
| 499 | <ul> |
| 500 | <li><a href="/google/play-services/setup.html"> |
| 501 | <span class="en">Setup</span></a> |
| 502 | </li> |
quddusc | 682d8e9 | 2014-03-13 11:55:32 -0700 | [diff] [blame] | 503 | <li class="nav-section"> |
| 504 | <div class="nav-section-header"><a href="/google/auth/api-client.html"> |
| 505 | <span class="en">Accessing Google Play Services APIs</span></a> |
| 506 | </div> |
| 507 | <ul> |
| 508 | <li> |
| 509 | <a href="/google/auth/http-auth.html"> |
| 510 | <span class="en">Authorizing with Google for REST APIs</span> |
| 511 | </a> |
| 512 | </li> |
| 513 | </ul> |
| 514 | </li> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 515 | <li id="gms-tree-list" class="nav-section"> |
| 516 | <div class="nav-section-header"> |
| 517 | <a href="/reference/gms-packages.html"> |
| 518 | <span class="en">Reference</span> |
| 519 | </a> |
| 520 | <div> |
| 521 | </li> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 522 | </ul> |
| 523 | </li> |
| 524 | |
| 525 | |
| 526 | <li class="nav-section"> |
| 527 | <div class="nav-section-header"><a href="/google/play/billing/index.html"> |
| 528 | <span class="en">Google Play In-app Billing</span></a> |
| 529 | </div> |
| 530 | <ul> |
| 531 | <li><a href="/google/play/billing/billing_overview.html"> |
| 532 | <span class="en">Overview</span></a> |
| 533 | </li> |
| 534 | <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/api.html"> |
| 535 | <span class="en">Version 3 API</span></a></div> |
| 536 | <ul> |
| 537 | <li><a href="/google/play/billing/billing_integrate.html"> |
| 538 | <span class="en">Implementing the API</span></a></li> |
| 539 | <li><a href="/google/play/billing/billing_reference.html"> |
| 540 | <span class="en">Reference</span></a></li> |
| 541 | </ul> |
| 542 | </li> |
| 543 | <li class="nav-section"><div class="nav-section-header"><a href="/google/play/billing/v2/api.html"> |
| 544 | <span class="en">Version 2 API</span></a></div> |
| 545 | <ul> |
| 546 | <li><a href="/google/play/billing/v2/billing_integrate.html"> |
| 547 | <span class="en">Implementing the API</span></a></li> |
| 548 | <li><a href="/google/play/billing/v2/billing_subscriptions.html"> |
| 549 | <span class="en">Subscriptions</span></a></li> |
| 550 | <li><a href="/google/play/billing/v2/billing_reference.html"> |
| 551 | <span class="en">Reference</span></a></li> |
| 552 | </ul> |
| 553 | </li> |
| 554 | <li><a href="/google/play/billing/billing_subscriptions.html"> |
| 555 | <span class="en">Subscriptions</span></a> |
| 556 | </li> |
| 557 | <li><a href="/google/play/billing/billing_best_practices.html"> |
| 558 | <span class="en">Security and Design</span></a> |
| 559 | </li> |
| 560 | <li><a href="/google/play/billing/billing_testing.html"> |
| 561 | <span class="en">Testing In-app Billing</span></a> |
| 562 | </li> |
| 563 | <li><a href="/google/play/billing/billing_admin.html"> |
| 564 | <span class="en">Administering In-app Billing</span></a> |
| 565 | </li> |
Dirk Dougherty | fe3da79 | 2013-06-12 18:06:08 -0700 | [diff] [blame] | 566 | <li><a href="/google/play/billing/gp-purchase-status-api.html"> |
| 567 | <span class="en">Purchase Status API</span></a> |
| 568 | </li> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 569 | <li><a href="/google/play/billing/versions.html"> |
| 570 | <span class="en">Version Notes</span></a> |
| 571 | </li> |
| 572 | </ul> |
| 573 | </li> |
| 574 | |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 575 | |
| 576 | |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 577 | <li class="nav-section"> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 578 | <div class="nav-section-header"><a href="/google/gcm/index.html"> |
| 579 | <span class="en">Google Cloud Messaging</span></a> |
| 580 | </div> |
| 581 | <ul> |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 582 | <li><a href="/google/gcm/gcm.html"> |
| 583 | <span class="en">Overview</span></a> |
| 584 | </li> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 585 | <li><a href="/google/gcm/gs.html"> |
| 586 | <span class="en">Getting Started</span></a> |
| 587 | </li> |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 588 | <li><a href="/google/gcm/client.html"> |
| 589 | <span class="en">Implementing GCM Client</span></a> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 590 | </li> |
Dirk Dougherty | d189845 | 2013-12-02 11:34:20 -0800 | [diff] [blame] | 591 | <li class="nav-section"><div class="nav-section-header"><a href="/google/gcm/server.html"> |
| 592 | <span class="en">Implementing GCM Server</span></a></div> |
| 593 | <ul> |
| 594 | <li><a href="/google/gcm/ccs.html"> |
| 595 | <span class="en">CCS (XMPP)</span></a></li> |
| 596 | <li><a href="/google/gcm/http.html"> |
| 597 | <span class="en">HTTP</span></a></li> |
| 598 | </ul> |
Dirk Dougherty | fe3da79 | 2013-06-12 18:06:08 -0700 | [diff] [blame] | 599 | </li> |
| 600 | <li><a href="/google/gcm/notifications.html"> |
| 601 | <span class="en">User Notifications</span></a> |
| 602 | </li> |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 603 | <li><a href="/google/gcm/adv.html"> |
| 604 | <span class="en">Advanced Topics</span></a> |
| 605 | </li> |
| 606 | <li><a href="/google/gcm/c2dm.html"> |
| 607 | <span class="en">Migration</span></a> |
| 608 | </li> |
| 609 | <li id="gcm-tree-list" class="nav-section"> |
| 610 | <div class="nav-section-header"> |
| 611 | <a href="/reference/gcm-packages.html"> |
| 612 | <span class="en">Reference</span> |
| 613 | </a> |
| 614 | <div> |
| 615 | </li> |
| 616 | </ul> |
| 617 | </li> |
| 618 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 619 | <li class="nav-section"> |
| 620 | <div class="nav-section-header"><a href="/google/play/dist.html"> |
| 621 | <span class="en">Google Play Distribution</span></a> |
| 622 | </div> |
| 623 | <ul> |
| 624 | <li><a href="/google/play/filters.html"> |
| 625 | <span class="en">Filters on Google Play</span></a> |
| 626 | </li> |
| 627 | |
| 628 | <li><a href="/google/play/publishing/multiple-apks.html"> |
| 629 | <span class="en">Multiple APK Support</span></a> |
| 630 | </li> |
| 631 | <li><a href="/google/play/expansion-files.html"> |
| 632 | <span class="en">APK Expansion Files</span></a> |
| 633 | </li> |
| 634 | <li class="nav-section"> |
| 635 | <div class="nav-section-header"><a href="/google/play/licensing/index.html"> |
| 636 | <span class="en">Application Licensing</span></a> |
| 637 | </div> |
| 638 | <ul> |
| 639 | <li><a href="/google/play/licensing/overview.html"> |
| 640 | <span class="en">Licensing Overview</span></a> |
| 641 | </li> |
| 642 | <li><a href="/google/play/licensing/setting-up.html"> |
| 643 | <span class="en">Setting Up for Licensing</span></a> |
| 644 | </li> |
| 645 | <li><a href="/google/play/licensing/adding-licensing.html"> |
| 646 | <span class="en">Adding Licensing to Your App</span></a> |
| 647 | </li> |
| 648 | <li><a href="/google/play/licensing/licensing-reference.html"> |
| 649 | <span class="en">Licensing Reference</span></a> |
| 650 | </li> |
| 651 | </ul> |
| 652 | </li> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 653 | |
| 654 | <li class="nav-section"> |
| 655 | <div class="nav-section-header"><a href="/google/backup/index.html"> |
| 656 | Android Backup Service</a> |
| 657 | </div> |
| 658 | <ul> |
| 659 | <li><a href="/google/backup/signup.html"> |
| 660 | Register</a> |
| 661 | </li> |
| 662 | </ul> |
| 663 | </li> |
| 664 | |
Dirk Dougherty | a38ca33 | 2013-05-15 02:36:33 -0700 | [diff] [blame] | 665 | </ul> |
| 666 | |
| 667 | </li> |
| 668 | |
| 669 | |
| 670 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 671 | </ul> |
| 672 | |
| 673 | <script type="text/javascript"> |
| 674 | <!-- |
| 675 | buildToggleLists(); |
| 676 | changeNavLang(getLangPref()); |
| 677 | //--> |
| 678 | </script> |
| 679 | |
| 680 | |
| 681 | |
| 682 | |
| 683 | </div> |
| 684 | <script type="text/javascript"> |
| 685 | showGoogleRefTree(); |
| 686 | |
| 687 | </script> |
| 688 | </div> <!-- end side-nav --> |
| 689 | <script> |
| 690 | $(document).ready(function() { |
| 691 | scrollIntoView("devdoc-nav"); |
| 692 | }); |
| 693 | </script> |
| 694 | |
| 695 | |
| 696 | |
| 697 | |
| 698 | |
| 699 | |
| 700 | <div class="col-12" id="doc-col"> |
| 701 | |
| 702 | <div id="api-info-block"> |
| 703 | |
| 704 | |
| 705 | |
| 706 | |
| 707 | |
| 708 | |
| 709 | |
| 710 | |
| 711 | |
| 712 | |
| 713 | |
| 714 | |
| 715 | |
| 716 | |
| 717 | |
| 718 | |
| 719 | |
| 720 | |
| 721 | |
| 722 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 723 | |
| 724 | |
| 725 | |
| 726 | |
| 727 | |
| 728 | |
| 729 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 730 | <div class="sum-details-links"> |
| 731 | |
| 732 | Summary: |
| 733 | |
| 734 | |
| 735 | |
| 736 | |
| 737 | |
| 738 | <a href="#constants">Constants</a> |
| 739 | |
| 740 | |
| 741 | |
| 742 | | <a href="#inhconstants">Inherited Constants</a> |
| 743 | |
| 744 | |
| 745 | |
| 746 | | <a href="#lfields">Fields</a> |
| 747 | |
| 748 | |
| 749 | |
| 750 | |
| 751 | |
| 752 | |
| 753 | | <a href="#pubmethods">Methods</a> |
| 754 | |
| 755 | |
| 756 | |
| 757 | |
| 758 | | <a href="#inhmethods">Inherited Methods</a> |
| 759 | |
| 760 | | <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> |
| 761 | |
| 762 | </div><!-- end sum-details-links --> |
| 763 | <div class="api-level"> |
| 764 | |
| 765 | |
| 766 | |
| 767 | |
| 768 | </div> |
| 769 | </div><!-- end api-info-block --> |
| 770 | |
| 771 | |
| 772 | <!-- ======== START OF CLASS DATA ======== --> |
| 773 | |
| 774 | <div id="jd-header"> |
| 775 | public |
| 776 | |
| 777 | final |
| 778 | |
| 779 | class |
| 780 | <h1 itemprop="name">LocationRequest</h1> |
| 781 | |
| 782 | |
| 783 | |
| 784 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 785 | extends Object<br/> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 786 | |
| 787 | |
| 788 | |
| 789 | |
| 790 | |
| 791 | |
| 792 | implements |
| 793 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 794 | SafeParcelable |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 795 | |
| 796 | |
| 797 | |
| 798 | |
| 799 | |
| 800 | </div><!-- end header --> |
| 801 | |
| 802 | <div id="naMessage"></div> |
| 803 | |
| 804 | <div id="jd-content" class="api apilevel-"> |
| 805 | <table class="jd-inheritance-table"> |
| 806 | |
| 807 | |
| 808 | <tr> |
| 809 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 810 | <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 811 | </tr> |
| 812 | |
| 813 | |
| 814 | <tr> |
| 815 | |
| 816 | <td class="jd-inheritance-space"> ↳</td> |
| 817 | |
| 818 | <td colspan="1" class="jd-inheritance-class-cell">com.google.android.gms.location.LocationRequest</td> |
| 819 | </tr> |
| 820 | |
| 821 | |
| 822 | </table> |
| 823 | |
| 824 | |
| 825 | |
| 826 | |
| 827 | |
| 828 | |
| 829 | |
| 830 | <div class="jd-descr"> |
| 831 | |
| 832 | |
| 833 | <h2>Class Overview</h2> |
| 834 | <p itemprop="articleBody">A data object that contains quality of service parameters for requests to |
| 835 | the <code><a href="/reference/com/google/android/gms/location/LocationClient.html">LocationClient</a></code>. |
| 836 | |
| 837 | <p>LocationRequest objects are used to request a quality of service for location updates from |
| 838 | the <code><a href="/reference/com/google/android/gms/location/LocationClient.html">LocationClient</a></code>. |
| 839 | |
| 840 | <p>For example, if your application wants high accuracy location it should create a location |
| 841 | request with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> set to <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY">PRIORITY_HIGH_ACCURACY</a></code> and |
| 842 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code> to 5 seconds. This would be appropriate for mapping applications that are |
| 843 | showing your location in real-time. |
| 844 | |
| 845 | <p>At the other extreme, if you want negligible power impact, but to still receive location |
| 846 | updates when available, then create a location request with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> set to |
| 847 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_NO_POWER">PRIORITY_NO_POWER</a></code>. With this request your application will not trigger (and therefore |
| 848 | will not receive any power blame) any location updates, but will receive locations triggered by |
| 849 | other applications. This would be appropriate for applications that have no firm requirement |
| 850 | for location, but can take advantage when available. |
| 851 | |
| 852 | <p>In between these two extremes is a very common use-case, where applications definitely want |
| 853 | to receive updates at a specified interval, and can receive them faster when available, but |
| 854 | still want a low power impact. These applications should consider |
| 855 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_BALANCED_POWER_ACCURACY">PRIORITY_BALANCED_POWER_ACCURACY</a></code> combined with a faster |
| 856 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code> (such as 1 minute) and a slower <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code> |
| 857 | (such as 60 minutes). They will only be assigned power blame for the interval set by |
| 858 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code>, but can still receive locations triggered by other applications at a rate |
| 859 | up to <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code>. This style of request is appropriate for many location aware |
| 860 | applications, including background usage. Do be careful to also throttle |
| 861 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code> if you perform heavy-weight work after receiving an update - such |
| 862 | as using the network. |
| 863 | |
| 864 | <p>Activities should strongly consider removing all location request when entering |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 865 | the background (for example at <code><a href="/reference/android/app/Activity.html#onPause()">onPause()</a></code>), or at least swap the |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 866 | request to a larger interval and lower quality. |
| 867 | |
| 868 | <p>Applications cannot specify the exact location sources, such as GPS, that are used by the |
| 869 | LocationClient. In fact, the system may have multiple location sources (providers) running and |
| 870 | may fuse the results from several sources into a single Location object. |
| 871 | |
| 872 | <p>Location requests from applications with |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 873 | <code><a href="/reference/android/Manifest.permission.html#ACCESS_COARSE_LOCATION">ACCESS_COARSE_LOCATION</a></code> and not |
| 874 | <code><a href="/reference/android/Manifest.permission.html#ACCESS_FINE_LOCATION">ACCESS_FINE_LOCATION</a></code> will be automatically throttled to a |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 875 | slower interval, and the location object will be obfuscated to only show a coarse level of |
| 876 | accuracy. |
| 877 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 878 | <p>All location requests are considered hints, and you may receive locations that are |
| 879 | more/less accurate, and faster/slower than requested. |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 880 | </p> |
| 881 | |
| 882 | |
| 883 | |
| 884 | |
| 885 | |
| 886 | </div><!-- jd-descr --> |
| 887 | |
| 888 | |
| 889 | |
| 890 | |
| 891 | |
| 892 | |
| 893 | |
| 894 | |
| 895 | |
| 896 | |
| 897 | |
| 898 | |
| 899 | |
| 900 | |
| 901 | |
| 902 | |
| 903 | <div class="jd-descr"> |
| 904 | |
| 905 | |
| 906 | <h2>Summary</h2> |
| 907 | |
| 908 | |
| 909 | |
| 910 | |
| 911 | |
| 912 | |
| 913 | |
| 914 | |
| 915 | |
| 916 | |
| 917 | |
| 918 | |
| 919 | |
| 920 | <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| 921 | <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> |
| 922 | |
| 923 | |
| 924 | |
| 925 | <tr class="alt-color api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 926 | <td class="jd-typecol">int</td> |
| 927 | <td class="jd-linkcol"><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_BALANCED_POWER_ACCURACY">PRIORITY_BALANCED_POWER_ACCURACY</a></td> |
| 928 | <td class="jd-descrcol" width="100%">Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request "block" level accuracy.</td> |
| 929 | </tr> |
| 930 | |
| 931 | |
Dirk Dougherty | c1609c4 | 2013-08-01 15:30:06 -0700 | [diff] [blame] | 932 | <tr class=" api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 933 | <td class="jd-typecol">int</td> |
| 934 | <td class="jd-linkcol"><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY">PRIORITY_HIGH_ACCURACY</a></td> |
| 935 | <td class="jd-descrcol" width="100%">Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request the most accurate locations available.</td> |
| 936 | </tr> |
| 937 | |
| 938 | |
Dirk Dougherty | c1609c4 | 2013-08-01 15:30:06 -0700 | [diff] [blame] | 939 | <tr class="alt-color api apilevel-" > |
| 940 | <td class="jd-typecol">int</td> |
| 941 | <td class="jd-linkcol"><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_LOW_POWER">PRIORITY_LOW_POWER</a></td> |
| 942 | <td class="jd-descrcol" width="100%">Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request "city" level accuracy.</td> |
| 943 | </tr> |
| 944 | |
| 945 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 946 | <tr class=" api apilevel-" > |
| 947 | <td class="jd-typecol">int</td> |
| 948 | <td class="jd-linkcol"><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_NO_POWER">PRIORITY_NO_POWER</a></td> |
| 949 | <td class="jd-descrcol" width="100%">Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request the best accuracy possible with zero additional |
| 950 | power consumption.</td> |
| 951 | </tr> |
| 952 | |
| 953 | |
| 954 | |
| 955 | </table> |
| 956 | |
| 957 | |
| 958 | |
| 959 | |
| 960 | |
| 961 | <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| 962 | <table id="inhconstants" class="jd-sumtable"><tr><th> |
| 963 | <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| 964 | <div style="clear:left;">Inherited Constants</div></th></tr> |
| 965 | |
| 966 | |
| 967 | |
| 968 | |
| 969 | <tr class="api apilevel-" > |
| 970 | <td colspan="12"> |
| 971 | |
| 972 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.os.Parcelable" class="jd-expando-trigger closed" |
| 973 | ><img id="inherited-constants-android.os.Parcelable-trigger" |
| 974 | src="/assets/images/triangle-closed.png" |
| 975 | class="jd-expando-trigger-img" /></a>From interface |
| 976 | android.os.Parcelable |
| 977 | <div id="inherited-constants-android.os.Parcelable"> |
| 978 | <div id="inherited-constants-android.os.Parcelable-list" |
| 979 | class="jd-inheritedlinks"> |
| 980 | </div> |
| 981 | <div id="inherited-constants-android.os.Parcelable-summary" style="display: none;"> |
| 982 | <table class="jd-sumtable-expando"> |
| 983 | |
| 984 | |
| 985 | |
| 986 | <tr class="alt-color api apilevel-" > |
| 987 | <td class="jd-typecol">int</td> |
| 988 | <td class="jd-linkcol">CONTENTS_FILE_DESCRIPTOR</td> |
| 989 | <td class="jd-descrcol" width="100%"></td> |
| 990 | </tr> |
| 991 | |
| 992 | |
| 993 | <tr class=" api apilevel-" > |
| 994 | <td class="jd-typecol">int</td> |
| 995 | <td class="jd-linkcol">PARCELABLE_WRITE_RETURN_VALUE</td> |
| 996 | <td class="jd-descrcol" width="100%"></td> |
| 997 | </tr> |
| 998 | |
| 999 | |
| 1000 | </table> |
| 1001 | </div> |
| 1002 | </div> |
| 1003 | </td></tr> |
| 1004 | |
| 1005 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 1006 | |
| 1007 | <tr class="api apilevel-" > |
| 1008 | <td colspan="12"> |
| 1009 | |
| 1010 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-com.google.android.gms.common.internal.safeparcel.SafeParcelable" class="jd-expando-trigger closed" |
| 1011 | ><img id="inherited-constants-com.google.android.gms.common.internal.safeparcel.SafeParcelable-trigger" |
| 1012 | src="/assets/images/triangle-closed.png" |
| 1013 | class="jd-expando-trigger-img" /></a>From interface |
| 1014 | com.google.android.gms.common.internal.safeparcel.SafeParcelable |
| 1015 | <div id="inherited-constants-com.google.android.gms.common.internal.safeparcel.SafeParcelable"> |
| 1016 | <div id="inherited-constants-com.google.android.gms.common.internal.safeparcel.SafeParcelable-list" |
| 1017 | class="jd-inheritedlinks"> |
| 1018 | </div> |
| 1019 | <div id="inherited-constants-com.google.android.gms.common.internal.safeparcel.SafeParcelable-summary" style="display: none;"> |
| 1020 | <table class="jd-sumtable-expando"> |
| 1021 | |
| 1022 | |
| 1023 | |
| 1024 | <tr class="alt-color api apilevel-" > |
| 1025 | <td class="jd-typecol">String</td> |
| 1026 | <td class="jd-linkcol">NULL</td> |
| 1027 | <td class="jd-descrcol" width="100%"></td> |
| 1028 | </tr> |
| 1029 | |
| 1030 | |
| 1031 | </table> |
| 1032 | </div> |
| 1033 | </div> |
| 1034 | </td></tr> |
| 1035 | |
| 1036 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1037 | </table> |
| 1038 | |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | <!-- =========== FIELD SUMMARY =========== --> |
| 1043 | <table id="lfields" class="jd-sumtable"><tr><th colspan="12">Fields</th></tr> |
| 1044 | |
| 1045 | |
| 1046 | |
| 1047 | <tr class="alt-color api apilevel-" > |
| 1048 | <td class="jd-typecol"><nobr> |
| 1049 | public |
| 1050 | static |
| 1051 | final |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 1052 | LocationRequestCreator</nobr></td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1053 | <td class="jd-linkcol"><a href="/reference/com/google/android/gms/location/LocationRequest.html#CREATOR">CREATOR</a></td> |
| 1054 | <td class="jd-descrcol" width="100%"></td> |
| 1055 | </tr> |
| 1056 | |
| 1057 | |
| 1058 | |
| 1059 | </table> |
| 1060 | |
| 1061 | |
| 1062 | |
| 1063 | |
| 1064 | |
| 1065 | |
| 1066 | |
| 1067 | |
| 1068 | |
| 1069 | |
| 1070 | |
| 1071 | <!-- ========== METHOD SUMMARY =========== --> |
| 1072 | <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| 1073 | |
| 1074 | |
| 1075 | |
| 1076 | |
| 1077 | <tr class="alt-color api apilevel-" > |
| 1078 | <td class="jd-typecol"><nobr> |
| 1079 | |
| 1080 | |
| 1081 | |
| 1082 | static |
| 1083 | |
| 1084 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1085 | </td> |
| 1086 | <td class="jd-linkcol" width="100%"><nobr> |
| 1087 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#create()">create</a></span>()</nobr> |
| 1088 | |
| 1089 | <div class="jd-descrdiv">Create a location request with default parameters.</div> |
| 1090 | |
| 1091 | </td></tr> |
| 1092 | |
| 1093 | |
| 1094 | |
| 1095 | <tr class=" api apilevel-" > |
| 1096 | <td class="jd-typecol"><nobr> |
| 1097 | |
| 1098 | |
| 1099 | |
| 1100 | |
| 1101 | |
| 1102 | int</nobr> |
| 1103 | </td> |
| 1104 | <td class="jd-linkcol" width="100%"><nobr> |
| 1105 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#describeContents()">describeContents</a></span>()</nobr> |
| 1106 | |
| 1107 | </td></tr> |
| 1108 | |
| 1109 | |
| 1110 | |
| 1111 | <tr class="alt-color api apilevel-" > |
| 1112 | <td class="jd-typecol"><nobr> |
| 1113 | |
| 1114 | |
| 1115 | |
| 1116 | |
| 1117 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1118 | boolean</nobr> |
| 1119 | </td> |
| 1120 | <td class="jd-linkcol" width="100%"><nobr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1121 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#equals(java.lang.Object)">equals</a></span>(Object object)</nobr> |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1122 | |
| 1123 | </td></tr> |
| 1124 | |
| 1125 | |
| 1126 | |
| 1127 | <tr class=" api apilevel-" > |
| 1128 | <td class="jd-typecol"><nobr> |
| 1129 | |
| 1130 | |
| 1131 | |
| 1132 | |
| 1133 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1134 | long</nobr> |
| 1135 | </td> |
| 1136 | <td class="jd-linkcol" width="100%"><nobr> |
| 1137 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getExpirationTime()">getExpirationTime</a></span>()</nobr> |
| 1138 | |
| 1139 | <div class="jd-descrdiv">Get the request expiration time, in milliseconds since boot.</div> |
| 1140 | |
| 1141 | </td></tr> |
| 1142 | |
| 1143 | |
| 1144 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1145 | <tr class="alt-color api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1146 | <td class="jd-typecol"><nobr> |
| 1147 | |
| 1148 | |
| 1149 | |
| 1150 | |
| 1151 | |
| 1152 | long</nobr> |
| 1153 | </td> |
| 1154 | <td class="jd-linkcol" width="100%"><nobr> |
| 1155 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getFastestInterval()">getFastestInterval</a></span>()</nobr> |
| 1156 | |
| 1157 | <div class="jd-descrdiv">Get the fastest interval of this request, in milliseconds.</div> |
| 1158 | |
| 1159 | </td></tr> |
| 1160 | |
| 1161 | |
| 1162 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1163 | <tr class=" api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1164 | <td class="jd-typecol"><nobr> |
| 1165 | |
| 1166 | |
| 1167 | |
| 1168 | |
| 1169 | |
| 1170 | long</nobr> |
| 1171 | </td> |
| 1172 | <td class="jd-linkcol" width="100%"><nobr> |
| 1173 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getInterval()">getInterval</a></span>()</nobr> |
| 1174 | |
| 1175 | <div class="jd-descrdiv">Get the desired interval of this request, in milliseconds.</div> |
| 1176 | |
| 1177 | </td></tr> |
| 1178 | |
| 1179 | |
| 1180 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1181 | <tr class="alt-color api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1182 | <td class="jd-typecol"><nobr> |
| 1183 | |
| 1184 | |
| 1185 | |
| 1186 | |
| 1187 | |
| 1188 | int</nobr> |
| 1189 | </td> |
| 1190 | <td class="jd-linkcol" width="100%"><nobr> |
| 1191 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getNumUpdates()">getNumUpdates</a></span>()</nobr> |
| 1192 | |
| 1193 | <div class="jd-descrdiv">Get the number of updates requested.</div> |
| 1194 | |
| 1195 | </td></tr> |
| 1196 | |
| 1197 | |
| 1198 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1199 | <tr class=" api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1200 | <td class="jd-typecol"><nobr> |
| 1201 | |
| 1202 | |
| 1203 | |
| 1204 | |
| 1205 | |
| 1206 | int</nobr> |
| 1207 | </td> |
| 1208 | <td class="jd-linkcol" width="100%"><nobr> |
| 1209 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getPriority()">getPriority</a></span>()</nobr> |
| 1210 | |
| 1211 | <div class="jd-descrdiv">Get the quality of the request.</div> |
| 1212 | |
| 1213 | </td></tr> |
| 1214 | |
| 1215 | |
| 1216 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1217 | <tr class="alt-color api apilevel-" > |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1218 | <td class="jd-typecol"><nobr> |
| 1219 | |
| 1220 | |
| 1221 | |
| 1222 | |
| 1223 | |
| 1224 | float</nobr> |
| 1225 | </td> |
| 1226 | <td class="jd-linkcol" width="100%"><nobr> |
| 1227 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#getSmallestDisplacement()">getSmallestDisplacement</a></span>()</nobr> |
| 1228 | |
| 1229 | <div class="jd-descrdiv">Get the minimum displacement between location updates in meters |
| 1230 | |
| 1231 | <p>By default this is 0.</div> |
| 1232 | |
| 1233 | </td></tr> |
| 1234 | |
| 1235 | |
| 1236 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 1237 | <tr class=" api apilevel-" > |
| 1238 | <td class="jd-typecol"><nobr> |
| 1239 | |
| 1240 | |
| 1241 | |
| 1242 | |
| 1243 | |
| 1244 | int</nobr> |
| 1245 | </td> |
| 1246 | <td class="jd-linkcol" width="100%"><nobr> |
| 1247 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#hashCode()">hashCode</a></span>()</nobr> |
| 1248 | |
| 1249 | </td></tr> |
| 1250 | |
| 1251 | |
| 1252 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1253 | <tr class="alt-color api apilevel-" > |
| 1254 | <td class="jd-typecol"><nobr> |
| 1255 | |
| 1256 | |
| 1257 | |
| 1258 | |
| 1259 | |
| 1260 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1261 | </td> |
| 1262 | <td class="jd-linkcol" width="100%"><nobr> |
| 1263 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setExpirationDuration(long)">setExpirationDuration</a></span>(long millis)</nobr> |
| 1264 | |
| 1265 | <div class="jd-descrdiv">Set the duration of this request, in milliseconds.</div> |
| 1266 | |
| 1267 | </td></tr> |
| 1268 | |
| 1269 | |
| 1270 | |
| 1271 | <tr class=" api apilevel-" > |
| 1272 | <td class="jd-typecol"><nobr> |
| 1273 | |
| 1274 | |
| 1275 | |
| 1276 | |
| 1277 | |
| 1278 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1279 | </td> |
| 1280 | <td class="jd-linkcol" width="100%"><nobr> |
| 1281 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setExpirationTime(long)">setExpirationTime</a></span>(long millis)</nobr> |
| 1282 | |
| 1283 | <div class="jd-descrdiv">Set the request expiration time, in millisecond since boot.</div> |
| 1284 | |
| 1285 | </td></tr> |
| 1286 | |
| 1287 | |
| 1288 | |
| 1289 | <tr class="alt-color api apilevel-" > |
| 1290 | <td class="jd-typecol"><nobr> |
| 1291 | |
| 1292 | |
| 1293 | |
| 1294 | |
| 1295 | |
| 1296 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1297 | </td> |
| 1298 | <td class="jd-linkcol" width="100%"><nobr> |
| 1299 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval</a></span>(long millis)</nobr> |
| 1300 | |
| 1301 | <div class="jd-descrdiv">Explicitly set the fastest interval for location updates, in milliseconds.</div> |
| 1302 | |
| 1303 | </td></tr> |
| 1304 | |
| 1305 | |
| 1306 | |
| 1307 | <tr class=" api apilevel-" > |
| 1308 | <td class="jd-typecol"><nobr> |
| 1309 | |
| 1310 | |
| 1311 | |
| 1312 | |
| 1313 | |
| 1314 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1315 | </td> |
| 1316 | <td class="jd-linkcol" width="100%"><nobr> |
| 1317 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval</a></span>(long millis)</nobr> |
| 1318 | |
| 1319 | <div class="jd-descrdiv">Set the desired interval for active location updates, in milliseconds.</div> |
| 1320 | |
| 1321 | </td></tr> |
| 1322 | |
| 1323 | |
| 1324 | |
| 1325 | <tr class="alt-color api apilevel-" > |
| 1326 | <td class="jd-typecol"><nobr> |
| 1327 | |
| 1328 | |
| 1329 | |
| 1330 | |
| 1331 | |
| 1332 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1333 | </td> |
| 1334 | <td class="jd-linkcol" width="100%"><nobr> |
| 1335 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setNumUpdates(int)">setNumUpdates</a></span>(int numUpdates)</nobr> |
| 1336 | |
| 1337 | <div class="jd-descrdiv">Set the number of location updates.</div> |
| 1338 | |
| 1339 | </td></tr> |
| 1340 | |
| 1341 | |
| 1342 | |
| 1343 | <tr class=" api apilevel-" > |
| 1344 | <td class="jd-typecol"><nobr> |
| 1345 | |
| 1346 | |
| 1347 | |
| 1348 | |
| 1349 | |
| 1350 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1351 | </td> |
| 1352 | <td class="jd-linkcol" width="100%"><nobr> |
| 1353 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority</a></span>(int priority)</nobr> |
| 1354 | |
| 1355 | <div class="jd-descrdiv">Set the priority of the request.</div> |
| 1356 | |
| 1357 | </td></tr> |
| 1358 | |
| 1359 | |
| 1360 | |
| 1361 | <tr class="alt-color api apilevel-" > |
| 1362 | <td class="jd-typecol"><nobr> |
| 1363 | |
| 1364 | |
| 1365 | |
| 1366 | |
| 1367 | |
| 1368 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a></nobr> |
| 1369 | </td> |
| 1370 | <td class="jd-linkcol" width="100%"><nobr> |
| 1371 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#setSmallestDisplacement(float)">setSmallestDisplacement</a></span>(float smallestDisplacementMeters)</nobr> |
| 1372 | |
| 1373 | <div class="jd-descrdiv">Set the minimum displacement between location updates in meters |
| 1374 | |
| 1375 | <p>By default this is 0.</div> |
| 1376 | |
| 1377 | </td></tr> |
| 1378 | |
| 1379 | |
| 1380 | |
| 1381 | <tr class=" api apilevel-" > |
| 1382 | <td class="jd-typecol"><nobr> |
| 1383 | |
| 1384 | |
| 1385 | |
| 1386 | |
| 1387 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1388 | String</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1389 | </td> |
| 1390 | <td class="jd-linkcol" width="100%"><nobr> |
| 1391 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#toString()">toString</a></span>()</nobr> |
| 1392 | |
| 1393 | </td></tr> |
| 1394 | |
| 1395 | |
| 1396 | |
| 1397 | <tr class="alt-color api apilevel-" > |
| 1398 | <td class="jd-typecol"><nobr> |
| 1399 | |
| 1400 | |
| 1401 | |
| 1402 | |
| 1403 | |
| 1404 | void</nobr> |
| 1405 | </td> |
| 1406 | <td class="jd-linkcol" width="100%"><nobr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1407 | <span class="sympad"><a href="/reference/com/google/android/gms/location/LocationRequest.html#writeToParcel(android.os.Parcel, int)">writeToParcel</a></span>(Parcel parcel, int flags)</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1408 | |
| 1409 | </td></tr> |
| 1410 | |
| 1411 | |
| 1412 | |
| 1413 | </table> |
| 1414 | |
| 1415 | |
| 1416 | |
| 1417 | |
| 1418 | |
| 1419 | |
| 1420 | |
| 1421 | <!-- ========== METHOD SUMMARY =========== --> |
| 1422 | <table id="inhmethods" class="jd-sumtable"><tr><th> |
| 1423 | <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| 1424 | <div style="clear:left;">Inherited Methods</div></th></tr> |
| 1425 | |
| 1426 | |
| 1427 | <tr class="api apilevel-" > |
| 1428 | <td colspan="12"> |
| 1429 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" |
| 1430 | ><img id="inherited-methods-java.lang.Object-trigger" |
| 1431 | src="/assets/images/triangle-closed.png" |
| 1432 | class="jd-expando-trigger-img" /></a> |
| 1433 | From class |
| 1434 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1435 | java.lang.Object |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1436 | |
| 1437 | <div id="inherited-methods-java.lang.Object"> |
| 1438 | <div id="inherited-methods-java.lang.Object-list" |
| 1439 | class="jd-inheritedlinks"> |
| 1440 | </div> |
| 1441 | <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> |
| 1442 | <table class="jd-sumtable-expando"> |
| 1443 | |
| 1444 | |
| 1445 | |
| 1446 | |
| 1447 | <tr class="alt-color api apilevel-" > |
| 1448 | <td class="jd-typecol"><nobr> |
| 1449 | |
| 1450 | |
| 1451 | |
| 1452 | |
| 1453 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1454 | Object</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1455 | </td> |
| 1456 | <td class="jd-linkcol" width="100%"><nobr> |
| 1457 | <span class="sympad">clone</span>()</nobr> |
| 1458 | |
| 1459 | </td></tr> |
| 1460 | |
| 1461 | |
| 1462 | |
| 1463 | <tr class=" api apilevel-" > |
| 1464 | <td class="jd-typecol"><nobr> |
| 1465 | |
| 1466 | |
| 1467 | |
| 1468 | |
| 1469 | |
| 1470 | boolean</nobr> |
| 1471 | </td> |
| 1472 | <td class="jd-linkcol" width="100%"><nobr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1473 | <span class="sympad">equals</span>(Object arg0)</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1474 | |
| 1475 | </td></tr> |
| 1476 | |
| 1477 | |
| 1478 | |
| 1479 | <tr class="alt-color api apilevel-" > |
| 1480 | <td class="jd-typecol"><nobr> |
| 1481 | |
| 1482 | |
| 1483 | |
| 1484 | |
| 1485 | |
| 1486 | void</nobr> |
| 1487 | </td> |
| 1488 | <td class="jd-linkcol" width="100%"><nobr> |
| 1489 | <span class="sympad">finalize</span>()</nobr> |
| 1490 | |
| 1491 | </td></tr> |
| 1492 | |
| 1493 | |
| 1494 | |
| 1495 | <tr class=" api apilevel-" > |
| 1496 | <td class="jd-typecol"><nobr> |
| 1497 | |
| 1498 | |
| 1499 | final |
| 1500 | |
| 1501 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1502 | Class<?></nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1503 | </td> |
| 1504 | <td class="jd-linkcol" width="100%"><nobr> |
| 1505 | <span class="sympad">getClass</span>()</nobr> |
| 1506 | |
| 1507 | </td></tr> |
| 1508 | |
| 1509 | |
| 1510 | |
| 1511 | <tr class="alt-color api apilevel-" > |
| 1512 | <td class="jd-typecol"><nobr> |
| 1513 | |
| 1514 | |
| 1515 | |
| 1516 | |
| 1517 | |
| 1518 | int</nobr> |
| 1519 | </td> |
| 1520 | <td class="jd-linkcol" width="100%"><nobr> |
| 1521 | <span class="sympad">hashCode</span>()</nobr> |
| 1522 | |
| 1523 | </td></tr> |
| 1524 | |
| 1525 | |
| 1526 | |
| 1527 | <tr class=" api apilevel-" > |
| 1528 | <td class="jd-typecol"><nobr> |
| 1529 | |
| 1530 | |
| 1531 | final |
| 1532 | |
| 1533 | |
| 1534 | void</nobr> |
| 1535 | </td> |
| 1536 | <td class="jd-linkcol" width="100%"><nobr> |
| 1537 | <span class="sympad">notify</span>()</nobr> |
| 1538 | |
| 1539 | </td></tr> |
| 1540 | |
| 1541 | |
| 1542 | |
| 1543 | <tr class="alt-color api apilevel-" > |
| 1544 | <td class="jd-typecol"><nobr> |
| 1545 | |
| 1546 | |
| 1547 | final |
| 1548 | |
| 1549 | |
| 1550 | void</nobr> |
| 1551 | </td> |
| 1552 | <td class="jd-linkcol" width="100%"><nobr> |
| 1553 | <span class="sympad">notifyAll</span>()</nobr> |
| 1554 | |
| 1555 | </td></tr> |
| 1556 | |
| 1557 | |
| 1558 | |
| 1559 | <tr class=" api apilevel-" > |
| 1560 | <td class="jd-typecol"><nobr> |
| 1561 | |
| 1562 | |
| 1563 | |
| 1564 | |
| 1565 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1566 | String</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1567 | </td> |
| 1568 | <td class="jd-linkcol" width="100%"><nobr> |
| 1569 | <span class="sympad">toString</span>()</nobr> |
| 1570 | |
| 1571 | </td></tr> |
| 1572 | |
| 1573 | |
| 1574 | |
| 1575 | <tr class="alt-color api apilevel-" > |
| 1576 | <td class="jd-typecol"><nobr> |
| 1577 | |
| 1578 | |
| 1579 | final |
| 1580 | |
| 1581 | |
| 1582 | void</nobr> |
| 1583 | </td> |
| 1584 | <td class="jd-linkcol" width="100%"><nobr> |
| 1585 | <span class="sympad">wait</span>()</nobr> |
| 1586 | |
| 1587 | </td></tr> |
| 1588 | |
| 1589 | |
| 1590 | |
| 1591 | <tr class=" api apilevel-" > |
| 1592 | <td class="jd-typecol"><nobr> |
| 1593 | |
| 1594 | |
| 1595 | final |
| 1596 | |
| 1597 | |
| 1598 | void</nobr> |
| 1599 | </td> |
| 1600 | <td class="jd-linkcol" width="100%"><nobr> |
| 1601 | <span class="sympad">wait</span>(long arg0, int arg1)</nobr> |
| 1602 | |
| 1603 | </td></tr> |
| 1604 | |
| 1605 | |
| 1606 | |
| 1607 | <tr class="alt-color api apilevel-" > |
| 1608 | <td class="jd-typecol"><nobr> |
| 1609 | |
| 1610 | |
| 1611 | final |
| 1612 | |
| 1613 | |
| 1614 | void</nobr> |
| 1615 | </td> |
| 1616 | <td class="jd-linkcol" width="100%"><nobr> |
| 1617 | <span class="sympad">wait</span>(long arg0)</nobr> |
| 1618 | |
| 1619 | </td></tr> |
| 1620 | |
| 1621 | |
| 1622 | </table> |
| 1623 | </div> |
| 1624 | </div> |
| 1625 | </td></tr> |
| 1626 | |
| 1627 | |
| 1628 | |
| 1629 | <tr class="api apilevel-" > |
| 1630 | <td colspan="12"> |
| 1631 | <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.os.Parcelable" class="jd-expando-trigger closed" |
| 1632 | ><img id="inherited-methods-android.os.Parcelable-trigger" |
| 1633 | src="/assets/images/triangle-closed.png" |
| 1634 | class="jd-expando-trigger-img" /></a> |
| 1635 | From interface |
| 1636 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1637 | android.os.Parcelable |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1638 | |
| 1639 | <div id="inherited-methods-android.os.Parcelable"> |
| 1640 | <div id="inherited-methods-android.os.Parcelable-list" |
| 1641 | class="jd-inheritedlinks"> |
| 1642 | </div> |
| 1643 | <div id="inherited-methods-android.os.Parcelable-summary" style="display: none;"> |
| 1644 | <table class="jd-sumtable-expando"> |
| 1645 | |
| 1646 | |
| 1647 | |
| 1648 | |
| 1649 | <tr class="alt-color api apilevel-" > |
| 1650 | <td class="jd-typecol"><nobr> |
| 1651 | abstract |
| 1652 | |
| 1653 | |
| 1654 | |
| 1655 | |
| 1656 | int</nobr> |
| 1657 | </td> |
| 1658 | <td class="jd-linkcol" width="100%"><nobr> |
| 1659 | <span class="sympad">describeContents</span>()</nobr> |
| 1660 | |
| 1661 | </td></tr> |
| 1662 | |
| 1663 | |
| 1664 | |
| 1665 | <tr class=" api apilevel-" > |
| 1666 | <td class="jd-typecol"><nobr> |
| 1667 | abstract |
| 1668 | |
| 1669 | |
| 1670 | |
| 1671 | |
| 1672 | void</nobr> |
| 1673 | </td> |
| 1674 | <td class="jd-linkcol" width="100%"><nobr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 1675 | <span class="sympad">writeToParcel</span>(Parcel arg0, int arg1)</nobr> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1676 | |
| 1677 | </td></tr> |
| 1678 | |
| 1679 | |
| 1680 | </table> |
| 1681 | </div> |
| 1682 | </div> |
| 1683 | </td></tr> |
| 1684 | |
| 1685 | |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 1686 | |
| 1687 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1688 | </table> |
| 1689 | |
| 1690 | |
| 1691 | </div><!-- jd-descr (summary) --> |
| 1692 | |
| 1693 | <!-- Details --> |
| 1694 | |
| 1695 | |
| 1696 | |
| 1697 | |
| 1698 | |
| 1699 | |
| 1700 | |
| 1701 | |
| 1702 | <!-- XML Attributes --> |
| 1703 | |
| 1704 | |
| 1705 | <!-- Enum Values --> |
| 1706 | |
| 1707 | |
| 1708 | <!-- Constants --> |
| 1709 | |
| 1710 | |
| 1711 | <!-- ========= ENUM CONSTANTS DETAIL ======== --> |
| 1712 | <h2>Constants</h2> |
| 1713 | |
| 1714 | |
| 1715 | |
| 1716 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1717 | <A NAME="PRIORITY_BALANCED_POWER_ACCURACY"></A> |
| 1718 | |
| 1719 | <div class="jd-details api apilevel-"> |
| 1720 | <h4 class="jd-details-title"> |
| 1721 | <span class="normal"> |
| 1722 | public |
| 1723 | static |
| 1724 | final |
| 1725 | int |
| 1726 | </span> |
| 1727 | PRIORITY_BALANCED_POWER_ACCURACY |
| 1728 | </h4> |
| 1729 | <div class="api-level"> |
| 1730 | |
| 1731 | |
| 1732 | |
| 1733 | |
| 1734 | </div> |
| 1735 | <div class="jd-details-descr"> |
| 1736 | |
| 1737 | <div class="jd-tagdata jd-tagdescr"><p>Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request "block" level accuracy. |
| 1738 | |
| 1739 | <p>Block level accuracy is considered to be about 100 meter accuracy. Using a coarse |
| 1740 | accuracy such as this often consumes less power. |
| 1741 | </p></div> |
| 1742 | |
| 1743 | |
| 1744 | <div class="jd-tagdata"> |
| 1745 | <span class="jd-tagtitle">Constant Value: </span> |
| 1746 | <span> |
| 1747 | |
| 1748 | 102 |
| 1749 | (0x00000066) |
| 1750 | |
| 1751 | </span> |
| 1752 | </div> |
| 1753 | |
| 1754 | </div> |
| 1755 | </div> |
| 1756 | |
| 1757 | |
| 1758 | |
| 1759 | <A NAME="PRIORITY_HIGH_ACCURACY"></A> |
| 1760 | |
| 1761 | <div class="jd-details api apilevel-"> |
| 1762 | <h4 class="jd-details-title"> |
| 1763 | <span class="normal"> |
| 1764 | public |
| 1765 | static |
| 1766 | final |
| 1767 | int |
| 1768 | </span> |
| 1769 | PRIORITY_HIGH_ACCURACY |
| 1770 | </h4> |
| 1771 | <div class="api-level"> |
| 1772 | |
| 1773 | |
| 1774 | |
| 1775 | |
| 1776 | </div> |
| 1777 | <div class="jd-details-descr"> |
| 1778 | |
| 1779 | <div class="jd-tagdata jd-tagdescr"><p>Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request the most accurate locations available. |
| 1780 | |
| 1781 | <p>This will return the finest location available. |
| 1782 | </p></div> |
| 1783 | |
| 1784 | |
| 1785 | <div class="jd-tagdata"> |
| 1786 | <span class="jd-tagtitle">Constant Value: </span> |
| 1787 | <span> |
| 1788 | |
| 1789 | 100 |
| 1790 | (0x00000064) |
| 1791 | |
| 1792 | </span> |
| 1793 | </div> |
| 1794 | |
| 1795 | </div> |
| 1796 | </div> |
| 1797 | |
| 1798 | |
| 1799 | |
Dirk Dougherty | c1609c4 | 2013-08-01 15:30:06 -0700 | [diff] [blame] | 1800 | <A NAME="PRIORITY_LOW_POWER"></A> |
| 1801 | |
| 1802 | <div class="jd-details api apilevel-"> |
| 1803 | <h4 class="jd-details-title"> |
| 1804 | <span class="normal"> |
| 1805 | public |
| 1806 | static |
| 1807 | final |
| 1808 | int |
| 1809 | </span> |
| 1810 | PRIORITY_LOW_POWER |
| 1811 | </h4> |
| 1812 | <div class="api-level"> |
| 1813 | |
| 1814 | |
| 1815 | |
| 1816 | |
| 1817 | </div> |
| 1818 | <div class="jd-details-descr"> |
| 1819 | |
| 1820 | <div class="jd-tagdata jd-tagdescr"><p>Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request "city" level accuracy. |
| 1821 | |
| 1822 | <p>City level accuracy is considered to be about 10km accuracy. Using a coarse accuracy |
| 1823 | such as this often consumes less power. |
| 1824 | </p></div> |
| 1825 | |
| 1826 | |
| 1827 | <div class="jd-tagdata"> |
| 1828 | <span class="jd-tagtitle">Constant Value: </span> |
| 1829 | <span> |
| 1830 | |
| 1831 | 104 |
| 1832 | (0x00000068) |
| 1833 | |
| 1834 | </span> |
| 1835 | </div> |
| 1836 | |
| 1837 | </div> |
| 1838 | </div> |
| 1839 | |
| 1840 | |
| 1841 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1842 | <A NAME="PRIORITY_NO_POWER"></A> |
| 1843 | |
| 1844 | <div class="jd-details api apilevel-"> |
| 1845 | <h4 class="jd-details-title"> |
| 1846 | <span class="normal"> |
| 1847 | public |
| 1848 | static |
| 1849 | final |
| 1850 | int |
| 1851 | </span> |
| 1852 | PRIORITY_NO_POWER |
| 1853 | </h4> |
| 1854 | <div class="api-level"> |
| 1855 | |
| 1856 | |
| 1857 | |
| 1858 | |
| 1859 | </div> |
| 1860 | <div class="jd-details-descr"> |
| 1861 | |
| 1862 | <div class="jd-tagdata jd-tagdescr"><p>Used with <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> to request the best accuracy possible with zero additional |
| 1863 | power consumption. |
| 1864 | |
| 1865 | <p>No locations will be returned unless a different client has requested location updates |
| 1866 | in which case this request will act as a passive listener to those locations. |
| 1867 | </p></div> |
| 1868 | |
| 1869 | |
| 1870 | <div class="jd-tagdata"> |
| 1871 | <span class="jd-tagtitle">Constant Value: </span> |
| 1872 | <span> |
| 1873 | |
| 1874 | 105 |
| 1875 | (0x00000069) |
| 1876 | |
| 1877 | </span> |
| 1878 | </div> |
| 1879 | |
| 1880 | </div> |
| 1881 | </div> |
| 1882 | |
| 1883 | |
| 1884 | |
| 1885 | |
| 1886 | <!-- Fields --> |
| 1887 | |
| 1888 | |
| 1889 | <!-- ========= FIELD DETAIL ======== --> |
| 1890 | <h2>Fields</h2> |
| 1891 | |
| 1892 | |
| 1893 | |
| 1894 | |
| 1895 | <A NAME="CREATOR"></A> |
| 1896 | |
| 1897 | <div class="jd-details api apilevel-"> |
| 1898 | <h4 class="jd-details-title"> |
| 1899 | <span class="normal"> |
| 1900 | public |
| 1901 | static |
| 1902 | final |
Quddus Chong | 559c006 | 2014-06-12 13:59:34 -0700 | [diff] [blame] | 1903 | LocationRequestCreator |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 1904 | </span> |
| 1905 | CREATOR |
| 1906 | </h4> |
| 1907 | <div class="api-level"> |
| 1908 | |
| 1909 | |
| 1910 | |
| 1911 | |
| 1912 | </div> |
| 1913 | <div class="jd-details-descr"> |
| 1914 | |
| 1915 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 1916 | |
| 1917 | |
| 1918 | </div> |
| 1919 | </div> |
| 1920 | |
| 1921 | |
| 1922 | |
| 1923 | |
| 1924 | <!-- Public ctors --> |
| 1925 | |
| 1926 | |
| 1927 | |
| 1928 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| 1929 | <!-- Protected ctors --> |
| 1930 | |
| 1931 | |
| 1932 | |
| 1933 | <!-- ========= METHOD DETAIL ======== --> |
| 1934 | <!-- Public methdos --> |
| 1935 | |
| 1936 | <h2>Public Methods</h2> |
| 1937 | |
| 1938 | |
| 1939 | |
| 1940 | <A NAME="create()"></A> |
| 1941 | |
| 1942 | <div class="jd-details api apilevel-"> |
| 1943 | <h4 class="jd-details-title"> |
| 1944 | <span class="normal"> |
| 1945 | public |
| 1946 | static |
| 1947 | |
| 1948 | |
| 1949 | |
| 1950 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 1951 | </span> |
| 1952 | <span class="sympad">create</span> |
| 1953 | <span class="normal">()</span> |
| 1954 | </h4> |
| 1955 | <div class="api-level"> |
| 1956 | <div></div> |
| 1957 | |
| 1958 | |
| 1959 | |
| 1960 | </div> |
| 1961 | <div class="jd-details-descr"> |
| 1962 | |
| 1963 | <div class="jd-tagdata jd-tagdescr"><p>Create a location request with default parameters. |
| 1964 | |
| 1965 | <p>Default parameters are for a block accuracy, slowly updated location. It can then be |
| 1966 | adjusted as required by the applications before passing to the <code><a href="/reference/com/google/android/gms/location/LocationClient.html">LocationClient</a></code>.</p></div> |
| 1967 | <div class="jd-tagdata"> |
| 1968 | <h5 class="jd-tagtitle">Returns</h5> |
| 1969 | <ul class="nolist"><li>a new location request |
| 1970 | </li></ul> |
| 1971 | </div> |
| 1972 | |
| 1973 | </div> |
| 1974 | </div> |
| 1975 | |
| 1976 | |
| 1977 | <A NAME="describeContents()"></A> |
| 1978 | |
| 1979 | <div class="jd-details api apilevel-"> |
| 1980 | <h4 class="jd-details-title"> |
| 1981 | <span class="normal"> |
| 1982 | public |
| 1983 | |
| 1984 | |
| 1985 | |
| 1986 | |
| 1987 | int |
| 1988 | </span> |
| 1989 | <span class="sympad">describeContents</span> |
| 1990 | <span class="normal">()</span> |
| 1991 | </h4> |
| 1992 | <div class="api-level"> |
| 1993 | <div></div> |
| 1994 | |
| 1995 | |
| 1996 | |
| 1997 | </div> |
| 1998 | <div class="jd-details-descr"> |
| 1999 | |
| 2000 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 2001 | |
| 2002 | </div> |
| 2003 | </div> |
| 2004 | |
| 2005 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 2006 | <A NAME="equals(java.lang.Object)"></A> |
| 2007 | |
| 2008 | <div class="jd-details api apilevel-"> |
| 2009 | <h4 class="jd-details-title"> |
| 2010 | <span class="normal"> |
| 2011 | public |
| 2012 | |
| 2013 | |
| 2014 | |
| 2015 | |
| 2016 | boolean |
| 2017 | </span> |
| 2018 | <span class="sympad">equals</span> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2019 | <span class="normal">(Object object)</span> |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 2020 | </h4> |
| 2021 | <div class="api-level"> |
| 2022 | <div></div> |
| 2023 | |
| 2024 | |
| 2025 | |
| 2026 | </div> |
| 2027 | <div class="jd-details-descr"> |
| 2028 | |
| 2029 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 2030 | |
| 2031 | </div> |
| 2032 | </div> |
| 2033 | |
| 2034 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2035 | <A NAME="getExpirationTime()"></A> |
| 2036 | |
| 2037 | <div class="jd-details api apilevel-"> |
| 2038 | <h4 class="jd-details-title"> |
| 2039 | <span class="normal"> |
| 2040 | public |
| 2041 | |
| 2042 | |
| 2043 | |
| 2044 | |
| 2045 | long |
| 2046 | </span> |
| 2047 | <span class="sympad">getExpirationTime</span> |
| 2048 | <span class="normal">()</span> |
| 2049 | </h4> |
| 2050 | <div class="api-level"> |
| 2051 | <div></div> |
| 2052 | |
| 2053 | |
| 2054 | |
| 2055 | </div> |
| 2056 | <div class="jd-details-descr"> |
| 2057 | |
| 2058 | <div class="jd-tagdata jd-tagdescr"><p>Get the request expiration time, in milliseconds since boot. |
| 2059 | |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 2060 | <p>This value can be compared to <code><a href="/reference/android/os/SystemClock.html#elapsedRealtime()">elapsedRealtime()</a></code> to determine the time |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2061 | until expiration.</p></div> |
| 2062 | <div class="jd-tagdata"> |
| 2063 | <h5 class="jd-tagtitle">Returns</h5> |
| 2064 | <ul class="nolist"><li>expiration time of request, in milliseconds since boot including suspend |
| 2065 | </li></ul> |
| 2066 | </div> |
| 2067 | |
| 2068 | </div> |
| 2069 | </div> |
| 2070 | |
| 2071 | |
| 2072 | <A NAME="getFastestInterval()"></A> |
| 2073 | |
| 2074 | <div class="jd-details api apilevel-"> |
| 2075 | <h4 class="jd-details-title"> |
| 2076 | <span class="normal"> |
| 2077 | public |
| 2078 | |
| 2079 | |
| 2080 | |
| 2081 | |
| 2082 | long |
| 2083 | </span> |
| 2084 | <span class="sympad">getFastestInterval</span> |
| 2085 | <span class="normal">()</span> |
| 2086 | </h4> |
| 2087 | <div class="api-level"> |
| 2088 | <div></div> |
| 2089 | |
| 2090 | |
| 2091 | |
| 2092 | </div> |
| 2093 | <div class="jd-details-descr"> |
| 2094 | |
| 2095 | <div class="jd-tagdata jd-tagdescr"><p>Get the fastest interval of this request, in milliseconds. |
| 2096 | |
| 2097 | <p>The system will never provide location updates faster than the minimum of |
| 2098 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#getFastestInterval()">getFastestInterval()</a></code> and <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#getInterval()">getInterval()</a></code>.</p></div> |
| 2099 | <div class="jd-tagdata"> |
| 2100 | <h5 class="jd-tagtitle">Returns</h5> |
| 2101 | <ul class="nolist"><li>fastest interval in milliseconds, exact |
| 2102 | </li></ul> |
| 2103 | </div> |
| 2104 | |
| 2105 | </div> |
| 2106 | </div> |
| 2107 | |
| 2108 | |
| 2109 | <A NAME="getInterval()"></A> |
| 2110 | |
| 2111 | <div class="jd-details api apilevel-"> |
| 2112 | <h4 class="jd-details-title"> |
| 2113 | <span class="normal"> |
| 2114 | public |
| 2115 | |
| 2116 | |
| 2117 | |
| 2118 | |
| 2119 | long |
| 2120 | </span> |
| 2121 | <span class="sympad">getInterval</span> |
| 2122 | <span class="normal">()</span> |
| 2123 | </h4> |
| 2124 | <div class="api-level"> |
| 2125 | <div></div> |
| 2126 | |
| 2127 | |
| 2128 | |
| 2129 | </div> |
| 2130 | <div class="jd-details-descr"> |
| 2131 | |
| 2132 | <div class="jd-tagdata jd-tagdescr"><p>Get the desired interval of this request, in milliseconds.</p></div> |
| 2133 | <div class="jd-tagdata"> |
| 2134 | <h5 class="jd-tagtitle">Returns</h5> |
| 2135 | <ul class="nolist"><li>desired interval in milliseconds, inexact |
| 2136 | </li></ul> |
| 2137 | </div> |
| 2138 | |
| 2139 | </div> |
| 2140 | </div> |
| 2141 | |
| 2142 | |
| 2143 | <A NAME="getNumUpdates()"></A> |
| 2144 | |
| 2145 | <div class="jd-details api apilevel-"> |
| 2146 | <h4 class="jd-details-title"> |
| 2147 | <span class="normal"> |
| 2148 | public |
| 2149 | |
| 2150 | |
| 2151 | |
| 2152 | |
| 2153 | int |
| 2154 | </span> |
| 2155 | <span class="sympad">getNumUpdates</span> |
| 2156 | <span class="normal">()</span> |
| 2157 | </h4> |
| 2158 | <div class="api-level"> |
| 2159 | <div></div> |
| 2160 | |
| 2161 | |
| 2162 | |
| 2163 | </div> |
| 2164 | <div class="jd-details-descr"> |
| 2165 | |
| 2166 | <div class="jd-tagdata jd-tagdescr"><p>Get the number of updates requested. |
| 2167 | |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 2168 | <p>By default this is <code><a href="/reference/java/lang/Integer.html#MAX_VALUE">MAX_VALUE</a></code>, which indicates that locations are updated |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2169 | until the request is explicitly removed.</p></div> |
| 2170 | <div class="jd-tagdata"> |
| 2171 | <h5 class="jd-tagtitle">Returns</h5> |
| 2172 | <ul class="nolist"><li>number of updates |
| 2173 | </li></ul> |
| 2174 | </div> |
| 2175 | |
| 2176 | </div> |
| 2177 | </div> |
| 2178 | |
| 2179 | |
| 2180 | <A NAME="getPriority()"></A> |
| 2181 | |
| 2182 | <div class="jd-details api apilevel-"> |
| 2183 | <h4 class="jd-details-title"> |
| 2184 | <span class="normal"> |
| 2185 | public |
| 2186 | |
| 2187 | |
| 2188 | |
| 2189 | |
| 2190 | int |
| 2191 | </span> |
| 2192 | <span class="sympad">getPriority</span> |
| 2193 | <span class="normal">()</span> |
| 2194 | </h4> |
| 2195 | <div class="api-level"> |
| 2196 | <div></div> |
| 2197 | |
| 2198 | |
| 2199 | |
| 2200 | </div> |
| 2201 | <div class="jd-details-descr"> |
| 2202 | |
| 2203 | <div class="jd-tagdata jd-tagdescr"><p>Get the quality of the request.</p></div> |
| 2204 | <div class="jd-tagdata"> |
| 2205 | <h5 class="jd-tagtitle">Returns</h5> |
| 2206 | <ul class="nolist"><li>an accuracy constant |
| 2207 | </li></ul> |
| 2208 | </div> |
| 2209 | |
| 2210 | </div> |
| 2211 | </div> |
| 2212 | |
| 2213 | |
| 2214 | <A NAME="getSmallestDisplacement()"></A> |
| 2215 | |
| 2216 | <div class="jd-details api apilevel-"> |
| 2217 | <h4 class="jd-details-title"> |
| 2218 | <span class="normal"> |
| 2219 | public |
| 2220 | |
| 2221 | |
| 2222 | |
| 2223 | |
| 2224 | float |
| 2225 | </span> |
| 2226 | <span class="sympad">getSmallestDisplacement</span> |
| 2227 | <span class="normal">()</span> |
| 2228 | </h4> |
| 2229 | <div class="api-level"> |
| 2230 | <div></div> |
| 2231 | |
| 2232 | |
| 2233 | |
| 2234 | </div> |
| 2235 | <div class="jd-details-descr"> |
| 2236 | |
| 2237 | <div class="jd-tagdata jd-tagdescr"><p>Get the minimum displacement between location updates in meters |
| 2238 | |
| 2239 | <p>By default this is 0.</p></div> |
| 2240 | <div class="jd-tagdata"> |
| 2241 | <h5 class="jd-tagtitle">Returns</h5> |
| 2242 | <ul class="nolist"><li>minimum displacement between location updates in meters |
| 2243 | </li></ul> |
| 2244 | </div> |
| 2245 | |
| 2246 | </div> |
| 2247 | </div> |
| 2248 | |
| 2249 | |
Dirk Dougherty | 8f1a759 | 2013-06-28 14:04:39 -0700 | [diff] [blame] | 2250 | <A NAME="hashCode()"></A> |
| 2251 | |
| 2252 | <div class="jd-details api apilevel-"> |
| 2253 | <h4 class="jd-details-title"> |
| 2254 | <span class="normal"> |
| 2255 | public |
| 2256 | |
| 2257 | |
| 2258 | |
| 2259 | |
| 2260 | int |
| 2261 | </span> |
| 2262 | <span class="sympad">hashCode</span> |
| 2263 | <span class="normal">()</span> |
| 2264 | </h4> |
| 2265 | <div class="api-level"> |
| 2266 | <div></div> |
| 2267 | |
| 2268 | |
| 2269 | |
| 2270 | </div> |
| 2271 | <div class="jd-details-descr"> |
| 2272 | |
| 2273 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 2274 | |
| 2275 | </div> |
| 2276 | </div> |
| 2277 | |
| 2278 | |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2279 | <A NAME="setExpirationDuration(long)"></A> |
| 2280 | |
| 2281 | <div class="jd-details api apilevel-"> |
| 2282 | <h4 class="jd-details-title"> |
| 2283 | <span class="normal"> |
| 2284 | public |
| 2285 | |
| 2286 | |
| 2287 | |
| 2288 | |
| 2289 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2290 | </span> |
| 2291 | <span class="sympad">setExpirationDuration</span> |
| 2292 | <span class="normal">(long millis)</span> |
| 2293 | </h4> |
| 2294 | <div class="api-level"> |
| 2295 | <div></div> |
| 2296 | |
| 2297 | |
| 2298 | |
| 2299 | </div> |
| 2300 | <div class="jd-details-descr"> |
| 2301 | |
| 2302 | <div class="jd-tagdata jd-tagdescr"><p>Set the duration of this request, in milliseconds. |
| 2303 | |
| 2304 | <p>The duration begins immediately (and not when the request is passed to the location |
| 2305 | client), so call this method again if the request is re-used at a later time. |
| 2306 | |
| 2307 | <p>The location client will automatically stop updates after the request expires. |
| 2308 | |
| 2309 | <p>The duration includes suspend time. Values less than 0 are allowed, but indicate that |
| 2310 | the request has already expired.</p></div> |
| 2311 | <div class="jd-tagdata"> |
| 2312 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2313 | <table class="jd-tagtable"> |
| 2314 | <tr> |
| 2315 | <th>millis</td> |
| 2316 | <td>duration of request in milliseconds</td> |
| 2317 | </tr> |
| 2318 | </table> |
| 2319 | </div> |
| 2320 | <div class="jd-tagdata"> |
| 2321 | <h5 class="jd-tagtitle">Returns</h5> |
| 2322 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2323 | </li></ul> |
| 2324 | </div> |
| 2325 | |
| 2326 | </div> |
| 2327 | </div> |
| 2328 | |
| 2329 | |
| 2330 | <A NAME="setExpirationTime(long)"></A> |
| 2331 | |
| 2332 | <div class="jd-details api apilevel-"> |
| 2333 | <h4 class="jd-details-title"> |
| 2334 | <span class="normal"> |
| 2335 | public |
| 2336 | |
| 2337 | |
| 2338 | |
| 2339 | |
| 2340 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2341 | </span> |
| 2342 | <span class="sympad">setExpirationTime</span> |
| 2343 | <span class="normal">(long millis)</span> |
| 2344 | </h4> |
| 2345 | <div class="api-level"> |
| 2346 | <div></div> |
| 2347 | |
| 2348 | |
| 2349 | |
| 2350 | </div> |
| 2351 | <div class="jd-details-descr"> |
| 2352 | |
| 2353 | <div class="jd-tagdata jd-tagdescr"><p>Set the request expiration time, in millisecond since boot. |
| 2354 | |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 2355 | <p>This expiration time uses the same time base as <code><a href="/reference/android/os/SystemClock.html#elapsedRealtime()">elapsedRealtime()</a></code>. |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2356 | |
| 2357 | <p>The location client will automatically stop updates after the request expires. |
| 2358 | |
Dirk Dougherty | 4e847bd | 2013-08-06 09:59:51 -0700 | [diff] [blame] | 2359 | <p>The duration includes suspend time. Values before <code><a href="/reference/android/os/SystemClock.html#elapsedRealtime()">elapsedRealtime()</a></code> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2360 | are allowed, but indicate that the request has already expired.</p></div> |
| 2361 | <div class="jd-tagdata"> |
| 2362 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2363 | <table class="jd-tagtable"> |
| 2364 | <tr> |
| 2365 | <th>millis</td> |
| 2366 | <td>expiration time of request, in milliseconds since boot including suspend</td> |
| 2367 | </tr> |
| 2368 | </table> |
| 2369 | </div> |
| 2370 | <div class="jd-tagdata"> |
| 2371 | <h5 class="jd-tagtitle">Returns</h5> |
| 2372 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2373 | </li></ul> |
| 2374 | </div> |
| 2375 | |
| 2376 | </div> |
| 2377 | </div> |
| 2378 | |
| 2379 | |
| 2380 | <A NAME="setFastestInterval(long)"></A> |
| 2381 | |
| 2382 | <div class="jd-details api apilevel-"> |
| 2383 | <h4 class="jd-details-title"> |
| 2384 | <span class="normal"> |
| 2385 | public |
| 2386 | |
| 2387 | |
| 2388 | |
| 2389 | |
| 2390 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2391 | </span> |
| 2392 | <span class="sympad">setFastestInterval</span> |
| 2393 | <span class="normal">(long millis)</span> |
| 2394 | </h4> |
| 2395 | <div class="api-level"> |
| 2396 | <div></div> |
| 2397 | |
| 2398 | |
| 2399 | |
| 2400 | </div> |
| 2401 | <div class="jd-details-descr"> |
| 2402 | |
| 2403 | <div class="jd-tagdata jd-tagdescr"><p>Explicitly set the fastest interval for location updates, in milliseconds. |
| 2404 | |
| 2405 | <p>This controls the fastest rate at which your application will receive location updates, |
| 2406 | which might be faster than <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code> in some situations (for example, if other |
| 2407 | applications are triggering location updates). |
| 2408 | |
| 2409 | <p>This allows your application to passively acquire locations at a rate faster than it |
| 2410 | actively acquires locations, saving power. |
| 2411 | |
| 2412 | <p>Unlike <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code>, this parameter is exact. Your application will never |
| 2413 | receive updates faster than this value. |
| 2414 | |
| 2415 | <p>If you don't call this method, a fastest interval will be selected for you. It will be |
| 2416 | a value faster than your active interval (<code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code>). |
| 2417 | |
| 2418 | <p>An interval of 0 is allowed, but not recommended, since location updates may be |
| 2419 | extremely fast on future implementations. |
| 2420 | |
| 2421 | <p>If <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code> is set slower than <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code>, then your |
| 2422 | effective fastest interval is <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code>.</p></div> |
| 2423 | <div class="jd-tagdata"> |
| 2424 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2425 | <table class="jd-tagtable"> |
| 2426 | <tr> |
| 2427 | <th>millis</td> |
| 2428 | <td>fastest interval for updates in milliseconds, exact</td> |
| 2429 | </tr> |
| 2430 | </table> |
| 2431 | </div> |
| 2432 | <div class="jd-tagdata"> |
| 2433 | <h5 class="jd-tagtitle">Returns</h5> |
| 2434 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2435 | </li></ul> |
| 2436 | </div> |
| 2437 | <div class="jd-tagdata"> |
| 2438 | <h5 class="jd-tagtitle">Throws</h5> |
| 2439 | <table class="jd-tagtable"> |
| 2440 | <tr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2441 | <th>IllegalArgumentException</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2442 | <td>if the interval is less than zero</td> |
| 2443 | </tr> |
| 2444 | </table> |
| 2445 | </div> |
| 2446 | |
| 2447 | </div> |
| 2448 | </div> |
| 2449 | |
| 2450 | |
| 2451 | <A NAME="setInterval(long)"></A> |
| 2452 | |
| 2453 | <div class="jd-details api apilevel-"> |
| 2454 | <h4 class="jd-details-title"> |
| 2455 | <span class="normal"> |
| 2456 | public |
| 2457 | |
| 2458 | |
| 2459 | |
| 2460 | |
| 2461 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2462 | </span> |
| 2463 | <span class="sympad">setInterval</span> |
| 2464 | <span class="normal">(long millis)</span> |
| 2465 | </h4> |
| 2466 | <div class="api-level"> |
| 2467 | <div></div> |
| 2468 | |
| 2469 | |
| 2470 | |
| 2471 | </div> |
| 2472 | <div class="jd-details-descr"> |
| 2473 | |
| 2474 | <div class="jd-tagdata jd-tagdescr"><p>Set the desired interval for active location updates, in milliseconds. |
| 2475 | |
| 2476 | <p>The location client will actively try to obtain location updates for your application |
| 2477 | at this interval, so it has a direct influence on the amount of power used by your |
| 2478 | application. Choose your interval wisely. |
| 2479 | |
| 2480 | <p>This interval is inexact. You may not receive updates at all (if no location sources |
| 2481 | are available), or you may receive them slower than requested. You may also receive them |
| 2482 | faster than requested (if other applications are requesting location at a faster interval). |
Mark Doliner | d0646dc | 2014-08-27 16:04:02 -0700 | [diff] [blame] | 2483 | The fastest rate that you will receive updates can be controlled with |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2484 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setFastestInterval(long)">setFastestInterval(long)</a></code>. By default this fastest rate is 6x the interval frequency. |
| 2485 | |
| 2486 | <p>Applications with only the coarse location permission may have their interval silently |
| 2487 | throttled. |
| 2488 | |
| 2489 | <p>An interval of 0 is allowed, but not recommended, since location updates may be extremely |
| 2490 | fast on future implementations. |
| 2491 | |
| 2492 | <p><code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> and <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code> are the most important parameters |
| 2493 | on a location request.</p></div> |
| 2494 | <div class="jd-tagdata"> |
| 2495 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2496 | <table class="jd-tagtable"> |
| 2497 | <tr> |
| 2498 | <th>millis</td> |
| 2499 | <td>desired interval in millisecond, inexact</td> |
| 2500 | </tr> |
| 2501 | </table> |
| 2502 | </div> |
| 2503 | <div class="jd-tagdata"> |
| 2504 | <h5 class="jd-tagtitle">Returns</h5> |
| 2505 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2506 | </li></ul> |
| 2507 | </div> |
| 2508 | <div class="jd-tagdata"> |
| 2509 | <h5 class="jd-tagtitle">Throws</h5> |
| 2510 | <table class="jd-tagtable"> |
| 2511 | <tr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2512 | <th>IllegalArgumentException</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2513 | <td>if the interval is less than zero</td> |
| 2514 | </tr> |
| 2515 | </table> |
| 2516 | </div> |
| 2517 | |
| 2518 | </div> |
| 2519 | </div> |
| 2520 | |
| 2521 | |
| 2522 | <A NAME="setNumUpdates(int)"></A> |
| 2523 | |
| 2524 | <div class="jd-details api apilevel-"> |
| 2525 | <h4 class="jd-details-title"> |
| 2526 | <span class="normal"> |
| 2527 | public |
| 2528 | |
| 2529 | |
| 2530 | |
| 2531 | |
| 2532 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2533 | </span> |
| 2534 | <span class="sympad">setNumUpdates</span> |
| 2535 | <span class="normal">(int numUpdates)</span> |
| 2536 | </h4> |
| 2537 | <div class="api-level"> |
| 2538 | <div></div> |
| 2539 | |
| 2540 | |
| 2541 | |
| 2542 | </div> |
| 2543 | <div class="jd-details-descr"> |
| 2544 | |
| 2545 | <div class="jd-tagdata jd-tagdescr"><p>Set the number of location updates. |
| 2546 | |
| 2547 | <p>By default locations are continuously updated until the request is explicitly removed, |
| 2548 | however you can optionally request a set number of updates. For example, if your |
| 2549 | application only needs a single fresh location, then call this method with a value of 1 |
quddusc | 563daee | 2013-12-03 19:31:14 -0800 | [diff] [blame] | 2550 | before passing the request to the location client. |
| 2551 | |
| 2552 | <p>When using this option care must be taken to either explicitly remove the request |
| 2553 | when no longer needed or to set an expiration with (<code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setExpirationDuration(long)">setExpirationDuration(long)</a></code> or |
| 2554 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setExpirationTime(long)">setExpirationTime(long)</a></code>. Otherwise in some cases if a location can't be computed, this |
| 2555 | request could stay active indefinitely consuming power.</p></div> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2556 | <div class="jd-tagdata"> |
| 2557 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2558 | <table class="jd-tagtable"> |
| 2559 | <tr> |
| 2560 | <th>numUpdates</td> |
| 2561 | <td>the number of location updates requested</td> |
| 2562 | </tr> |
| 2563 | </table> |
| 2564 | </div> |
| 2565 | <div class="jd-tagdata"> |
| 2566 | <h5 class="jd-tagtitle">Returns</h5> |
| 2567 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2568 | </li></ul> |
| 2569 | </div> |
| 2570 | <div class="jd-tagdata"> |
| 2571 | <h5 class="jd-tagtitle">Throws</h5> |
| 2572 | <table class="jd-tagtable"> |
| 2573 | <tr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2574 | <th>IllegalArgumentException</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2575 | <td>if numUpdates is 0 or less</td> |
| 2576 | </tr> |
| 2577 | </table> |
| 2578 | </div> |
| 2579 | |
| 2580 | </div> |
| 2581 | </div> |
| 2582 | |
| 2583 | |
| 2584 | <A NAME="setPriority(int)"></A> |
| 2585 | |
| 2586 | <div class="jd-details api apilevel-"> |
| 2587 | <h4 class="jd-details-title"> |
| 2588 | <span class="normal"> |
| 2589 | public |
| 2590 | |
| 2591 | |
| 2592 | |
| 2593 | |
| 2594 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2595 | </span> |
| 2596 | <span class="sympad">setPriority</span> |
| 2597 | <span class="normal">(int priority)</span> |
| 2598 | </h4> |
| 2599 | <div class="api-level"> |
| 2600 | <div></div> |
| 2601 | |
| 2602 | |
| 2603 | |
| 2604 | </div> |
| 2605 | <div class="jd-details-descr"> |
| 2606 | |
| 2607 | <div class="jd-tagdata jd-tagdescr"><p>Set the priority of the request. |
| 2608 | |
| 2609 | <p>Use with a priority constant such as <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY">PRIORITY_HIGH_ACCURACY</a></code>. No other values |
| 2610 | are accepted. |
| 2611 | |
| 2612 | <p>The priority of the request is a strong hint to the LocationClient for which location |
| 2613 | sources to use. For example, <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_HIGH_ACCURACY">PRIORITY_HIGH_ACCURACY</a></code> is more likely to use GPS, and |
| 2614 | <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#PRIORITY_BALANCED_POWER_ACCURACY">PRIORITY_BALANCED_POWER_ACCURACY</a></code> is more likely to use WIFI & Cell tower |
| 2615 | positioning, but it also depends on many other factors (such as which sources are available) |
| 2616 | and is implementation dependent. |
| 2617 | |
| 2618 | <p><code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setPriority(int)">setPriority(int)</a></code> and <code><a href="/reference/com/google/android/gms/location/LocationRequest.html#setInterval(long)">setInterval(long)</a></code> are the most important parameters |
| 2619 | on a location request.</p></div> |
| 2620 | <div class="jd-tagdata"> |
| 2621 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2622 | <table class="jd-tagtable"> |
| 2623 | <tr> |
| 2624 | <th>priority</td> |
| 2625 | <td>an accuracy or power constant</td> |
| 2626 | </tr> |
| 2627 | </table> |
| 2628 | </div> |
| 2629 | <div class="jd-tagdata"> |
| 2630 | <h5 class="jd-tagtitle">Returns</h5> |
| 2631 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2632 | </li></ul> |
| 2633 | </div> |
| 2634 | <div class="jd-tagdata"> |
| 2635 | <h5 class="jd-tagtitle">Throws</h5> |
| 2636 | <table class="jd-tagtable"> |
| 2637 | <tr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2638 | <th>IllegalArgumentException</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2639 | <td>if the quality constant is not valid</td> |
| 2640 | </tr> |
| 2641 | </table> |
| 2642 | </div> |
| 2643 | |
| 2644 | </div> |
| 2645 | </div> |
| 2646 | |
| 2647 | |
| 2648 | <A NAME="setSmallestDisplacement(float)"></A> |
| 2649 | |
| 2650 | <div class="jd-details api apilevel-"> |
| 2651 | <h4 class="jd-details-title"> |
| 2652 | <span class="normal"> |
| 2653 | public |
| 2654 | |
| 2655 | |
| 2656 | |
| 2657 | |
| 2658 | <a href="/reference/com/google/android/gms/location/LocationRequest.html">LocationRequest</a> |
| 2659 | </span> |
| 2660 | <span class="sympad">setSmallestDisplacement</span> |
| 2661 | <span class="normal">(float smallestDisplacementMeters)</span> |
| 2662 | </h4> |
| 2663 | <div class="api-level"> |
| 2664 | <div></div> |
| 2665 | |
| 2666 | |
| 2667 | |
| 2668 | </div> |
| 2669 | <div class="jd-details-descr"> |
| 2670 | |
| 2671 | <div class="jd-tagdata jd-tagdescr"><p>Set the minimum displacement between location updates in meters |
| 2672 | |
| 2673 | <p>By default this is 0.</p></div> |
| 2674 | <div class="jd-tagdata"> |
| 2675 | <h5 class="jd-tagtitle">Parameters</h5> |
| 2676 | <table class="jd-tagtable"> |
| 2677 | <tr> |
| 2678 | <th>smallestDisplacementMeters</td> |
| 2679 | <td>the smallest displacement in meters the user must move |
| 2680 | between location updates.</td> |
| 2681 | </tr> |
| 2682 | </table> |
| 2683 | </div> |
| 2684 | <div class="jd-tagdata"> |
| 2685 | <h5 class="jd-tagtitle">Returns</h5> |
| 2686 | <ul class="nolist"><li>the same object, so that setters can be chained |
| 2687 | </li></ul> |
| 2688 | </div> |
| 2689 | <div class="jd-tagdata"> |
| 2690 | <h5 class="jd-tagtitle">Throws</h5> |
| 2691 | <table class="jd-tagtable"> |
| 2692 | <tr> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2693 | <th>IllegalArgumentException</td> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2694 | <td>if smallestDisplacementMeters is negative</td> |
| 2695 | </tr> |
| 2696 | </table> |
| 2697 | </div> |
| 2698 | |
| 2699 | </div> |
| 2700 | </div> |
| 2701 | |
| 2702 | |
| 2703 | <A NAME="toString()"></A> |
| 2704 | |
| 2705 | <div class="jd-details api apilevel-"> |
| 2706 | <h4 class="jd-details-title"> |
| 2707 | <span class="normal"> |
| 2708 | public |
| 2709 | |
| 2710 | |
| 2711 | |
| 2712 | |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2713 | String |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2714 | </span> |
| 2715 | <span class="sympad">toString</span> |
| 2716 | <span class="normal">()</span> |
| 2717 | </h4> |
| 2718 | <div class="api-level"> |
| 2719 | <div></div> |
| 2720 | |
| 2721 | |
| 2722 | |
| 2723 | </div> |
| 2724 | <div class="jd-details-descr"> |
| 2725 | |
| 2726 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 2727 | |
| 2728 | </div> |
| 2729 | </div> |
| 2730 | |
| 2731 | |
| 2732 | <A NAME="writeToParcel(android.os.Parcel, int)"></A> |
| 2733 | |
| 2734 | <div class="jd-details api apilevel-"> |
| 2735 | <h4 class="jd-details-title"> |
| 2736 | <span class="normal"> |
| 2737 | public |
| 2738 | |
| 2739 | |
| 2740 | |
| 2741 | |
| 2742 | void |
| 2743 | </span> |
| 2744 | <span class="sympad">writeToParcel</span> |
Dirk Dougherty | 78ec732 | 2013-09-16 10:37:40 -0700 | [diff] [blame] | 2745 | <span class="normal">(Parcel parcel, int flags)</span> |
Dirk Dougherty | 4af1bf8 | 2013-05-09 15:04:08 -0700 | [diff] [blame] | 2746 | </h4> |
| 2747 | <div class="api-level"> |
| 2748 | <div></div> |
| 2749 | |
| 2750 | |
| 2751 | |
| 2752 | </div> |
| 2753 | <div class="jd-details-descr"> |
| 2754 | |
| 2755 | <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| 2756 | |
| 2757 | </div> |
| 2758 | </div> |
| 2759 | |
| 2760 | |
| 2761 | |
| 2762 | |
| 2763 | |
| 2764 | <!-- ========= METHOD DETAIL ======== --> |
| 2765 | |
| 2766 | |
| 2767 | |
| 2768 | <!-- ========= END OF CLASS DATA ========= --> |
| 2769 | <A NAME="navbar_top"></A> |
| 2770 | |
| 2771 | <div id="footer" class="wrap" > |
| 2772 | |
| 2773 | |
| 2774 | <div id="copyright"> |
| 2775 | |
| 2776 | Except as noted, this content is licensed under <a |
| 2777 | href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. |
| 2778 | For details and restrictions, see the <a href="/license.html"> |
| 2779 | Content License</a>. |
| 2780 | </div> |
| 2781 | <div id="build_info"> |
| 2782 | |
| 2783 | <script src="/timestamp.js" type="text/javascript"></script> |
| 2784 | <script>document.write(BUILD_TIMESTAMP)</script> |
| 2785 | |
| 2786 | </div> |
| 2787 | |
| 2788 | |
| 2789 | <div id="footerlinks"> |
| 2790 | |
| 2791 | <p> |
| 2792 | <a href="/about/index.html">About Android</a> | |
| 2793 | <a href="/legal.html">Legal</a> | |
| 2794 | <a href="/support.html">Support</a> |
| 2795 | </p> |
| 2796 | </div> |
| 2797 | |
| 2798 | </div> <!-- end footer --> |
| 2799 | </div> <!-- jd-content --> |
| 2800 | |
| 2801 | </div><!-- end doc-content --> |
| 2802 | |
| 2803 | </div> <!-- end body-content --> |
| 2804 | |
| 2805 | |
| 2806 | |
| 2807 | |
| 2808 | |
| 2809 | |
| 2810 | </body> |
| 2811 | </html> |