Skip to content

Commit

Permalink
docs(android): fix permission example for Android 8 (#11236)
Browse files Browse the repository at this point in the history
  • Loading branch information
m1ga authored and sgtcoolguy committed Oct 15, 2019
1 parent 74d07c1 commit be984a1
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions apidoc/Titanium/Android/Android.yml
Expand Up @@ -5,11 +5,11 @@ description: |
The Android module allows the application to manage various Android components.
#### Drawer Layout
The drawer-layout components acts as a top-level container for window content that allows
for interactive "drawer" views to be pulled out from one or both vertical edges of the window.
It is represented by a `centerView` and optional `leftView` and `rightView` components that
can be swiped in and out with additional configuration and transitions. Learn more about
It is represented by a `centerView` and optional `leftView` and `rightView` components that
can be swiped in and out with additional configuration and transitions. Learn more about
drawer-layouts in it's dedicated <Titanium.UI.Android.DrawerLayout> docs.
#### Action Bar
Expand Down Expand Up @@ -108,10 +108,10 @@ description: |
Starting from Android 6.0 (API level 23), users need to grant certain permissions to apps while the
app is running. You can read it more [here](https://developer.android.com/training/permissions/requesting.html).
In Titanium SDK, to support this, we have the <Titanium.Android.requestPermissions> method. It is used to
In Titanium SDK, to support this, we have the <Titanium.Android.requestPermissions> method. It is used to
request any permission you may need. An example of using it is shown below:
var permissions = [ 'android.permission.CAMERA', 'android.permission.READ_EXTERNAL_STORAGE' ];
var permissions = [ 'android.permission.CAMERA', 'android.permission.READ_EXTERNAL_STORAGE', 'android.permission.WRITE_EXTERNAL_STORAGE' ];
Ti.Android.requestPermissions(permissions, function (e) {
if (e.success) {
Ti.API.info('SUCCESS');
Expand Down Expand Up @@ -225,22 +225,22 @@ methods:
summary: |
The permission to check for access. This can be any of the constants listed here
with dangerous protection level [here](https://developer.android.com/reference/android/Manifest.permission.html).
For example, `android.permission.WRITE_CONTACTS`.
For example, `android.permission.WRITE_CONTACTS`.
Since Titanium 6.1.0, the method will also accept `Array<String>`
type: [String, Array<String>]
returns:
type: Boolean
type: Boolean
since: "5.4.0"

- name: requestPermissions
summary: Request for permission access.
parameters:
- name: permissions
summary: |
The permission(s) to request for access. This can be any of the constants listed here
with dangerous protection level [here](https://developer.android.com/reference/android/Manifest.permission.html).
Normal protection permissions are automatically enabled if they are included in the manifest. An example of a
Normal protection permissions are automatically enabled if they are included in the manifest. An example of a
dangerous protection permission would be `android.permission.WRITE_CONTACTS`.
The requested permission(s) MUST also be included in the Android Manifest.
Expand Down Expand Up @@ -2449,7 +2449,7 @@ properties:
default: Titanium.Android.START_REDELIVER_INTENT
constants: Titanium.Android.START_*

---
---
name: RequestPermissionAccessResult
summary: Argument passed to the callback when a request finishes successfully or erroneously.
extends: ErrorResponse

0 comments on commit be984a1

Please sign in to comment.