Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(android): fix permission example for Android 8 #11236

Merged
merged 3 commits into from
Oct 15, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions apidoc/Titanium/Android/Android.yml
Original file line number Diff line number Diff line change
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 @@ -2386,7 +2386,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