mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Updated docs for next
This commit is contained in:
@@ -17,7 +17,8 @@ enabled by default when you create a project with <code>react-native init</code>
|
||||
'NSLocationAlwaysUsageDescription' key in Info.plist and add location as
|
||||
a background mode in the 'Capabilities' tab in Xcode.</p><h4><a class="anchor" name="android"></a>Android <a class="hash-link" href="docs/geolocation.html#android">#</a></h4><p>To request access to location, you need to add the following line to your
|
||||
app's <code>AndroidManifest.xml</code>:</p><p><code><uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /></code></p><p>Android API >= 18 Positions will also contain a <code>mocked</code> boolean to indicate if position
|
||||
was created from a mock provider.</p></div><span><h3><a class="anchor" name="methods"></a>Methods <a class="hash-link" href="docs/geolocation.html#methods">#</a></h3><div class="props"><div class="prop"><h4 class="methodTitle"><a class="anchor" name="requestauthorization"></a><span class="methodType">static </span>requestAuthorization<span class="methodType">()</span> <a class="hash-link" href="docs/geolocation.html#requestauthorization">#</a></h4><div><p>Request suitable Location permission based on the key configured on pList.
|
||||
was created from a mock provider.</p></div><span><h3><a class="anchor" name="methods"></a>Methods <a class="hash-link" href="docs/geolocation.html#methods">#</a></h3><div class="props"><div class="prop"><h4 class="methodTitle"><a class="anchor" name="setrnconfiguration"></a><span class="methodType">static </span>setRNConfiguration<span class="methodType">(config)</span> <a class="hash-link" href="docs/geolocation.html#setrnconfiguration">#</a></h4><div><p>Sets configuration options that will be used in all location requests.</p><h3><a class="anchor" name="options"></a>Options <a class="hash-link" href="docs/geolocation.html#options">#</a></h3><h4><a class="anchor" name="ios"></a>iOS <a class="hash-link" href="docs/geolocation.html#ios">#</a></h4><ul><li><code>skipPermissionRequests</code> - defaults to <code>false</code>, if <code>true</code> you must request permissions
|
||||
before using Geolocation APIs.</li></ul></div></div><div class="prop"><h4 class="methodTitle"><a class="anchor" name="requestauthorization"></a><span class="methodType">static </span>requestAuthorization<span class="methodType">()</span> <a class="hash-link" href="docs/geolocation.html#requestauthorization">#</a></h4><div><p>Request suitable Location permission based on the key configured on pList.
|
||||
If NSLocationAlwaysUsageDescription is set, it will request Always authorization,
|
||||
although if NSLocationWhenInUseUsageDescription is set, it will request InUse
|
||||
authorization.</p></div></div><div class="prop"><h4 class="methodTitle"><a class="anchor" name="getcurrentposition"></a><span class="methodType">static </span>getCurrentPosition<span class="methodType">(geo_success, geo_error?, geo_options?)</span> <a class="hash-link" href="docs/geolocation.html#getcurrentposition">#</a></h4><div><p>Invokes the success callback once with the latest location info. Supported
|
||||
|
||||
Reference in New Issue
Block a user