diff --git a/.gitignore b/.gitignore index 764dc889526..c98021b946d 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,12 @@ pnpm-lock.yaml docs/.vuepress/dist #VSCode -.vscode \ No newline at end of file +.vscode + +docs/api/ +docs/.vitepress/sidebar.mjs +docs/.vitepress/dist/ +docs/.vitepress/.temp/ +docs/.vitepress/cache/ +docs/public/images/ +modules-cache/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 4f955b64085..00000000000 --- a/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM node:16-alpine - -WORKDIR /app -COPY . /app - -RUN npm install \ - && npm run docs:build - -ENV NODE_ENV production -CMD [ "node", "server.js" ] diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 53d216f18b0..00000000000 --- a/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018-Present Axway Appcelerator - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/README.md b/README.md deleted file mode 100644 index 4a847e6f215..00000000000 --- a/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# titanium-docs - -> Website with Guides and API docs for the [Titanium SDK](https://github.com/tidev/titanium_mobile) (Powered by [VuePress](https://vuepress.vuejs.org/)). - -## Getting started - -These docs aim to be a hybrid solution of Markdown bases guides and dynamically generated docs for API references using the existing [apidoc](https://github.com/tidev/titanium-sdk/tree/main/apidoc) from Titanium. - -### Installation - -```bash -git clone https://github.com/tidev/titanium-docs.git -cd titanium-docs -npm i -``` - -### Development - -VuePress supports a dev mode with hot reloading for a convenient developing experience. - -```bash -npm run docs:dev -``` - -Now start editing the docs and you can immediatly see the results in your browser. - -### Building the docs - -There are currently a few manual steps required to build the docs which we aim to consolidate into a single build step while this project moves foreward. - -> ✅ For convenience the repo currently contains a pre-generate `api.json` so you can skip this if you just want to play with the new docs. - -The following steps assume you have checked out this repo parallel to Titanium so that your folder structure looks like this: - -``` -./ -├── titanium_mobile/ -└── titanium-docs/ -``` - -Now generate the `api.json` into the `docs/api` folder - -```bash -npm run docs:metadata -``` - -Finally, let VuePress build the awesome new docs. - -```bash -cd ../titanium-docs -npm run docs:build -``` - -This will output the statically rendered docs into `docs/.vuepress/dist`. - -## Versioning - -Run the script with a command line argument of the version you wish to create. e.g., - -```bash -npm run docs:version 8.0 -``` - -This will preserve all documents currently in the `docs` directory and make them available as documentation for version `8.0`. - -For more info please refer to the [versioning guide](https://titanium-docs-devkit.netlify.com/guide/versioning.html). - -## Migrating docs to VuePress - -[VuePress](https://vuepress.vuejs.org/) renders gorgeously looking documentation directly from markdown files. This means that our currents guides and parts of the api docs have to be migrated to markdown files. Thanks to VuePress they can be enhanced with Vue components to bypass the restriction of markdown in terms of rendering complex HTML structures. - -### Writing guides in VuePress - -Guides reside under `docs/guide` and a few documents already have been ported as examples. However none of those guides are complete yet. - -To add a new guide first create a new markdown file under `docs/guide`. To add it to the sidebar navigation open `docs/.vuepress/config.js` and edit the `/guide/` section under `themeConfig.sidebar`. The key you want to add is the name of the new markdown file without the `.md` extension. - -```js -module.exports = { - themeConfig: { - sidebar: { - '/guide/': [ - { - title: 'Titanium Guides', - collapsable: false, - children: [ - '', - 'getting-started', - 'first-app' - 'my-new-guide' - ] - } - ], - // ... - } - } -} -``` - -### Adding API docs - -In theory the `api.json` contains all required information to automatically generate markdown files. However, some APIs contain very detailed description and various examples which are just better to maintain directly in markdown files here than in their `.yaml` counterpart in Titanium's [apidoc](https://github.com/tidev/titanium-sdk/tree/main/apidoc). All other information regarding the API for a type in Titanium is then taken from the `api.json`. This creates a clear seperation of extensive documentation and simple api reference. - -To automatically migrate a type over to these docs you can run the migration script. - -```bash -node scripts/migrate.js -``` - -This will parse `docs/api/api.json` and generate the missing markdown files. - -You may need to adjust the automatically generated content and fix any markdown issues or adjust the front matter section to properly display links throughout the docs. - -Apart of the [predefined variables](https://vuepress.vuejs.org/guide/frontmatter.html#predefined-variables) from VuePress, API pages support the following additional variables: - -| Name | Descriptions | -| --- | --- | -| `metadataKey` | Fully qualified type name which is used to find metadata for a type in `api.json`. The page title will be used if this is not set. | - -Once you have made sure the automatically generated markdown is correct you can add the new type to the sidebar in `docs/.vuepress/config.js` under the `/api/` key. - -## Deploy - -One time: - - git remote add dokku dokku@titaniumsdk.com:titaniumsdk.com - -Then to release: - - git push dokku main - -## Contributions - -Open source contributions are greatly appreciated! If you have a bugfix, improvement or new feature, first make sure you have signed the [TiDev CLA](https://github.com/tidev/organization-docs/blob/main/AUTHORIZED_CONTRIBUTORS.md), then create -[an issue](https://github.com/tidev/titanium-docs/issues/new) first and submit a [pull request](https://github.com/tidev/titanium-docs/pulls/new) against master. - -## Legal - -Titanium is a registered trademark of TiDev Inc. All Titanium trademark and patent rights were transferred and assigned to TiDev Inc. on 04/07/2022. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at https://tidev.io/legal. - -## License - -Titanium is licensed under the OSI approved Apache Public License (Version 2). All trademark rights were assigned to TiDev, Inc. on 04/07/2022 from Axway, Inc. Please see the LICENSE file for more details. diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js new file mode 100644 index 00000000000..9ca561cc09c --- /dev/null +++ b/docs/.vitepress/config.js @@ -0,0 +1,42 @@ +import { defineConfig } from 'vitepress'; +import sidebar from './sidebar.mjs'; + +export default defineConfig({ + title: 'Titanium SDK', + description: 'Titanium SDK API Reference', + base: process.env.BASE || '/', + lastUpdated: true, + cleanUrls: true, + + markdown: { + html: true, + }, + + ignoreDeadLinks: true, + + themeConfig: { + outline: [2, 3], + + nav: [ + { text: 'Home', link: '/' }, + { text: 'API Reference', link: '/api/titanium/' }, + ], + + sidebar: { + '/api/': sidebar, + }, + + search: { + provider: 'local', + }, + + socialLinks: [ + { icon: 'github', link: 'https://github.com/tidev/titanium-sdk' }, + ], + + footer: { + message: 'Titanium SDK Documentation', + copyright: 'Copyright © TiDev, Inc.', + }, + }, +}); diff --git a/docs/.vitepress/theme/components/ApiEvents.vue b/docs/.vitepress/theme/components/ApiEvents.vue new file mode 100644 index 00000000000..9460c3ae290 --- /dev/null +++ b/docs/.vitepress/theme/components/ApiEvents.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/docs/.vitepress/theme/components/ApiExamples.vue b/docs/.vitepress/theme/components/ApiExamples.vue new file mode 100644 index 00000000000..ae39cbf3ca3 --- /dev/null +++ b/docs/.vitepress/theme/components/ApiExamples.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/docs/.vitepress/theme/components/ApiMethods.vue b/docs/.vitepress/theme/components/ApiMethods.vue new file mode 100644 index 00000000000..9fe3584d925 --- /dev/null +++ b/docs/.vitepress/theme/components/ApiMethods.vue @@ -0,0 +1,71 @@ + + + + + diff --git a/docs/.vitepress/theme/components/ApiProperties.vue b/docs/.vitepress/theme/components/ApiProperties.vue new file mode 100644 index 00000000000..722f29df554 --- /dev/null +++ b/docs/.vitepress/theme/components/ApiProperties.vue @@ -0,0 +1,72 @@ + + + + + diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css new file mode 100644 index 00000000000..c4d53822f55 --- /dev/null +++ b/docs/.vitepress/theme/custom.css @@ -0,0 +1,13 @@ +:root { + --vp-content-max-width: 960px; + --vp-layout-max-width: 1560px; +} + +.VPDoc .content-container { + padding-left: 20px !important; + padding-right: 20px !important; +} + +.VPDoc.has-aside .content-container { + max-width: none !important; +} diff --git a/docs/.vitepress/theme/index.js b/docs/.vitepress/theme/index.js new file mode 100644 index 00000000000..0e7b187b8b7 --- /dev/null +++ b/docs/.vitepress/theme/index.js @@ -0,0 +1,16 @@ +import DefaultTheme from 'vitepress/theme'; +import './custom.css'; +import ApiProperties from './components/ApiProperties.vue'; +import ApiMethods from './components/ApiMethods.vue'; +import ApiEvents from './components/ApiEvents.vue'; +import ApiExamples from './components/ApiExamples.vue'; + +export default { + extends: DefaultTheme, + enhanceApp({ app }) { + app.component('ApiProperties', ApiProperties); + app.component('ApiMethods', ApiMethods); + app.component('ApiEvents', ApiEvents); + app.component('ApiExamples', ApiExamples); + }, +}; diff --git a/docs/.vuepress/api.json b/docs/.vuepress/api.json deleted file mode 100644 index b84f41c7433..00000000000 --- a/docs/.vuepress/api.json +++ /dev/null @@ -1,528 +0,0 @@ -[ - { - "title": "Globals", - "children": [ - ["global", "global"], - ["global/console", "console"], - { - "title": "Intl", - "path": "/api/global/intl", - "children": [ - ["global/intl/collator", "Intl.Collator"], - ["global/intl/datetimeformat", "Intl.DateTimeFormat"], - ["global/intl/numberformat", "Intl.NumberFormat"] - ] - }, - ["global/string", "String"] - ] - }, - { - "title": "Node.js", - "children": [ - { - "title": "Assertion testing", - "path": "/api/structs/assert" - }, - { - "title": "Buffer", - "path": "/api/structs/buffer", - "children": [["/api/structs/buffer/buffer", "Buffer"]] - }, - { - "title": "Events", - "path": "/api/structs/events", - "children": [["/api/structs/eventemitter", "EventEmitter"]] - }, - { - "title": "File System", - "path": "/api/structs/fs", - "children": [ - ["/api/structs/fs/constants", "constants"], - ["/api/structs/fs/stats", "Stats"], - ["/api/structs/fs/readstream", "ReadStream"], - ["/api/structs/fs/writestream", "WriteStream"] - ] - }, - { - "title": "OS", - "path": "/api/structs/os", - "children": [["/api/structs/os/constants", "constants"]] - }, - { - "title": "Path", - "path": "/api/structs/path" - }, - { - "title": "Process", - "path": "/api/structs/process" - }, - { - "title": "String Decoder", - "path": "/api/structs/string_decoder" - }, - { - "title": "Utilities", - "path": "/api/structs/util", - "children": [["/api/structs/util/types", "types"]] - } - ] - }, - { - "title": "Titanium", - "path": "/api/titanium", - "children": [ - ["titanium/accelerometer", "Accelerometer"], - { - "title": "Android", - "path": "/api/titanium/android", - "children": [ - ["titanium/android/actionbar", "ActionBar"], - ["titanium/android/activity", "Activity"], - ["titanium/android/bigpicturestyle", "BigPictureStyle"], - ["titanium/android/bigtextstyle", "BigTextStyle"], - ["titanium/android/broadcastreceiver", "BroadcastReceiver"], - ["titanium/android/intent", "Intent"], - ["titanium/android/menu", "Menu"], - ["titanium/android/menuitem", "MenuItem"], - ["titanium/android/notification", "Notification"], - ["titanium/android/notificationchannel", "NotificationChannel"], - ["titanium/android/notificationmanager", "NotificationManager"], - ["titanium/android/pendingintent", "PendingIntent"], - ["titanium/android/quicksettingsservice", "QuickSettingsService"], - ["titanium/android/r", "R"], - ["titanium/android/remoteviews", "RemoteViews"], - ["titanium/android/service", "Service"] - ] - }, - ["titanium/api", "API"], - { - "title": "App", - "path": "/api/titanium/app", - "children": [ - ["titanium/app/android", "Android"], - { - "title": "iOS", - "path": "/api/titanium/app/ios", - "children": [ - ["titanium/app/ios/backgroundservice", "BackgroundService"], - ["titanium/app/ios/localnotification", "LocalNotification"], - ["titanium/app/ios/searchableindex", "SearchableIndex"], - ["titanium/app/ios/searchableitem", "SearchableItem"], - ["titanium/app/ios/searchableitemattributeset", "SearchableItemAttributeSet"], - ["titanium/app/ios/searchquery", "SearchQuery"], - ["titanium/app/ios/useractivity", "UserActivity"], - ["titanium/app/ios/userdefaults", "UserDefaults"], - ["titanium/app/ios/usernotificationaction", "UserNotificationAction"], - ["titanium/app/ios/usernotificationcategory", "UserNotificationCategory"], - ["titanium/app/ios/usernotificationcenter", "UserNotificationCenter"] - ] - }, - ["titanium/app/properties", "Properties"] - ] - }, - ["titanium/blob", "Blob"], - ["titanium/blobstream", "BlobStream"], - ["titanium/buffer", "Buffer"], - ["titanium/bufferstream", "BufferStream"], - { - "title": "Calendar", - "path": "/api/titanium/calendar", - "children": [ - ["titanium/calendar/alert", "Alert"], - ["titanium/calendar/attendee", "Attendee"], - ["titanium/calendar/calendar", "Calendar"], - ["titanium/calendar/event", "Event"], - ["titanium/calendar/recurrencerule", "RecurrenceRule"], - ["titanium/calendar/reminder", "Reminder"] - ] - }, - ["titanium/codec", "Codec"], - { - "title": "Contacts", - "path": "/api/titanium/contacts", - "children": [ - ["titanium/contacts/group", "Group"], - ["titanium/contacts/person", "Person"] - ] - }, - { - "title": "Database", - "path": "/api/titanium/database", - "children": [ - ["titanium/database/db", "DB"], - ["titanium/database/resultset", "ResultSet"] - ] - }, - { - "title": "Filesystem", - "path": "/api/titanium/filesystem", - "children": [ - ["titanium/filesystem/file", "File"], - ["titanium/filesystem/filestream", "FileStream"] - ] - }, - { - "title": "Geolocation", - "path": "/api/titanium/geolocation", - "children": [ - { - "title": "Android", - "path": "/api/titanium/geolocation/android", - "children": [ - ["titanium/geolocation/android/locationprovider", "LocationProvider"], - ["titanium/geolocation/android/locationrule", "LocationRule"] - ] - } - ] - }, - ["titanium/gesture", "Gesture"], - ["titanium/iostream", "IOStream"], - ["titanium/locale", "Locale"], - { - "title": "Media", - "path": "/api/titanium/media", - "children": [ - ["titanium/media/android", "Android"], - ["titanium/media/audioplayer", "AudioPlayer"], - ["titanium/media/audiorecorder", "AudioRecorder"], - ["titanium/media/item", "Item"], - ["titanium/media/musicplayer", "MusicPlayer"], - ["titanium/media/sound", "Sound"], - ["titanium/media/systemalert", "SystemAlert"], - ["titanium/media/videoplayer", "VideoPlayer"] - ] - }, - ["titanium/module", "Module"], - { - "title": "Network", - "path": "/api/titanium/network", - "children": [ - ["titanium/network/bonjourbrowser", "BonjourBrowser"], - ["titanium/network/bonjourservice", "BonjourService"], - ["titanium/network/cookie", "Cookie"], - ["titanium/network/httpclient", "HTTPClient"], - { - "title": "Socket", - "path": "/api/titanium/network/socket", - "children": [ - ["titanium/network/socket/tcp", "TCP"] - ] - }, - ["titanium/network/tcpsocket", "TCPSocket"] - ] - }, - { - "title": "Platform", - "path": "/api/titanium/platform", - "children": [ - ["titanium/platform/android", "Android"], - ["titanium/platform/displaycaps", "DisplayCaps"] - ] - }, - ["titanium/proxy", "Proxy"], - ["titanium/stream", "Stream"], - { - "title": "UI", - "path": "/api/titanium/ui", - "children": [ - ["titanium/ui/activityindicator", "ActivityIndicator"], - ["titanium/ui/activityindicatorstyle", "ActivityIndicatorStyle"], - ["titanium/ui/alertdialog", "AlertDialog"], - { - "title": "Android", - "path": "/api/titanium/ui/android", - "children": [ - ["titanium/ui/android/cardview", "CardView"], - ["titanium/ui/android/collapsetoolbar", "CollapseToolbar"], - ["titanium/ui/android/drawerlayout", "DrawerLayout"], - ["titanium/ui/android/floatingactionbutton", "FloatingActionButton"], - ["titanium/ui/android/progressindicator", "ProgressIndicator"], - ["titanium/ui/android/searchview", "SearchView"], - ["titanium/ui/android/snackbar", "Snackbar"] - ] - }, - ["titanium/ui/animation", "Animation"], - ["titanium/ui/attributedstring", "AttributedString"], - ["titanium/ui/button", "Button"], - ["titanium/ui/buttonbar", "ButtonBar"], - ["titanium/ui/clipboard", "Clipboard"], - ["titanium/ui/color", "Color"], - ["titanium/ui/dashboarditem", "DashboardItem"], - ["titanium/ui/dashboardview", "DashboardView"], - ["titanium/ui/emaildialog", "EmailDialog"], - ["titanium/ui/imageview", "ImageView"], - { - "title": "iOS", - "path": "/api/titanium/ui/ios", - "children": [ - ["titanium/ui/ios/alertdialogstyle", "AlertDialogStyle"], - ["titanium/ui/ios/anchorattachmentbehavior", "AnchorAttachmentBehavior"], - ["titanium/ui/ios/animationstyle", "AnimationStyle"], - ["titanium/ui/ios/animator", "Animator"], - ["titanium/ui/ios/applicationshortcuts", "ApplicationShortcuts"], - ["titanium/ui/ios/blurview", "BlurView"], - ["titanium/ui/ios/buttonconfiguration", "ButtonConfiguration"], - ["titanium/ui/ios/collisionbehavior", "CollisionBehavior"], - ["titanium/ui/ios/coverflowview", "CoverFlowView"], - ["titanium/ui/ios/documentviewer", "DocumentViewer"], - ["titanium/ui/ios/dynamicitembehavior", "DynamicItemBehavior"], - ["titanium/ui/ios/feedbackgenerator", "FeedbackGenerator"], - ["titanium/ui/ios/gravitybehavior", "GravityBehavior"], - ["titanium/ui/ios/listviewcellselectionstyle", "ListViewCellSelectionStyle"], - ["titanium/ui/ios/listviewscrollposition", "ListViewScrollPosition"], - ["titanium/ui/ios/listviewstyle", "ListViewStyle"], - ["titanium/ui/ios/livephoto", "LivePhoto"], - ["titanium/ui/ios/livephotoview", "LivePhotoView"], - ["titanium/ui/ios/menupopup", "MenuPopup"], - ["titanium/ui/ios/navigationwindow", "NavigationWindow"], - ["titanium/ui/ios/previewaction", "PreviewAction"], - ["titanium/ui/ios/previewactiongroup", "PreviewActionGroup"], - ["titanium/ui/ios/previewcontext", "PreviewContext"], - ["titanium/ui/ios/progressbarstyle", "ProgressBarStyle"], - ["titanium/ui/ios/pushbehavior", "PushBehavior"], - ["titanium/ui/ios/rowanimationstyle", "RowAnimationStyle"], - ["titanium/ui/ios/scrollindicatorstyle", "ScrollIndicatorStyle"], - ["titanium/ui/ios/snapbehavior", "SnapBehavior"], - ["titanium/ui/ios/splitwindow", "SplitWindow"], - ["titanium/ui/ios/statusbar", "StatusBar"], - ["titanium/ui/ios/stepper", "Stepper"], - ["titanium/ui/ios/systembutton", "SystemButton"], - ["titanium/ui/ios/systemicon", "SystemIcon"], - ["titanium/ui/ios/tabbedbar", "TabbedBar"], - ["titanium/ui/ios/tableviewcellselectionstyle", "TableViewCellSelectionStyle"], - ["titanium/ui/ios/tableviewscrollposition", "TableViewScrollPosition"], - ["titanium/ui/ios/tableviewstyle", "TableViewStyle"], - ["titanium/ui/ios/toolbar", "Toolbar"], - ["titanium/ui/ios/viewattachmentbehavior", "ViewAttachmentBehavior"] - ] - }, - { - "title": "iPad", - "path": "/api/titanium/ui/ipad", - "children": [["titanium/ui/ipad/popover", "Popover"]] - }, - ["titanium/ui/label", "Label"], - ["titanium/ui/listitem", "ListItem"], - ["titanium/ui/listsection", "ListSection"], - ["titanium/ui/listview", "ListView"], - ["titanium/ui/maskedimage", "MaskedImage"], - ["titanium/ui/matrix2d", "Matrix2D"], - ["titanium/ui/matrix3d", "Matrix3D"], - ["titanium/ui/navigationwindow", "NavigationWindow"], - ["titanium/ui/notification", "Notification"], - ["titanium/ui/optionbar", "OptionBar"], - ["titanium/ui/optiondialog", "OptionDialog"], - ["titanium/ui/picker", "Picker"], - ["titanium/ui/pickercolumn", "PickerColumn"], - ["titanium/ui/pickerrow", "PickerRow"], - ["titanium/ui/progressbar", "ProgressBar"], - ["titanium/ui/refreshcontrol", "RefreshControl "], - ["titanium/ui/scrollableview", "ScrollableView"], - ["titanium/ui/scrollview", "ScrollView"], - ["titanium/ui/searchbar", "SearchBar"], - ["titanium/ui/shortcut", "Shortcut"], - ["titanium/ui/shortcutitem", "ShortcutItem"], - ["titanium/ui/slider", "Slider"], - ["titanium/ui/switch", "Switch"], - ["titanium/ui/tab", "Tab"], - ["titanium/ui/tabbedbar", "TabbedBar"], - ["titanium/ui/tabgroup", "TabGroup"], - ["titanium/ui/tableview", "TableView"], - ["titanium/ui/tableviewrow", "TableViewRow"], - ["titanium/ui/tableviewsection", "TableViewSection"], - ["titanium/ui/textarea", "TextArea"], - ["titanium/ui/textfield", "TextField"], - ["titanium/ui/toolbar", "Toolbar"], - ["titanium/ui/view", "View"], - ["titanium/ui/webview", "WebView"], - ["titanium/ui/window", "Window"] - ] - }, - ["titanium/utils", "Utils"], - ["titanium/watchsession", "WatchSession"], - { - "title": "XML", - "path": "/api/titanium/xml", - "children": [ - ["titanium/xml/attr", "Attr"], - ["titanium/xml/cdatasection", "CDataSection"], - ["titanium/xml/characterdata", "CharacterData"], - ["titanium/xml/comment", "Comment"], - ["titanium/xml/document", "Document"], - ["titanium/xml/documentfragment", "DocumentFragment"], - ["titanium/xml/documenttype", "DocumentType"], - ["titanium/xml/domimplementation", "DOMImplementation"], - ["titanium/xml/element", "Element"], - ["titanium/xml/entity", "Entity"], - ["titanium/xml/entityreference", "EntityReference"], - ["titanium/xml/namednodemap", "NamedNodeMap"], - ["titanium/xml/node", "Node"], - ["titanium/xml/nodelist", "NodeList"], - ["titanium/xml/notation", "Notation"], - ["titanium/xml/processinginstruction", "ProcessingInstruction"], - ["titanium/xml/text", "Text"] - ] - } - ] - }, - { - "title": "Modules", - "children": [ - ["modules/barcode", "Barcode"], - { - "title": "Bluetooth", - "path": "/api/modules/bluetooth", - "children": [ - ["modules/bluetooth/bluetoothdevice", "Device"], - ["modules/bluetooth/bluetoothserversocket", "Server Socket"], - ["modules/bluetooth/bluetoothsocket", "Socket"] - ] - }, - { - "title": "Bluetooth Low Energy", - "path": "/api/modules/ble", - "children": [ - ["modules/ble/beacon", "Beacon"], - ["modules/ble/beaconidentityconstraint", "Beacon Identity Constraint"], - ["modules/ble/beaconregion", "Beacon Region"], - ["modules/ble/central", "Central"], - ["modules/ble/centralmanager", "Central Manager"], - ["modules/ble/characteristic", "Characteristic"], - ["modules/ble/descriptorrequest", "Descriptor Request"], - ["modules/ble/l2capchannel", "L2CAPChannel"], - ["modules/ble/mutablecharacteristic", "Mutable Characteristic"], - ["modules/ble/peer", "Peer"], - ["modules/ble/peripheral", "Peripheral"], - ["modules/ble/peripheralmanager", "Peripheral Manager"], - ["modules/ble/regionmanager", "Region Manager"], - ["modules/ble/request", "Request"], - ["modules/ble/service", "Service"] - ] - }, - { - "title": "Crypto", - "path": "/api/modules/crypto", - "children": [["modules/crypto/cryptor", "Cryptor"]] - }, - ["modules/encrypteddatabase", "Encrypted Database"], - { - "title": "Facebook", - "path": "/api/modules/facebook", - "children": [["modules/facebook/loginbutton", "LoginButton"]] - }, - { - "title": "Geofencing", - "path": "/api/modules/geofence", - "children": [["modules/geofence/region", "Region"]] - }, - ["modules/https", "HTTPS Cert Pinning"], - { - "title": "Identity", - "path": "/api/modules/identity", - "children": [["modules/identity/keychainitem", "KeychainItem"]] - }, - { - "title": "Map", - "path": "/api/modules/map", - "children": [ - ["modules/map/annotation", "Annotation"], - ["modules/map/camera", "Camera"], - ["modules/map/circle", "Circle"], - ["modules/map/imageoverlay", "ImageOverlay"], - ["modules/map/polygon", "Polygon"], - ["modules/map/polyline", "Polyline"], - ["modules/map/route", "Route"], - ["modules/map/snapshotter", "Snapshotter"], - ["modules/map/streetviewpanorama", "StreetViewPanorama"], - ["modules/map/view", "View"] - ] - }, - { - "title": "NFC", - "path": "/api/modules/nfc", - "children": [ - ["modules/nfc/ndefmessage", "NDEF Message"], - { - "title": "NDEF Record", - "path": "/api/modules/nfc/ndefrecord", - "children": [ - ["modules/nfc/ndefrecordapplication", "Application"], - ["modules/nfc/ndefrecordempty", "Empty"], - ["modules/nfc/ndefrecordexternal", "External"], - ["modules/nfc/ndefrecordmedia", "Media"], - ["modules/nfc/ndefrecordsmartposter", "Smart Poster"], - ["modules/nfc/ndefrecordtext", "Text"], - ["modules/nfc/ndefrecordunknown", "Unknown"], - ["modules/nfc/ndefrecorduri", "URI"] - ] - }, - ["modules/nfc/nfcforegrounddispatchfilter", "Foreground Dispatch filter"], - { - "title": "NFC Tag", - "path": "/api/modules/nfc/nfctag", - "children": [ - { - "title": "Technology", - "path": "/api/modules/nfc/tagtechnology", - "children": [ - ["modules/nfc/tagtechnologyisodep", "ISO-DEP"], - ["modules/nfc/tagtechnologymifareclassic", "MIFARE Classic"], - ["modules/nfc/tagtechnologymifareultralight", "MIFARE Ultralight"], - ["modules/nfc/tagtechnologyndef", "NDEF"], - ["modules/nfc/tagtechnologyndefformatable", "NDEF format"], - ["modules/nfc/tagtechnologynfca", "NFC-A"], - ["modules/nfc/tagtechnologynfcb", "NFC-B"], - ["modules/nfc/tagtechnologynfcf", "NFC-F"], - ["modules/nfc/tagtechnologynfcv", "NFC-V"] - ] - } - ] - } - ] - }, - { - "title": "Web Dialog", - "path": "/api/modules/webdialog", - "children": [["modules/webdialog/authenticationsession", "AuthenticationSession"]] - }, - { - "title": "Android", - "children": [ - ["modules/playservices", "Google Play Services"] - ] - }, - { - "title": "iOS", - "children": [ - { - "title": "Apple Sign-in", - "path": "/api/modules/applesignin", - "children": [["modules/applesignin/loginbutton", "LoginButton"]] - }, - { - "title": "CoreMotion", - "path": "/api/modules/coremotion", - "children": [ - ["modules/coremotion/accelerometer", "Accelerometer"], - ["modules/coremotion/altimeter", "Altimeter"], - ["modules/coremotion/devicemotion", "DeviceMotion"], - ["modules/coremotion/gyroscope", "Gyroscope"], - ["modules/coremotion/magnetometer", "Megnetometer"], - ["modules/coremotion/motionactivity", "MotionActivity"], - ["modules/coremotion/pedometer", "Pedometer"], - ["modules/coremotion/stepcounter", "StepCounter"] - ] - }, - { - "title": "URLSession", - "path": "/api/modules/urlsession", - "children": [ - ["modules/urlsession/session", "Session"], - ["modules/urlsession/sessionconfiguration", "SessionConfiguration"] - ] - } - ] - } - ] - } -] diff --git a/docs/.vuepress/components/LandingPage.vue b/docs/.vuepress/components/LandingPage.vue deleted file mode 100644 index 50d287a6c51..00000000000 --- a/docs/.vuepress/components/LandingPage.vue +++ /dev/null @@ -1,121 +0,0 @@ - - - - - \ No newline at end of file diff --git a/docs/.vuepress/components/ModuleGroups.vue b/docs/.vuepress/components/ModuleGroups.vue deleted file mode 100644 index 85975363793..00000000000 --- a/docs/.vuepress/components/ModuleGroups.vue +++ /dev/null @@ -1,197 +0,0 @@ - - - diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js deleted file mode 100644 index 3a081656291..00000000000 --- a/docs/.vuepress/config.js +++ /dev/null @@ -1,171 +0,0 @@ - -const path = require('path'); - -const guideSidebar = require('./guide'); -const apiSidebar = { - '/api/': require('./api') -}; -const sidebar = Object.assign({}, guideSidebar, apiSidebar); - -const docSections = [ - { text: 'Titanium SDK', link: '/guide/Titanium_SDK/' }, - { text: 'Alloy', link: '/guide/Alloy_Framework/' }, - { text: 'Editor / IDE', link: '/guide/Editor_IDE/' }, - { text: 'FAQ', link: '/guide/Titanium_SDK/Titanium_SDK_FAQ.html' } -]; - -module.exports = { - base: '/', - title: 'Titanium SDK', - description: 'Native iOS and Android Apps with JavaScript', - head: [ - ['link', { rel: 'icon', href: '/favicon.ico' }], - ['meta', { name: 'viewport', content: 'width=device-width, initial-scale=1.0' } ] - ], - theme: 'titanium', - themeConfig: { - logo: '/images/icons/icon-titanium-red.svg', - footerCopyright: `Copyright © ${new Date().getFullYear()} TiDev`, - footerLogo: '/images/tidev-logo-inverted.png', - footerLogoLink: 'https://tidev.io', - footerSitemap: { - 'Docs': docSections, - 'Social': [ - // { text: 'Blog', link: 'https://appcelerator.com/blog' }, - { text: 'Slack', link: 'https://tidev.slack.com' }, - { text: 'Bluesky', link: 'https://bsky.app/profile/titaniumsdk.com' }, - { text: 'X', link: 'https://x.com/TitaniumSDK' } - ] - }, - // Top navigation bar - nav: [ - { text: 'Downloads', link: 'https://downloads.titaniumsdk.com' }, - { - text: 'Guide', - items: docSections - }, - { text: 'API Reference', link: '/api/' }, - { text: 'Native Modules', link: 'https://modules.titaniumsdk.com/' }, - { - text: 'Ecosystem', - items: [ - { - text: 'Help', - items: [ - { - text: 'Slack', - link: 'https://tidev.slack.com' - }, - { - text: 'GitHub Discussions', - link: 'https://github.com/tidev/titanium-sdk/discussions' - }, - { - text: 'Reddit', - link: 'https://www.reddit.com/r/TitaniumSDK/' - }, - { - text: 'Tutorials: From zero to app', - link: 'https://fromzerotoapp.com' - } - ] - }, - { - text: 'Contribute', - items: [ - { - text: 'Contribution Guide', - link: '/contribute.md' - }, - { - text: 'TDoc Specificiation', - link: '/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/TDoc_Specification' - } - ] - }, - { - text: 'Frameworks', - items: [ - { - text: 'Alloy', - link: '/guide/Alloy_Framework/' - }, - { - text: 'Vue.js', - link: 'https://github.com/tidev/titanium-vue' - }, - { - text: 'Angular', - link: '/guide/Titanium_SDK/Titanium_SDK_Guide/Titanium_and_Angular/' - } - ] - }, - { - text: 'News', - items: [ - { - text: 'Blog', - link: 'https://tidev.io/blog' - }, - { - text: 'Bluesky - @titaniumsdk.com', - link: 'https://bsky.app/profile/titaniumsdk.com' - }, - { - text: 'X - @TitaniumSDK', - link: 'https://x.com/TitaniumSDK' - } - ] - }, - { - text: 'TiDev', - items: [ - { - text: 'Foundation', - link: 'https://tidev.io' - }, - { - text: 'X - @tidevio', - link: 'https://x.com/tidevio' - }, - { - text: 'GitHub Sponsors', - link: 'https://github.com/sponsors/tidev/' - }, - { - text: 'Liberapay Donations', - link: 'https://en.liberapay.com/tidev' - } - ] - } - ] - } - ], - - sidebar, - sidebarDepth: 5, - - // Repo settings - docsDir: 'docs', - repo: 'tidev/titanium-sdk', - docsRepo: 'tidev/titanium-docs', - docsBranch: 'main', - editLinks: true, - editLinkText: 'Edit this page on GitHub' - }, - plugins: [ - 'versioning', - 'apidocs', - '@vuepress/back-to-top', - ['@silvanite/tailwind', { - purgecss: { enabled: false } - }], - '@titanium-sdk/fontawesome', - require('./plugins/guides-content-sidebar'), // Show right-hand sidebar for in-page headers in guides - require('./plugins/purgecss'), - // process.env.NODE_ENV === 'production' && ['@vuepress/plugin-google-analytics', { ga: 'G-455PF3Q982' }] - ], - chainWebpack(config) { - config.resolve.alias.set('@components', path.resolve(__dirname, 'local-components')); - } -} diff --git a/docs/.vuepress/fa-icons.js b/docs/.vuepress/fa-icons.js deleted file mode 100644 index d0109bf2506..00000000000 --- a/docs/.vuepress/fa-icons.js +++ /dev/null @@ -1,91 +0,0 @@ -import { library } from '@fortawesome/fontawesome-svg-core' -import { - faAlignJustify, - faAlignLeft, - faAt, - faAtom, - faBarcode, - faBell, - faCalendarWeek, - faCamera, - faCarCrash, - faCog, - faCommentDots, - faCheckSquare, - faDatabase, - faEnvelope, - faExpand, - faExpandAlt, - faFileAlt, - faFilm, - faGlobeAmericas, - faHdd, - faImage, - faLanguage, - faLayerGroup, - faMapMarkerAlt, - faMemory, - faMobileAlt, - faMusic, - faPen, - faPhotoVideo, - faPlay, - faPollH, - faSearch, - faShareAlt, - faStar, - faStream, - faSuitcase, - faThLarge, - faThList, - faUnlockAlt, - faUserFriends, - faUsers, - faWifi, - faWindowRestore -} from '@fortawesome/free-solid-svg-icons' - -library.add(faAlignJustify) -library.add(faAlignLeft) -library.add(faAt) -library.add(faAtom) -library.add(faBarcode) -library.add(faBell) -library.add(faCalendarWeek) -library.add(faCamera) -library.add(faCarCrash) -library.add(faCog) -library.add(faCommentDots) -library.add(faCheckSquare) -library.add(faDatabase) -library.add(faEnvelope) -library.add(faExpand) -library.add(faExpandAlt) -library.add(faFileAlt) -library.add(faFilm) -library.add(faGlobeAmericas) -library.add(faHdd) -library.add(faImage) -library.add(faLayerGroup) -library.add(faLanguage) -library.add(faMapMarkerAlt) -library.add(faMemory) -library.add(faMobileAlt) -library.add(faMusic) -library.add(faPen) -library.add(faPhotoVideo) -library.add(faPlay) -library.add(faPollH) -library.add(faSearch) -library.add(faShareAlt) -library.add(faStar) -library.add(faStream) -library.add(faSuitcase) -library.add(faThLarge) -library.add(faThList) -library.add(faSuitcase) -library.add(faUnlockAlt) -library.add(faUserFriends) -library.add(faUsers) -library.add(faWifi) -library.add(faWindowRestore) diff --git a/docs/.vuepress/guide.json b/docs/.vuepress/guide.json deleted file mode 100644 index b432b7a0157..00000000000 --- a/docs/.vuepress/guide.json +++ /dev/null @@ -1,1300 +0,0 @@ -{ - "/guide/Alloy_Framework/": [ - [ - "Alloy_Getting_Started", - "Getting Started" - ], - { - "title": "Guide", - "path": "/guide/Alloy_Framework/Alloy_Guide/", - "children": [ - [ - "Alloy_Guide/Alloy_Concepts", - "Concepts" - ], - [ - "Alloy_Guide/Alloy_Controllers", - "Controllers" - ], - { - "title": "Models", - "path": "/guide/Alloy_Framework/Alloy_Guide/Alloy_Models/", - "children": [ - [ - "Alloy_Guide/Alloy_Models/Alloy_Data_Binding", - "Data Binding" - ], - [ - "Alloy_Guide/Alloy_Models/Alloy_Sync_Adapters_and_Migrations", - "Sync Adapters and Migrations" - ], - [ - "Alloy_Guide/Alloy_Models/Backbone_Objects_without_Alloy", - "Backbone Objects without Alloy" - ], - [ - "Alloy_Guide/Alloy_Models/Alloy_Backbone_Migration", - "Backbone Migration" - ], - [ - "Alloy_Guide/Alloy_Models/Alloy_Collection_and_Model_Objects", - "Collection and Model Objects" - ] - ] - }, - { - "title": "Views", - "path": "/guide/Alloy_Framework/Alloy_Guide/Alloy_Views/", - "children": [ - [ - "Alloy_Guide/Alloy_Views/Alloy_Styles_and_Themes", - "Styles and Themes" - ], - [ - "Alloy_Guide/Alloy_Views/Alloy_XML_Markup", - "XML Markup" - ], - [ - "Alloy_Guide/Alloy_Views/Dynamic_Styles", - "Dynamic Styles" - ], - [ - "Alloy_Guide/Alloy_Views/Views_without_Controllers", - "Views without Controllers" - ] - ] - }, - [ - "Alloy_Guide/Alloy_Widgets", - "Widgets" - ], - [ - "Alloy_Guide/Alloy_Tasks_with_the_CLI", - "Tasks with the CLI" - ], - [ - "Alloy_Guide/Alloy_PurgeTSS", - "PurgeTSS" - ] - ] - }, - { - "title": "How-tos", - "path": "/guide/Alloy_Framework/Alloy_How-tos/", - "children": [ - [ - "Alloy_How-tos/Alloy_Best_Practices_and_Recommendations", - "Best Practices and Recommendations" - ], - [ - "Alloy_How-tos/Alloy_Debugging_and_Troubleshooting", - "Debugging and Troubleshooting" - ], - { - "title": "Reference Guides", - "path": "/guide/Alloy_Framework/Alloy_How-tos/Alloy_Reference_Guides/", - "children": [ - [ - "Alloy_How-tos/Alloy_Reference_Guides/Alloy_Command-Line_Interface_Reference", - "Command-Line Interface Reference" - ], - [ - "Alloy_How-tos/Alloy_Reference_Guides/Build_Configuration_File_(alloy.jmk)", - "Build Configuration File (alloy.jmk)" - ], - [ - "Alloy_How-tos/Alloy_Reference_Guides/Project_Configuration_File_(config.json)", - "Project Configuration File (config.json)" - ], - [ - "Alloy_How-tos/Alloy_Reference_Guides/Widget_Configuration_File_(widget.json)", - "Widget Configuration File (widget.json)" - ] - ] - }, - [ - "Alloy_How-tos/Alloy_Samples", - "Samples" - ] - ] - }, - { - "title": "Framework Release Notes", - "path": "/guide/Alloy_Framework/Alloy_Framework_Release_Notes/", - "children": [ - [ - "Alloy_Framework_Release_Notes/Alloy_1.13.1_Release_Note", - "1.13.1 - 10 August 2018" - ], - [ - "Alloy_Framework_Release_Notes/Alloy_1.13.0_Release_Note", - "1.13.0 - 30 April 2018" - ], - [ - "Alloy_Framework_Release_Notes/Alloy_1.12.0_Release_Note", - "1.12.0 - 20 April 2018" - ], - [ - "Alloy_Framework_Release_Notes/Alloy_1.11.0_Release_Note", - "1.11.0 - 5 January 2018" - ] - ] - }, - [ - "Alloy_FAQ", - "FAQ" - ] - ], - "/guide/Editor_IDE/": [ - [ - "Atom_Package/", - "Atom Package" - ], - { - "title": "Visual Studio Code Extension for Titanium", - "path": "/guide/Editor_IDE/VSCode_Extension/", - "children": [ - [ - "VSCode_Extension/Visual_Studio_Code_-_Titanium_Extension_Features", - "Titanium Extension Features" - ], - [ - "VSCode_Extension/Visual_Studio_Code_-_Titanium_Extension_Installation_and_Configuration_Settings", - "Titanium Extension Installation and Configuration Settings" - ], - [ - "VSCode_Extension/Hello_World_Tutorial_for_VS_Code_Extension_For_Titanium", - "Hello World Tutorial for VS Code Extension For Titanium" - ], - [ - "VSCode_Extension/Setting_Up_Emulators_and_Simulators_For_Titanium", - "Setting Up Emulators and Simulators For Titanium" - ], - [ - "VSCode_Extension/Visual_Studio_Code_Extension_Tips_and_Tricks", - "Opening a project" - ] - ] - } - ], - "/guide/Titanium_SDK/": [ - { - "title": "Getting Started", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/", - "children": [ - [ - "Titanium_SDK_Getting_Started/Titanium_Platform_Overview", - "Titanium Platform Overview" - ], - { - "title": "Prerequisites", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Prerequisites/" - }, - [ - "Titanium_SDK_Getting_Started/Titanium_SDK_Overview", - "Overview" - ], - { - "title": "Installation and Configuration", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/", - "children": [ - { - "title": "Installing Platform SDKs", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/", - "children": [ - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_Android_SDK", - "Installing the Android SDK" - ], - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Platform_SDKs/Installing_the_iOS_SDK", - "Installing the iOS SDK" - ] - ] - }, - { - "title": "Installing Titanium Advanced Tools", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Titanium_Advanced_Tools/", - "children": [ - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Titanium_Advanced_Tools/Installing_Git", - "Installing Git" - ], - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Titanium_Advanced_Tools/Installing_the_Android_NDK", - "Installing the Android NDK" - ], - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Titanium_Advanced_Tools/Installing_gperf", - "Installing gperf" - ] - ] - }, - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installing_Titanium_SDK_Continuous_Builds", - "Installing Titanium SDK Continuous Builds" - ], - { - "title": "Installation Troubleshooting", - "path": "/guide/Titanium_SDK/Titanium_SDK_Getting_Started/Installation_and_Configuration/Installation_Troubleshooting/", - "children": [ - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Installation_Troubleshooting/Install_Diagnostics_Script_Output", - "Install Diagnostics Script Output" - ] - ] - }, - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Software_Locations_and_Environment_Variables", - "Software Locations and Environment Variables" - ], - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Titanium_Compatibility_Matrix/", - "Titanium Compatibility Matrix" - ], - [ - "Titanium_SDK_Getting_Started/Installation_and_Configuration/Node.js_Support", - "Node.js Support" - ] - ] - }, - [ - "Titanium_SDK_Getting_Started/Creating_Your_First_Titanium_App", - "Creating Your First Titanium App" - ], - [ - "Titanium_SDK_Getting_Started/Hello_Titanium_App_Tutorial", - "Hello Titanium App Tutorial" - ], - [ - "Titanium_SDK_Getting_Started/GDPR", - "GDPR" - ] - ] - }, - { - "title": "Guide", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/", - "children": [ - { - "title": "Welcome To Titanium", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Welcome_To_Titanium/", - "children": [ - [ - "Titanium_SDK_Guide/Welcome_To_Titanium/Hello_World", - "Hello World" - ], - [ - "Titanium_SDK_Guide/Welcome_To_Titanium/Titanium_Resources", - "Titanium Resources" - ], - [ - "Titanium_SDK_Guide/Welcome_To_Titanium/JavaScript_Development_Primer", - "JavaScript Development Primer" - ] - ] - }, - { - "title": "Best Practices and Recommendations", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Best_Practices_and_Recommendations/", - "children": [ - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Coding_Best_Practices", - "Coding Best Practices" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/CommonJS_Modules_in_Titanium", - "CommonJS Modules in Titanium" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Application_Frameworks", - "Application Frameworks" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Database_Best_Practices", - "Database Best Practices" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Image_Best_Practices", - "Image Best Practices" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Style_and_Conventions", - "Style and Conventions" - ], - [ - "Titanium_SDK_Guide/Best_Practices_and_Recommendations/Reserved_Words", - "Reserved Words" - ] - ] - }, - [ - "Titanium_SDK_Guide/Example_Applications", - "Example Applications" - ], - { - "title": "Hyperloop", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Hyperloop/", - "children": [ - [ - "Titanium_SDK_Guide/Hyperloop/Enabling_Hyperloop", - "Enabling Hyperloop" - ], - { - "title": "Hyperloop Guides", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/", - "children": [ - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Hyperloop_Requirements", - "Hyperloop Requirements" - ], - { - "title": "Android Hyperloop Programming Guide", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Android_Hyperloop_Programming_Guide/", - "children": [ - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Android_Hyperloop_Programming_Guide/Hyperloop_and_Android_-_Using_Third_Party_Android_Libraries", - "Hyperloop and Android - Using Third Party Android Libraries" - ], - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Android_Hyperloop_Programming_Guide/Using_native_Android_XML_layouts_in_Hyperloop", - "Using native Android XML layouts in Hyperloop" - ] - ] - }, - { - "title": "iOS Hyperloop Programming Guide", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/iOS_Hyperloop_Programming_Guide/", - "children": [ - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/iOS_Hyperloop_Programming_Guide/iOS_Modules_-_Use_Native_UI_Application_Delegates_in_Hyperloop_and_Native_Modules", - "iOS Modules - Use Native UI Application Delegates in Hyperloop and Native Modules" - ] - ] - }, - { - "title": "Using the TiApp Utility Class in Hyperloop iOS", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Using_the_TiApp_Utility_Class_in_Hyperloop_iOS/", - "children": [ - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Guides/Using_the_TiApp_Utility_Class_in_Hyperloop_iOS/Using_Swift_to_Build_Native_Modules_in_Titanium", - "Using Swift to Build Native Modules in Titanium" - ] - ] - } - ] - }, - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_Sample_Apps", - "Hyperloop Sample Apps" - ], - [ - "Titanium_SDK_Guide/Hyperloop/Hyperloop_FAQ", - "Hyperloop FAQ" - ] - ] - }, - { - "title": "Titanium and Angular", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Titanium_and_Angular/", - "children": [ - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_Getting_Started_Guide", - "Titanium Angular Getting Started Guide" - ], - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_Basics", - "Titanium Angular Basics" - ], - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_Routing", - "Titanium Angular Routing" - ], - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_-_Helpers_and_Services", - "Titanium Angular - Helpers and Services" - ], - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_-_Limitations_and_Workarounds", - "Titanium Angular - Limitations and Workarounds" - ], - [ - "Titanium_SDK_Guide/Titanium_and_Angular/Titanium_Angular_-_FAQ", - "Titanium Angular - FAQ" - ] - ] - }, - { - "title": "Preparing for Distribution", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Preparing_for_Distribution/", - "children": [ - [ - "Titanium_SDK_Guide/Preparing_for_Distribution/Deploying_to_Android_Devices", - "Deploying to Android Devices" - ], - [ - "Titanium_SDK_Guide/Preparing_for_Distribution/Distributing_Android_apps", - "Distributing Android apps" - ], - [ - "Titanium_SDK_Guide/Preparing_for_Distribution/Deploying_to_iOS_devices", - "Deploying to iOS devices" - ], - { - "title": "Distributing iOS apps", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Preparing_for_Distribution/Distributing_iOS_apps/", - "children": [ - [ - "Titanium_SDK_Guide/Preparing_for_Distribution/Distributing_iOS_apps/App_Thinning", - "App Thinning" - ] - ] - } - ] - }, - { - "title": "Contributing to Titanium", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/", - "children": [ - { - "title": "How to Report a Bug or Make a Feature Request", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/How_to_Report_a_Bug_or_Make_a_Feature_Request/", - "children": [ - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/How_to_Report_a_Bug_or_Make_a_Feature_Request/How_to_Submit_a_Bug_Report", - "How to Submit a Bug Report" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/How_to_Report_a_Bug_or_Make_a_Feature_Request/JIRA_Ticket_Template", - "JIRA Ticket Template" - ] - ] - }, - { - "title": "Documentation", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Documentation/", - "children": [ - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Documentation/Contributing_API_Documentation", - "Contributing API Documentation" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Documentation/Titanium_API_Doc_Style_Guide", - "Titanium API Doc Style Guide" - ] - ] - }, - { - "title": "Platform Development", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/", - "children": [ - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Building_the_Titanium_SDK_From_Source", - "Building the Titanium SDK From Source" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Android_Titanium_SDK_Development_Setup", - "Android Titanium SDK Development Setup" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Pull_Request_Guide", - "Pull Request Guide" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Git_and_Github", - "Git and Github" - ], - { - "title": "Coding Standards", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Coding_Standards/", - "children": [ - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Coding_Standards/C_and_C++_Coding_Standards", - "C and C++ Coding Standards" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Coding_Standards/Java_Coding_Standards", - "Java Coding Standards" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Coding_Standards/JavaScript_Coding_Standards", - "JavaScript Coding Standards" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Coding_Standards/Objective-C_and_Objective-C++_Coding_Standards", - "Objective-C and Objective-C++ Coding Standards" - ] - ] - }, - { - "title": "Specs", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/", - "children": [ - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/TDoc_Specification", - "TDoc Specification" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/Layout_Limitations_Spec", - "Layout Limitations Spec" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec", - "UI Composite Layout Behavior Spec" - ] - ] - } - ] - }, - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Contributing_to_Open_Source_Titanium_Modules", - "Contributing to Open Source Titanium Modules" - ], - [ - "Titanium_SDK_Guide/Contributing_to_Titanium/Reviewing_pull_requests", - "Reviewing pull requests" - ] - ] - }, - { - "title": "Appendices", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Appendices/", - "children": [ - [ - "Titanium_SDK_Guide/Appendices/tiapp.xml_and_timodule.xml_Reference", - "tiapp.xml and timodule.xml Reference" - ], - [ - "Titanium_SDK_Guide/Appendices/Maintaining_a_Custom_AndroidManifest.xml", - "Maintaining a Custom AndroidManifest.xml" - ] - ] - }, - [ - "Titanium_SDK_Guide/Titanium_SDK_Open_Source_Attribution_Notice", - "Open Source Attribution Notice" - ], - { - "title": "Titanium Command-Line Interface Reference", - "path": "/guide/Titanium_SDK/Titanium_SDK_Guide/Titanium_Command-Line_Interface_Reference/", - "children": [ - [ - "Titanium_SDK_Guide/Titanium_Command-Line_Interface_Reference/Titanium_CLI_Options", - "Titanium CLI Options" - ], - [ - "Titanium_SDK_Guide/Titanium_Command-Line_Interface_Reference/Titanium_CLI_Plugins", - "Titanium CLI Plugins" - ], - [ - "Titanium_SDK_Guide/Titanium_Command-Line_Interface_Reference/Titanium_CLI_Tasks", - "Titanium CLI Tasks" - ] - ] - } - ] - }, - { - "title": "How-tos", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/", - "children": [ - { - "title": "Cross-Platform Mobile Development In Titanium", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/", - "children": [ - [ - "Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/Android_Platform_Overview", - "Android Platform Overview" - ], - [ - "Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/iOS_Platform_Overview", - "iOS Platform Overview" - ], - [ - "Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/Coding_Strategies", - "Coding Strategies" - ], - [ - "Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/Supporting_Multiple_Platforms_in_a_Single_Codebase", - "Supporting Multiple Platforms in a Single Codebase" - ], - [ - "Titanium_SDK_How-tos/Cross-Platform_Mobile_Development_In_Titanium/Internationalization", - "Internationalization" - ] - ] - }, - [ - "Titanium_SDK_How-tos/Transfer_your_app_from_appc_CLI_to_ti_CLI/", - "Transfer your app from Appcelerator CLI to Titanium CLI" - ], - { - "title": "Debugging and Profiling", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Debugging_and_Profiling/", - "children": [ - [ - "Titanium_SDK_How-tos/Debugging_and_Profiling/Debugging_Overview", - "Debugging Overview" - ], - [ - "Titanium_SDK_How-tos/Debugging_and_Profiling/Native_Android_Debugging_and_Testing_Tools", - "Native Android Debugging and Testing Tools" - ], - [ - "Titanium_SDK_How-tos/Debugging_and_Profiling/Native_iOS_Debugging_and_Testing_Tools", - "Native iOS Debugging and Testing Tools" - ], - [ - "Titanium_SDK_How-tos/Debugging_and_Profiling/Managing_Memory_and_Finding_Leaks", - "Managing Memory and Finding Leaks" - ], - [ - "Titanium_SDK_How-tos/Debugging_and_Profiling/Build_Test_and_Deploy_a_Titanium_Cross-Platform_App_with_Fastlane", - "Build Test and Deploy a Titanium Cross-Platform App with Fastlane" - ] - ] - }, - { - "title": "Integrating Web Content", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Integrating_Web_Content/", - "children": [ - [ - "Titanium_SDK_How-tos/Integrating_Web_Content/The_WebView_Component", - "The WebView Component" - ], - [ - "Titanium_SDK_How-tos/Integrating_Web_Content/Communication_Between_WebViews_and_Titanium", - "Communication Between WebViews and Titanium" - ], - [ - "Titanium_SDK_How-tos/Integrating_Web_Content/WebView_Use_Cases", - "WebView Use Cases" - ] - ] - }, - { - "title": "Location Services", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Location_Services/", - "children": [ - [ - "Titanium_SDK_How-tos/Location_Services/Tracking_Position_and_Heading", - "Tracking Position and Heading" - ], - [ - "Titanium_SDK_How-tos/Location_Services/iOS_Map_Kit", - "iOS Map Kit" - ], - [ - "Titanium_SDK_How-tos/Location_Services/Google_Maps_v2_for_Android", - "Google Maps v2 for Android" - ], - [ - "Titanium_SDK_How-tos/Location_Services/Native_Maps_and_Annotations", - "Native Maps and Annotations" - ] - ] - }, - { - "title": "Platform API Deep Dives", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/", - "children": [ - { - "title": "Android API Deep Dives", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/", - "children": [ - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intents", - "Android Intents" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intent_Filters", - "Android Intent Filters" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Broadcast_Intents_and_Receivers", - "Android Broadcast Intents and Receivers" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Services", - "Android Services" - ] - ] - }, - { - "title": "iOS API Deep Dives", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/", - "children": [ - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/Core_Motion_Module", - "Core Motion Module" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/Creating_iOS_Extensions_-_Siri_Intents", - "Creating iOS Extensions - Siri Intents" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/Handoff_User_Activities", - "Handoff User Activities" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/iCloud_Services", - "iCloud Services" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/Integrate_a_WatchKit_App_Built_in_Xcode", - "Integrate a WatchKit App Built in Xcode" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/iOS_Background_Services", - "iOS Background Services" - ], - [ - "Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/Spotlight_Search", - "Spotlight Search" - ] - ] - } - ] - }, - { - "title": "Using Modules", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Using_Modules/", - "children": [ - [ - "Titanium_SDK_How-tos/Using_Modules/Obtaining_Modules", - "Obtaining Modules" - ], - [ - "Titanium_SDK_How-tos/Using_Modules/Using_a_Module", - "Using a Module" - ] - ] - }, - { - "title": "Working with Local Data Sources", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Local_Data_Sources/", - "children": [ - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Choosing_a_Persistence_Strategy_for_Your_Application", - "Choosing a Persistence Strategy for Your Application" - ], - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Lightweight_Persistence_with_the_Properties_API", - "Lightweight Persistence with the Properties API" - ], - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Working_with_a_SQLite_Database", - "Working with a SQLite Database" - ], - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Filesystem_Access_and_Storage", - "Filesystem Access and Storage" - ], - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Buffer_and_Codec", - "Buffer and Codec" - ], - [ - "Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Streams", - "Streams" - ] - ] - }, - { - "title": "Working with Media APIs", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Media_APIs/", - "children": [ - [ - "Titanium_SDK_How-tos/Working_with_Media_APIs/Audio_APIs", - "Audio APIs" - ], - [ - "Titanium_SDK_How-tos/Working_with_Media_APIs/Video_APIs", - "Video APIs" - ], - [ - "Titanium_SDK_How-tos/Working_with_Media_APIs/Images_and_ImageView_APIs", - "Images and ImageView APIs" - ], - [ - "Titanium_SDK_How-tos/Working_with_Media_APIs/Camera_and_Photo_Gallery_APIs", - "Camera and Photo Gallery APIs" - ] - ] - }, - { - "title": "Extending Titanium SDK", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Extending_Titanium_Mobile/", - "children": [ - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/Titanium_Module_Concepts", - "Titanium Module Concepts" - ], - { - "title": "Android Module Development Guide", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Extending_Titanium_Mobile/Android_Module_Development_Guide/", - "children": [ - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/Android_Module_Development_Guide/Android_Module_Quick_Start", - "Android Module Quick Start" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/Android_Module_Development_Guide/Android_Module_Architecture", - "Android Module Architecture" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/Android_Module_Development_Guide/Android_Module_Project", - "Android Module Project" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/Android_Module_Development_Guide/Android_Module_Upgrade_Guide", - "Android Module Upgrade Guide" - ] - ] - }, - { - "title": "iOS Module Development Guide", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/", - "children": [ - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/iOS_Module_Quick_Start", - "iOS Module Quick Start" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/iOS_Module_Architecture", - "iOS Module Architecture" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/iOS_Module_Project", - "iOS Module Project" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/iOS_Module_64-bit_Support", - "iOS Module 64-bit Support" - ], - [ - "Titanium_SDK_How-tos/Extending_Titanium_Mobile/iOS_Module_Development_Guide/iOS_Module_Debugging", - "iOS Module Debugging" - ] - ] - } - ] - }, - { - "title": "Working with Remote Data Sources", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/", - "children": [ - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/HTTPClient_and_the_Request_Lifecycle", - "HTTPClient and the Request Lifecycle" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/Sockets", - "Sockets" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/Working_with_JSON_Data", - "Working with JSON Data" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/Working_with_XML_Data", - "Working with XML Data" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/Dealing_with_SOAP_Web_Services", - "Dealing with SOAP Web Services" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/File_Uploads_and_Downloads", - "File Uploads and Downloads" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/Integrate_with_Mobile_Backend_Services", - "Integrate with Mobile Backend Services" - ], - [ - "Titanium_SDK_How-tos/Working_with_Remote_Data_Sources/SSL_Certificate_Store_Support_for_HTTP_Clients", - "SSL Certificate Store Support for HTTP Clients" - ] - ] - }, - { - "title": "User Interface Deep Dives", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/", - "children": [ - { - "title": "ListViews", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/ListViews/", - "children": [ - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/ListViews/Alloy_ListView_Guide", - "Alloy ListView Guide" - ] - ] - }, - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/TableViews", - "TableViews" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Scrolling_Views", - "Scrolling Views" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Orientation", - "Orientation" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Supporting_Gestures", - "Supporting Gestures" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Animation", - "Animation" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Custom_Fonts", - "Custom Fonts" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Attributed_Strings", - "Attributed Strings" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Accessibility", - "Accessibility" - ], - { - "title": "Android UI Components and Conventions", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/", - "children": [ - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/Android_Action_Bar", - "Android Action Bar" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/Android_Themes", - "Android Themes" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/Using_density-specific_resources_on_Android", - "Using density-specific resources on Android" - ] - ] - }, - { - "title": "iOS UI Components and Conventions", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/iOS_UI_Components_and_Conventions/", - "children": [ - [ - "Titanium_SDK_How-tos/User_Interface_Deep_Dives/iOS_UI_Components_and_Conventions/iOS_3D_Touch", - "iOS 3D Touch" - ] - ] - } - ] - }, - { - "title": "User Interface Fundamentals", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Fundamentals/", - "children": [ - [ - "Titanium_SDK_How-tos/User_Interface_Fundamentals/Application_Structures_and_Core_Building_Blocks", - "Application Structures and Core Building Blocks" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Fundamentals/Layouts_Positioning_and_the_View_Hierarchy", - "Layouts Positioning and the View Hierarchy" - ], - [ - "Titanium_SDK_How-tos/User_Interface_Fundamentals/Event_Handling", - "Event Handling" - ], - { - "title": "Icons and Splash Screens", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Fundamentals/Icons_and_Splash_Screens/", - "children": [ - [ - "Titanium_SDK_How-tos/User_Interface_Fundamentals/Icons_and_Splash_Screens/iOS_Launch_Files", - "iOS Launch Files" - ] - ] - } - ] - }, - { - "title": "Notification Services", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/", - "children": [ - [ - "Titanium_SDK_How-tos/Notification_Services/Android_Notifications", - "Android Notifications" - ], - [ - "Titanium_SDK_How-tos/Notification_Services/iOS_Local_Notifications", - "iOS Local Notifications" - ], - [ - "Titanium_SDK_How-tos/Notification_Services/iOS_Interactive_Notifications", - "iOS Interactive Notifications" - ], - { - "title": "Push Notifications", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/Push_Notifications/", - "children": [ - { - "title": "Configuring Push Services", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/Push_Notifications/Configuring_Push_Services/", - "children": [ - [ - "Titanium_SDK_How-tos/Notification_Services/Push_Notifications/Configuring_Push_Services/Creating_a_Google_API_Console_project_and_client_ID", - "Creating a Google API Console project and client ID" - ] - ] - }, - [ - "Titanium_SDK_How-tos/Notification_Services/Push_Notifications/Subscribing_to_push_notifications", - "Subscribing to push notifications" - ] - ] - } - ] - }, - [ - "Titanium_SDK_How-tos/Adhere_to_the_iOS17_Privacy_Requirements", - "Adhere to the iOS 17+ Privacy Requirements" - ], - { - "title": "Titanium Boilerplates", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Titanium_Boilerplates/", - "children": [ - [ - "Titanium_SDK_How-tos/Titanium_Boilerplates/Titanium_Boilerplates_for_TypeScript", - "Titanium Boilerplates for TypeScript" - ] - ] - }, - { - "title": "Tutorials", - "path": "/guide/Titanium_SDK/Titanium_SDK_How-tos/Titanium_SDK_Tutorials/", - "children": [ - [ - "Titanium_SDK_How-tos/Titanium_SDK_Tutorials/Camera_App_Tutorial", - "Camera App Tutorial" - ], - [ - "Titanium_SDK_How-tos/Titanium_SDK_Tutorials/Geolocation_with_Titanium_Tutorial", - "Geolocation with Titanium Tutorial" - ], - [ - "Titanium_SDK_How-tos/Titanium_SDK_Tutorials/RESTe", - "RESTe" - ], - [ - "Titanium_SDK_How-tos/Titanium_SDK_Tutorials/Six_Steps_to_Extensive_Titanium_App_Build_Automation", - "Six Steps to Extensive Titanium App Build Automation" - ], - [ - "Titanium_SDK_How-tos/Titanium_SDK_Tutorials/How_to_Chain_Controller_Methods_in_Titanium_by_Using_Alloy", - "How to Chain Controller Methods in Titanium by Using Alloy" - ] - ] - }, - [ - "Titanium_SDK_How-tos/WKWebView", - "WKWebView" - ], - [ - "Titanium_SDK_How-tos/Webpack_Guide", - "Webpack Guide" - ] - ] - }, - { - "title": "Release Notes", - "path": "/guide/Titanium_SDK/Titanium_SDK_Release_Notes/", - "children": [ - { - "title": "Release Notes 11.x", - "path": "/guide/Titanium_SDK/Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_11.x/", - "children": [ - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_11.x/Titanium_SDK_11.0.0.GA_Release_Note", - "11.0.0.GA - 01 July 2022" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_11.x/Titanium_SDK_11.0.0.RC_Release_Note", - "11.0.0.RC - 23 May 2022" - ] - ] - }, - { - "title": "Release Notes 10.x", - "path": "/guide/Titanium_SDK/Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/", - "children": [ - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.0.0.GA_Release_Note", - "10.0.0.GA - 17 May 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.0.0.RC_Release_Note", - "10.0.0.RC - 21 April 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.0.1.GA_Release_Note", - "10.0.1.GA - 28 July 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.0.2.GA_Release_Note", - "10.0.2.GA - 10 August 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.1.0.GA_Release_Note", - "10.1.0.GA Release Note" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.1.0.RC_Release_Note", - "10.1.0.RC Release Note" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_10.x/Titanium_SDK_10.1.1.GA_Release_Note", - "10.1.1.GA Release Note" - ] - ] - }, - { - "title": "Release Notes 9.x", - "path": "/guide/Titanium_SDK/Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/", - "children": [ - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.3.2.GA_Release_Note", - "9.3.2.GA - 11 February 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.3.1_GA_Release_Note", - "9.3.1.GA - 25 January 2021" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.3.0_GA_Release_Note", - "9.3.0.GA - 14 December 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.3.0_RC_Release_Note", - "9.3.0.RC - 1 December 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.2.2.GA_Release_Note", - "9.2.2.GA - 29 October 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.2.1.GA_Release_Note", - "9.2.1.GA - 6 October 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.2.0_GA_Release_Note", - "9.2.0.GA - 23 September 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.2.0_RC_Release_Note", - "9.2.0.RC - 15 September 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.1.0.GA_Release_Note", - "9.1.0.GA - 25 August 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.1.0.RC_Release_Note", - "9.1.0.RC - 14 August 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.0.3.GA_Release_Note", - "9.0.3.GA - 10 June 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.0.2.GA_Release_Note", - "9.0.2.GA - 19 May 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.0.1.GA_Release_Note", - "9.0.1.GA - 16 April 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.0.0.GA_Release_Note", - "9.0.0.GA - 18 March 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_9.x/Titanium_SDK_9.0.0.RC_Release_Note", - "9.0.0.RC - 18 February 2020" - ] - ] - }, - { - "title": "Release Notes 8.x", - "path": "/guide/Titanium_SDK/Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/", - "children": [ - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.3.1.GA_Release_Note", - "8.3.1.GA - 17 January 2020" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.3.0.GA_Release_Note", - "8.3.0.GA - 25 November 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.3.0.RC_Release_Note", - "8.3.0.RC - 18 November 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.2.1.GA_Release_Note", - "8.2.1.GA - 25 October 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.2.0.GA_Release_Note", - "8.2.0.GA - 19 September 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.2.0.RC_Release_Note", - "8.2.0.RC - 6 September 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.1.1.GA_Release_Note", - "8.1.1.GA - 29 August 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.1.0.GA_Release_Note", - "8.1.0.GA - 13 August 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.1.0.RC_Release_Note", - "8.1.0.RC - 22 July 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.0.2.GA_Release_Note", - "8.0.2.GA - 18 June 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.0.1.GA_Release_Note", - "8.0.1.GA - 15 May 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.0.1.RC_Release_Note", - "8.0.1.RC - 1 May 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.0.0.GA_Release_Note", - "8.0.0.GA - 14 March 2019" - ], - [ - "Titanium_SDK_Release_Notes/Titanium_SDK_Release_Notes_8.x/Titanium_SDK_8.0.0.RC_Release_Note", - "8.0.0.RC - 20 February 2019" - ] - ] - } - ] - }, - [ - "Titanium_SDK_FAQ", - "FAQ" - ] - ] -} diff --git a/docs/.vuepress/local-components/api/ModuleCard.vue b/docs/.vuepress/local-components/api/ModuleCard.vue deleted file mode 100644 index d8c43720c15..00000000000 --- a/docs/.vuepress/local-components/api/ModuleCard.vue +++ /dev/null @@ -1,52 +0,0 @@ - - - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/api/ModuleGroup.vue b/docs/.vuepress/local-components/api/ModuleGroup.vue deleted file mode 100644 index 84a072dcf8e..00000000000 --- a/docs/.vuepress/local-components/api/ModuleGroup.vue +++ /dev/null @@ -1,16 +0,0 @@ - - - diff --git a/docs/.vuepress/local-components/landing/AmplifyPlatform.vue b/docs/.vuepress/local-components/landing/AmplifyPlatform.vue deleted file mode 100644 index a051014524b..00000000000 --- a/docs/.vuepress/local-components/landing/AmplifyPlatform.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/landing/Customers.vue b/docs/.vuepress/local-components/landing/Customers.vue deleted file mode 100644 index 48fcbeedbdd..00000000000 --- a/docs/.vuepress/local-components/landing/Customers.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/landing/DiscoverModules.vue b/docs/.vuepress/local-components/landing/DiscoverModules.vue deleted file mode 100644 index 48d26b10387..00000000000 --- a/docs/.vuepress/local-components/landing/DiscoverModules.vue +++ /dev/null @@ -1,47 +0,0 @@ - - - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/landing/Feature.vue b/docs/.vuepress/local-components/landing/Feature.vue deleted file mode 100644 index 178230c1412..00000000000 --- a/docs/.vuepress/local-components/landing/Feature.vue +++ /dev/null @@ -1,128 +0,0 @@ - - - - - diff --git a/docs/.vuepress/local-components/landing/FrameworkList.vue b/docs/.vuepress/local-components/landing/FrameworkList.vue deleted file mode 100644 index cac35524e70..00000000000 --- a/docs/.vuepress/local-components/landing/FrameworkList.vue +++ /dev/null @@ -1,51 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/landing/Header.vue b/docs/.vuepress/local-components/landing/Header.vue deleted file mode 100644 index f2097666a54..00000000000 --- a/docs/.vuepress/local-components/landing/Header.vue +++ /dev/null @@ -1,73 +0,0 @@ - - - - - diff --git a/docs/.vuepress/local-components/landing/PlatformIntro.vue b/docs/.vuepress/local-components/landing/PlatformIntro.vue deleted file mode 100644 index c33ec3ac31f..00000000000 --- a/docs/.vuepress/local-components/landing/PlatformIntro.vue +++ /dev/null @@ -1,48 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/.vuepress/local-components/landing/PlatformServices.vue b/docs/.vuepress/local-components/landing/PlatformServices.vue deleted file mode 100644 index c2006cf83dd..00000000000 --- a/docs/.vuepress/local-components/landing/PlatformServices.vue +++ /dev/null @@ -1,68 +0,0 @@ - - - - - diff --git a/docs/.vuepress/local-components/landing/SignUpCall.vue b/docs/.vuepress/local-components/landing/SignUpCall.vue deleted file mode 100644 index 6841dc87e21..00000000000 --- a/docs/.vuepress/local-components/landing/SignUpCall.vue +++ /dev/null @@ -1,23 +0,0 @@ - - - \ No newline at end of file diff --git a/docs/.vuepress/plugins/guides-content-sidebar.js b/docs/.vuepress/plugins/guides-content-sidebar.js deleted file mode 100644 index be731063ee9..00000000000 --- a/docs/.vuepress/plugins/guides-content-sidebar.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports = { - name: 'guides-content-sidebar', - extendPageData (page) { - if (page.path.startsWith('/guide/')) { - page.frontmatter.contentSidebar = true - page.frontmatter.sidebarDepth = 0 - } - } -}; diff --git a/docs/.vuepress/plugins/purgecss.js b/docs/.vuepress/plugins/purgecss.js deleted file mode 100644 index 4a245c14d92..00000000000 --- a/docs/.vuepress/plugins/purgecss.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Manually configure purgecss options since the options added by the - * Tailwind CSS plugin don't work in our setup by default. - */ - -module.exports = (options, context) => { - const plugin = { name: 'purgecss' } - const { isProd, siteConfig, sourceDir } = context - - if (!isProd) { - return plugin - } - - const purgecss = require('@fullhuman/postcss-purgecss') - siteConfig.postcss.plugins.push(purgecss({ - content: [ - // Retain any css classes from any vue component used - `${sourceDir}/.vuepress/components/*.vue`, - `${sourceDir}/.vuepress/local-components/**/*.vue`, - `${sourceDir}/../website/pages/**/*.vue`, - `node_modules/@vuepress/plugin-*/**/*.vue`, - `node_modules/@vuepress/core/lib/**/*.vue`, - `node_modules/vuepress-plugin-*/**/*.vue`, - `node_modules/vuepress-theme-*/**/*.vue`, - // Retain all styles from the theme - `node_modules/vuepress-theme-titanium/styles/*.styl`, - // and local override(s) - `${sourceDir}/.vuepress/styles/*.styl` - ], - extractors: [ - { - extractor: content => { - const contentWithoutStyleBlocks = content.replace(//gi, ""); - return ( - contentWithoutStyleBlocks.match(/[A-Za-z0-9-_/:]*[A-Za-z0-9-_/]+/g) || [] - ); - }, - extensions: [ 'vue' ], - }, - ], - defaultExtractor: content => { - // Capture as liberally as possible, including things like `h-(screen-1.5)` - const broadMatches = content.match(/[^<>"'`\s]*[^<>"'`\s:]/g) || [] - - // Capture classes within other delimiters like .block(class="w-1/2") in Pug - const innerMatches = content.match(/[^<>"'`\s.()]*[^<>"'`\s.():]/g) || [] - - return broadMatches.concat(innerMatches) - }, - safelist: [ - /-(leave|enter|appear)(|-(to|from|active))$/, - /^(?!(|.*?:)cursor-move).+-move$/, - /^router-link(|-exact)-active$/, - /data-v-.*/, - ], - rejected: true - })) - - return plugin -} diff --git a/docs/.vuepress/public/.well-known/atproto-did b/docs/.vuepress/public/.well-known/atproto-did deleted file mode 100644 index 7769093c390..00000000000 --- a/docs/.vuepress/public/.well-known/atproto-did +++ /dev/null @@ -1 +0,0 @@ -did:plc:nwnj2irjiiefmlsi4ie7gftz diff --git a/docs/.vuepress/public/favicon.ico b/docs/.vuepress/public/favicon.ico deleted file mode 100644 index 5197a378573..00000000000 Binary files a/docs/.vuepress/public/favicon.ico and /dev/null differ diff --git a/docs/.vuepress/public/images/angular-logo.png b/docs/.vuepress/public/images/angular-logo.png deleted file mode 100644 index c5102939182..00000000000 Binary files a/docs/.vuepress/public/images/angular-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/appc-logo.png b/docs/.vuepress/public/images/appc-logo.png deleted file mode 100644 index b0927c9e746..00000000000 Binary files a/docs/.vuepress/public/images/appc-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/axway-appcelerator-logo.png b/docs/.vuepress/public/images/axway-appcelerator-logo.png deleted file mode 100644 index ee95b2a7c4d..00000000000 Binary files a/docs/.vuepress/public/images/axway-appcelerator-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/b2b.png b/docs/.vuepress/public/images/b2b.png deleted file mode 100644 index 3dc9912a3eb..00000000000 Binary files a/docs/.vuepress/public/images/b2b.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-avis.png b/docs/.vuepress/public/images/customers/customer-avis.png deleted file mode 100644 index d988513251a..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-avis.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-bed-bath-beyond.png b/docs/.vuepress/public/images/customers/customer-bed-bath-beyond.png deleted file mode 100644 index 12146b76b97..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-bed-bath-beyond.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-blackbaud.png b/docs/.vuepress/public/images/customers/customer-blackbaud.png deleted file mode 100644 index c6525292d15..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-blackbaud.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-cintas.png b/docs/.vuepress/public/images/customers/customer-cintas.png deleted file mode 100644 index 2de55798e68..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-cintas.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-cisco.png b/docs/.vuepress/public/images/customers/customer-cisco.png deleted file mode 100644 index 62ffe1ddd42..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-cisco.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-navistar.png b/docs/.vuepress/public/images/customers/customer-navistar.png deleted file mode 100644 index 903162fc15c..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-navistar.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-tmobile.png b/docs/.vuepress/public/images/customers/customer-tmobile.png deleted file mode 100644 index d2a2f1d2946..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-tmobile.png and /dev/null differ diff --git a/docs/.vuepress/public/images/customers/customer-vmware.png b/docs/.vuepress/public/images/customers/customer-vmware.png deleted file mode 100644 index d8ab5c03e12..00000000000 Binary files a/docs/.vuepress/public/images/customers/customer-vmware.png and /dev/null differ diff --git a/docs/.vuepress/public/images/facebook-logo.png b/docs/.vuepress/public/images/facebook-logo.png deleted file mode 100644 index 7a187d12821..00000000000 Binary files a/docs/.vuepress/public/images/facebook-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/firebase-logo.png b/docs/.vuepress/public/images/firebase-logo.png deleted file mode 100644 index e3e46f77939..00000000000 Binary files a/docs/.vuepress/public/images/firebase-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/gear.png b/docs/.vuepress/public/images/gear.png deleted file mode 100644 index 426be0ab06f..00000000000 Binary files a/docs/.vuepress/public/images/gear.png and /dev/null differ diff --git a/docs/.vuepress/public/images/google-maps-logo.png b/docs/.vuepress/public/images/google-maps-logo.png deleted file mode 100644 index bf5caa4445b..00000000000 Binary files a/docs/.vuepress/public/images/google-maps-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/graphics/analytics-poster.jpg b/docs/.vuepress/public/images/graphics/analytics-poster.jpg deleted file mode 100644 index 8172761e2a0..00000000000 Binary files a/docs/.vuepress/public/images/graphics/analytics-poster.jpg and /dev/null differ diff --git a/docs/.vuepress/public/images/graphics/bring-apps-to-life.jpg b/docs/.vuepress/public/images/graphics/bring-apps-to-life.jpg deleted file mode 100644 index 98a91d89e52..00000000000 Binary files a/docs/.vuepress/public/images/graphics/bring-apps-to-life.jpg and /dev/null differ diff --git a/docs/.vuepress/public/images/graphics/create-custom-apis.jpg b/docs/.vuepress/public/images/graphics/create-custom-apis.jpg deleted file mode 100644 index a617124320e..00000000000 Binary files a/docs/.vuepress/public/images/graphics/create-custom-apis.jpg and /dev/null differ diff --git a/docs/.vuepress/public/images/graphics/ide.png b/docs/.vuepress/public/images/graphics/ide.png deleted file mode 100644 index 6d5c77187e1..00000000000 Binary files a/docs/.vuepress/public/images/graphics/ide.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/29004836/download_05.png b/docs/.vuepress/public/images/guide/download/attachments/29004836/download_05.png deleted file mode 100644 index e360403feef..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/29004836/download_05.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/29004851/download_02.png b/docs/.vuepress/public/images/guide/download/attachments/29004851/download_02.png deleted file mode 100644 index 8ca13bada4f..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/29004851/download_02.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/30083020/check.png b/docs/.vuepress/public/images/guide/download/attachments/30083020/check.png deleted file mode 100644 index 31d84f728a0..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/30083020/check.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/30083020/error.png b/docs/.vuepress/public/images/guide/download/attachments/30083020/error.png deleted file mode 100644 index 7b71e143faf..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/30083020/error.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/37540095/PlatformConfigDialog.png b/docs/.vuepress/public/images/guide/download/attachments/37540095/PlatformConfigDialog.png deleted file mode 100644 index dc7e6ec8c4c..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/37540095/PlatformConfigDialog.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/43287298/EmailClient.png b/docs/.vuepress/public/images/guide/download/attachments/43287298/EmailClient.png deleted file mode 100644 index 4afa496486d..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/43287298/EmailClient.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/43287298/GooglePlusShare.png b/docs/.vuepress/public/images/guide/download/attachments/43287298/GooglePlusShare.png deleted file mode 100644 index 377bad16808..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/43287298/GooglePlusShare.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/43287298/HighlightText.png b/docs/.vuepress/public/images/guide/download/attachments/43287298/HighlightText.png deleted file mode 100644 index cab3f76ac68..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/43287298/HighlightText.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/43287298/ShareDialog.png b/docs/.vuepress/public/images/guide/download/attachments/43287298/ShareDialog.png deleted file mode 100644 index e3866248072..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/43287298/ShareDialog.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/43287298/SmsClient.png b/docs/.vuepress/public/images/guide/download/attachments/43287298/SmsClient.png deleted file mode 100644 index c226ec0560d..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/43287298/SmsClient.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-11_14_31_54.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-11_14_31_54.png deleted file mode 100644 index d8e85015741..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-11_14_31_54.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_11_42.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_11_42.png deleted file mode 100644 index f239d22e3b2..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_11_42.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_14_5.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_14_5.png deleted file mode 100644 index 141d5739890..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_14_5.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_19_26.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_19_26.png deleted file mode 100644 index 21f9bb5afda..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_19_26.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_26_49.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_26_49.png deleted file mode 100644 index a7d14c45659..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-12_9_26_49.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_13_52_2.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_13_52_2.png deleted file mode 100644 index 1a274dc4acd..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_13_52_2.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_14_10_16.png b/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_14_10_16.png deleted file mode 100644 index 9ad95aebe20..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/46249378/image2016-5-2_14_10_16.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_API.png b/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_API.png deleted file mode 100644 index 38d616db56e..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_API.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_APSSDK.png b/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_APSSDK.png deleted file mode 100644 index 1544f73a99c..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_APSSDK.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Other.png b/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Other.png deleted file mode 100644 index dc23d6c8ec9..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Other.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Web.png b/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Web.png deleted file mode 100644 index c55a0ba69df..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/60148494/RegisterAppForService_latest_Web.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/attachments/60151875/dashboard_mbs_app_left_menu.png b/docs/.vuepress/public/images/guide/download/attachments/60151875/dashboard_mbs_app_left_menu.png deleted file mode 100644 index 91edd8d37fe..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/attachments/60151875/dashboard_mbs_app_left_menu.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/thumbnails/30083017/appc_menu.png b/docs/.vuepress/public/images/guide/download/thumbnails/30083017/appc_menu.png deleted file mode 100644 index c4c09a8c74c..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/thumbnails/30083017/appc_menu.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/download/thumbnails/46249378/image2016-5-11_14_20_10.png b/docs/.vuepress/public/images/guide/download/thumbnails/46249378/image2016-5-11_14_20_10.png deleted file mode 100644 index cda8cb8d7e4..00000000000 Binary files a/docs/.vuepress/public/images/guide/download/thumbnails/46249378/image2016-5-11_14_20_10.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/check.png b/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/check.png deleted file mode 100644 index 31d84f728a0..00000000000 Binary files a/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/check.png and /dev/null differ diff --git a/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/error.png b/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/error.png deleted file mode 100644 index 7b71e143faf..00000000000 Binary files a/docs/.vuepress/public/images/guide/s/en_GB/5637/e1ef10868e8fe2f234a1a0b171b01cde1d9717c4.31/_/images/icons/emoticons/error.png and /dev/null differ diff --git a/docs/.vuepress/public/images/home-app-without-shadow.png b/docs/.vuepress/public/images/home-app-without-shadow.png deleted file mode 100644 index 32551b13982..00000000000 Binary files a/docs/.vuepress/public/images/home-app-without-shadow.png and /dev/null differ diff --git a/docs/.vuepress/public/images/home-hero-code.png b/docs/.vuepress/public/images/home-hero-code.png deleted file mode 100644 index 990c3bbb4e9..00000000000 Binary files a/docs/.vuepress/public/images/home-hero-code.png and /dev/null differ diff --git a/docs/.vuepress/public/images/hyperloop.png b/docs/.vuepress/public/images/hyperloop.png deleted file mode 100644 index 45f5e108579..00000000000 Binary files a/docs/.vuepress/public/images/hyperloop.png and /dev/null differ diff --git a/docs/.vuepress/public/images/icons/icon-alloy.svg b/docs/.vuepress/public/images/icons/icon-alloy.svg deleted file mode 100644 index 27158558d83..00000000000 --- a/docs/.vuepress/public/images/icons/icon-alloy.svg +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-api.svg b/docs/.vuepress/public/images/icons/icon-api.svg deleted file mode 100644 index 1591a19143c..00000000000 --- a/docs/.vuepress/public/images/icons/icon-api.svg +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-cli.svg b/docs/.vuepress/public/images/icons/icon-cli.svg deleted file mode 100644 index c1e3e5b314c..00000000000 --- a/docs/.vuepress/public/images/icons/icon-cli.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-hyperloop.svg b/docs/.vuepress/public/images/icons/icon-hyperloop.svg deleted file mode 100644 index 3c2d139277b..00000000000 --- a/docs/.vuepress/public/images/icons/icon-hyperloop.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-modules.svg b/docs/.vuepress/public/images/icons/icon-modules.svg deleted file mode 100644 index e2cc69ea821..00000000000 --- a/docs/.vuepress/public/images/icons/icon-modules.svg +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-titanium-grey.svg b/docs/.vuepress/public/images/icons/icon-titanium-grey.svg deleted file mode 100644 index a2836a82a6b..00000000000 --- a/docs/.vuepress/public/images/icons/icon-titanium-grey.svg +++ /dev/null @@ -1,10 +0,0 @@ - - - - - titanium-sdk_product - - - - - diff --git a/docs/.vuepress/public/images/icons/icon-titanium-red.svg b/docs/.vuepress/public/images/icons/icon-titanium-red.svg deleted file mode 100644 index 5caf7a1fad1..00000000000 --- a/docs/.vuepress/public/images/icons/icon-titanium-red.svg +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - diff --git a/docs/.vuepress/public/images/integration.png b/docs/.vuepress/public/images/integration.png deleted file mode 100644 index 683908ba37f..00000000000 Binary files a/docs/.vuepress/public/images/integration.png and /dev/null differ diff --git a/docs/.vuepress/public/images/iphone.png b/docs/.vuepress/public/images/iphone.png deleted file mode 100644 index 80e31e81df2..00000000000 Binary files a/docs/.vuepress/public/images/iphone.png and /dev/null differ diff --git a/docs/.vuepress/public/images/js-logo.png b/docs/.vuepress/public/images/js-logo.png deleted file mode 100644 index 4664ef47c87..00000000000 Binary files a/docs/.vuepress/public/images/js-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/lottie-logo.png b/docs/.vuepress/public/images/lottie-logo.png deleted file mode 100644 index b4ba507ebc1..00000000000 Binary files a/docs/.vuepress/public/images/lottie-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/tidev-logo-inverted.png b/docs/.vuepress/public/images/tidev-logo-inverted.png deleted file mode 100644 index 164ef89974c..00000000000 Binary files a/docs/.vuepress/public/images/tidev-logo-inverted.png and /dev/null differ diff --git a/docs/.vuepress/public/images/tidev-logo.png b/docs/.vuepress/public/images/tidev-logo.png deleted file mode 100644 index 56630d2e1a3..00000000000 Binary files a/docs/.vuepress/public/images/tidev-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/titanium-logo.png b/docs/.vuepress/public/images/titanium-logo.png deleted file mode 100644 index fce99eafa9e..00000000000 Binary files a/docs/.vuepress/public/images/titanium-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/vue-logo.png b/docs/.vuepress/public/images/vue-logo.png deleted file mode 100644 index 1b3356a746b..00000000000 Binary files a/docs/.vuepress/public/images/vue-logo.png and /dev/null differ diff --git a/docs/.vuepress/public/images/workspace.png b/docs/.vuepress/public/images/workspace.png deleted file mode 100644 index 32057c15ea6..00000000000 Binary files a/docs/.vuepress/public/images/workspace.png and /dev/null differ diff --git a/docs/.vuepress/styles/base.styl b/docs/.vuepress/styles/base.styl deleted file mode 100644 index 0a4b2267016..00000000000 --- a/docs/.vuepress/styles/base.styl +++ /dev/null @@ -1,27 +0,0 @@ -/* Re-apply some base styles that were overwritten by Tailwind */ - -@css { - html { - line-height: 1.15 - } - - p, ul, dl { - @apply my-5 - } - - ul { - @apply list-disc - } - - li > p { - @apply my-0 - } - - dl > dd { - @apply ml-8 - } - - hr { - @apply my-12 - } -} \ No newline at end of file diff --git a/docs/.vuepress/styles/buttons.styl b/docs/.vuepress/styles/buttons.styl deleted file mode 100644 index cb04fea17e8..00000000000 --- a/docs/.vuepress/styles/buttons.styl +++ /dev/null @@ -1,38 +0,0 @@ -@css { - .btn { - @apply font-semibold py-2 px-4 rounded; - } - .content:not(.custom) a.btn:hover { - text-decoration: none; - } - .btn-lg { - @apply py-4 px-8; - } - .btn-white { - @apply bg-white text-red-500; - } - .btn-white:hover { - @apply bg-red-100 - } - .btn-red { - @apply bg-red-500 text-white; - } - .btn-red:hover { - @apply bg-red-700; - } - .btn-pill { - @apply rounded-full; - } - .btn-outline { - @apply bg-transparent border-2 text-white; - } - .btn-outline.btn-white:hover { - @apply text-red-500 bg-red-100 border-red-100 - } - .btn-outline.btn-red { - @apply text-red-500 border-red-500 - } - .btn-outline.btn-red:hover { - @apply text-white bg-red-700 border-red-700 - } -} \ No newline at end of file diff --git a/docs/.vuepress/styles/index.styl b/docs/.vuepress/styles/index.styl deleted file mode 100644 index 3893fca2474..00000000000 --- a/docs/.vuepress/styles/index.styl +++ /dev/null @@ -1,213 +0,0 @@ -/* purgecss start ignore */ -@tailwind base -@tailwind components -/* purgecss end ignore */ -@tailwind utilities - -@import base -@import buttons - -body - overflow-x hidden - -.landing - .content:not(.custom) - > *:first-child - margin-top 0 - .navbar - display flex - align-items center - justify-content: space-between - transition background-color .3s ease, border-color .3s ease, heigth .3s ease - .links - position relative - top 0 - background-color transparent - - .navbar:not(.scrolling) - background-color transparent - border-color transparent - height 6rem - - .sidebar-button - top 1.75rem - - .links - .nav-item - > .nav-link - color: #fff - .dropdown-title - .title - color: #fff - .repo-link - color: #fff - .icon - &.outbound - color: #fff - - .content:not(.custom) - max-width none - padding 0 - margin 0 - -.search-box - input - color $black !important - .suggestion - a - color $black !important - &.focused - background-color $secondary-ltr !important - a - color $accentColor !important - -/* dark/light mode variables */ -:root, :root.light { - --bg-border: #efefef; - --color-white: #fff; - --bg-color: #fff; - --bg-color2: #fff; - --bg-color3: #fff; - --bg-code: #eef3f4; - --bg-code-inline: #eef3f4; - --text-color: #001e26; - --text-color-code: #eef3f4; - --text-color-code-inline: #006580; - --bg-language: #22272b; - --bg-warning: #fff5e7; - --bg-tip: #ecf7f3; - --link-color: #d22630; - --bg-danger: #ffebee; -} - -@media (prefers-color-scheme: dark) { - :root { - --bg-color: #25272a; - --color-white: #fff; - --text-color: #eee; - --bg-border: #444; - --text-color-code: #eee; - --text-color-code-inline: #eee; - --bg-color2: #000; - --bg-color3: #444; - --bg-code: #000; - --bg-code-inline: #444; - --bg-language: #000; - --bg-warning: #000; - --bg-tip: #000; - --link-color: #f54b49; - --bg-danger: #000; - } -} - -:root.dark { ---bg-color: #25272a; ---color-white: #fff; ---bg-border: #444; ---text-color: #eee; ---text-color-code: #eee; ---text-color-code-inline: #eee; ---bg-color2: #000; ---bg-color3: #444; ---bg-code: #000; ---bg-code-inline: #444; ---bg-language: #000; ---bg-warning: #000; ---bg-tip: #000; ---link-color: #f54b49; ---bg-danger: #000; -} - -html, body, header, .navbar .links, .dropdown-wrapper .nav-dropdown, .sidebar, -.content-sidebar-wrapper, .suggestions { - background-color: var(--bg-color) !important; -} - -h1, h2, h3, h4, strong, .navbar .site-name, .dropdown-wrapper .dropdown-title, .nav-links a, -body, .sidebar-heading, a.sidebar-link, a.content-sidebar-link, .suggestions a span { - color: var(--text-color) !important; -} - -.sidebar-heading span { - pointer-events: none; -} - -.suggestions .suggestion.focused, .suggestions .suggestion.focus { - background-color: var(--bg-color3) !important; -} - -.content code { - background-color: var(--bg-code-inline) !important; - color: var(--text-color-code-inline) !important; -} - -.content code a { - color: var(--text-color) !important; -} - -.navbar, .sidebar, .content-sidebar, .content-sidebar-links, -.dropdown-wrapper .nav-dropdown, .suggestions { - border-color: var(--bg-border) !important; -} - -.dropdown-wrapper .nav-dropdown .dropdown-item h4 { -border-color: var(--bg-border) !important; -} - -.docs-card { - background-color: var(--bg-color2) !important; - header { - background: transparent !important; - } -} - -.custom-block.warning { - background-color: var(--bg-tip) !important; -} - -.custom-block.tip { - background-color: var(--bg-tip) !important; -} - -.custom-block.danger { - background-color: var(--bg-danger) !important; -} - -div[class*="language-"], div[class*="language-"] code { - background-color: var(--bg-language) !important; - color: var(--text-color-code) !important; -} - -a { - color: var(--link-color) !important; -} - -.home .hero .action-button { - color: var(--color-white) !important; -} - -.page ol { - list-style: inherit; -} - -ol li { - margin-bottom: 1rem; -} - -.faq h2 { - font-size: 1.5rem; - margin-top: 70px; - line-height: 1.8rem; -} - -.parameter-table { - table-layout: fixed; -} - -.parameter-table thead th:first-child { - width: 20%; -} - -.main-docs-wrapper .content:not(.custom) { - max-width: 1024px; -} diff --git a/docs/.vuepress/styles/palette.styl b/docs/.vuepress/styles/palette.styl deleted file mode 100644 index e5334fa64a3..00000000000 --- a/docs/.vuepress/styles/palette.styl +++ /dev/null @@ -1 +0,0 @@ -$contentWidth = 900px diff --git a/docs/api/README.md b/docs/api/README.md deleted file mode 100644 index b532aee0998..00000000000 --- a/docs/api/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# API Reference - -Welcome to the API documentation for Titanium SDK! - -## Titanium - -Titanium SDK provides a root namespace object, [Titanium](/api/titanium/) as the base/root for the APIs. -This object is also frequently accessed by its alias, `Ti`. - -``` js -const button = Titanium.UI.createButton({ title: 'Send' }); -// `Ti` convenience shorthand -const win = Ti.UI.createWindow({ title: 'Home' }); -``` - -You'll find all APIs arranged under this root namespace. Browse the full list of available APIs via the sidebar to the left or check out the most frequently used ones in the groups below. - - - -## Modules - -Titanium SDK also has a concept of [Native Modules](/api/modules/) - these are 1st and 3rd-party APIs that may be added on/imported. - -Some of these modules get shipped with the SDK, but must be opted-in to be used in your app. Others you may need to download and install into your app or in your Titanium SDK global modules directory. - -You opt-in to use of a module per-app by adding a reference to the module in your tiapp.xml file: - -``` xml - - - ti.map - - -``` - -## Globals - -In addition to the root `Titanium` namespace hanging off the `global`, we also supplement the global object with additional APIs/extensions commonly used on Node.JS and on the web. - -Most notable: - -- [console](/api/global/console) - a Node.JS and Web-compatible implementation of the `console` object, used primarly for logging. -- [global](/api/global) - The global object is hung off of itself to allow for typical explicit access, i.e. `global.console`. diff --git a/docs/api/api.json b/docs/api/api.json deleted file mode 100644 index cd5f12b158c..00000000000 --- a/docs/api/api.json +++ /dev/null @@ -1,353867 +0,0 @@ -{ - "Titanium.Proxy": { - "name": "Titanium.Proxy", - "summary": "The base for all Titanium objects.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Proxy.yml", - "description": "On platforms that use native code (Android and iOS), the `Proxy` type represents a\nJavaScript wrapper or _proxy_ around a native object. Setting or getting a property\non a proxy object results in a method invocation on the native object. Likewise,\ncalling a method on the proxy object results in a method invocation on the native\nobject.\n\nSome Titanium objects are _createable_: new instances of these objects can be created using\nfactory methods. For example, a [Window](Titanium.UI.Window) object can be created using the\n method.\n\nIn general, developers should avoid modifying the prototype of a Titanium object, or\nadding methods to a Titanium object. (Adding a simple property such as an ID value is\ngenerally OK.)\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Module": { - "name": "Titanium.Module", - "summary": "Base type for all Titanium modules.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Module.yml", - "description": "A Titanium module is a non-createable Titanium object that is exposed through the\nglobal Titanium object.\n\nFor example, the module provides constants and factory methods related\nto UI objects, as well as a few UI-related properties that are not related to a\nspecific object.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ] - }, - "Titanium.UI.View": { - "name": "Titanium.UI.View", - "summary": "An empty drawing surface or container", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/View.yml", - "description": "The `View` is the base type for all UI widgets in Titanium.\n\nYou use the method or **``** Alloy element to create a View.\n\n#### Units and Coordinates\n\nSizes and coordinates can be specified using a variety of units. If a value is\nspecified as a number, it is interpreted as a value in the default unit for the\ncurrent system and/or the current project.\n\nWhen a value is specified as string, the value can consist of:\n\n* A number.\n* A percentage, such as \"10%\", interpreted as a percentage of the parent's total size\n in that dimension.\n* A number plus a unit specifier, such as \"10px\" or \"1in\".\n\nThe following units are supported:\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
UnitSpecifierNote
pixelspx
density-independent pixelsdipEquivalent to Apple \"points.\"
inchesin
millimetersmmAndroid, iOS only
centimeterscmAndroid, iOS only
pointsptTypographical points of 1/72 of an inch. On Android, you can specify sizes and coordinates in typographical points. On other platforms, this unit is only used to specify font sizes. Not to be confused with Apple \"points.\"
\n\nThe interpretation of the density-independent pixel (DIP) varies by platform:\n\n* On Android, one DIP corresponds to one pixel on a 160DPI\n display.\n\n* On iOS, one DIP corresponds to one pixel on a non-Retina display, which\n is 163DPI for iPhone/iPod touch and 132DPI for the iPad. A DIP\n corresponds to 2 pixels of width or height on a Retina display.\n\nThe absolute measures, such as inches, are dependent on the device correctly reporting\nits density.\n\nIf no units are specified, a system-default unit is assumed. The system default unit is:\n\n* Pixels on Android.\n* DIPs on iOS.\n\nOn Android and iOS, the default unit can be overridden on a per-application level by setting the\n`ti.ui.defaultunit` property in `tiapp.xml`. For example, to use DIPs as the\ndefault on all platforms, set `defaultunit` to `dip`:\n\n``` xml\ndip\n```\n\nThe value for `ti.ui.defaultunit` can be any of the unit specifiers defined above, or\n`system` to specify that the platform's default unit should be used.\n\nOn iOS if you set the `ti.ui.defaultunit` property to anything other than `system` or `dip`, your\napplication should detect and handle Retina displays manually.\n\nFont sizes on iOS are treated differently than other sizes: font sizes are always\nspecified in typographical points.\n\nFor more details see:\n\n* [UI Composite Layout Spec](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n\n#### Size and Position\n\nTitanium views are positioned using the `left`, `right`, `top,` `bottom` and `center`\nproperties, and sized using the `width` and `height` properties. These are\ninput properties, set by the user to specify layout, and not modified by the\nsystem to indicate actual calculated positions and sizes.\n\nThe [height](Titanium.UI.View.height) and [width](Titanium.UI.View.width) properties\naccept several special values:\n\n* specifies that the view should fill the parent in this\n dimension.\n* specifies that the view should adjust this size to fit its\n contents, such as a label's text or a view's children.\n* 'auto' specifies that the view should choose either `FILL` or `SIZE` behavior.\n The use of `auto` is deprecated, and should be replaced with the SIZE or FILL constants if it is necessary to set the view's behavior explicitly.\n\nSizes and positions can also be specified as a percentage of the parent's size, for\nexample, `50%`.\n\nHow these properties are interpreted depends on the value of the view's `layout`\nproperty. See the description of the [layout](Titanium.UI.View.layout) property\nfor details.\n\nThe [rect](Titanium.UI.View.rect) property is a read-only dictionary\nwith the properties `x`, `y`, `width` and `height`. It provides the *rendered*\nsize and position of the view, and is only available once both it and its ancestors have been\nfully drawn.\n\nThe [size](Titanium.UI.View.size) property is a read-only dictionary\nwith the properties `x`, `y`, `width` and `height`. It provides the *rendered* size\n of the view, and is only available once both it and its ancestors have been\nfully drawn.\n\nTo determine whether the `size` and `rect` values are available, add an event listener\nfor the [postlayout](Titanium.UI.View.postlayout) event, which is fired at the end of\na layout cycle.\n\n#### Accessibility\n\nFour accessibility-related view properties are available in Titanium Mobile for iOS\nand Android:\n\n* \n* \n* \n* \n\nThe first three, `accessibilityLabel`, `accessibilityValue` and `accessibilityHint`, are for setting text\nthat will be relayed to the user by the assistive service (such as TalkBack on Android or VoiceOver\non iOS). On iOS, Titanium will then take these values and set the native properties\nof the same name which are defined in the [UIAccessibilityProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, Titanium takes the three values and concatenates them in the order `accessibilityLabel`,\n`accessibilityValue`, and `accessibilityHint`, and then uses the result to set the native view's\n[`contentDescription`](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29)\nproperty.\n\nYou are not required to set all three properties: feel free to set just one or two as needed and\nexperiment with the results by turning on VoiceOver (iOS) or TalkBack (Android) on your test device.\n\nThe fourth property, `accessibilityHidden`, when set to `true`, indicates that the view can be ignored\nby the assistive service. In iOS this sets the similarly-named\n[accessibilityElementsHidden](https://developer.apple.com/documentation/objectivec/nsobject/1615080-accessibilityelementshidden)\nnative property.\n\nIn Android `accessibilityHidden` calls the native [View.setImportantForAccessibility(boolean)](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29) method, passing `false` when\nthis property is set to `true` (i.e., \"hidden\" means it's not important). However, the\nnative `setImportantForAccessibility` method is available only on devices running\nAndroid 4.1 (API level 16/Jelly Bean) or later. On earlier versions of Android, this\nproperty is ignored.\n\nNo error will occur on older devices if you set `accessibilityHidden`; the value will simply be ignored.\n\n#### iOS: backgroundLeftCap and backgroundTopCap properties\n\nThe [backgroundLeftCap](Titanium.UI.View.backgroundLeftCap) and [backgroundTopCap](Titanium.UI.View.backgroundTopCap) properties are\nused to specify the portions of the [backgroundImage](Titanium.UI.View.backgroundImage) that must not be resized when the image is stretched or shrunk.\n\nGiven an image of width `w` and height `h`, the stretchable portion on the image is defined as a rectangle with the `top-left` point set to\n`(backgroundLeftCap , backgroundTopCap)` and the `bottom-right` point set to `(w - backgroundLeftCap , h - backgroundTopCap)`. The portions not covered by\nthe stretchable portion keep their original size and appearance.\n\nFor best results on ImageView set up the `backgroundLeftCap` and `backgroundTopCap` properties such that the stretchable portion is always a 1x1 box.\n\n#### iOS Clipping Behavior\n\nFour view related properties are available in Titanium Mobile for iOS.\n\n* \n* \n* \n* \n\nThe first three, `viewShadowColor`, `viewShadowRadius` and `viewShadowOffset` control the shadow associated with the view.\nThe shadow of the view is drawn using a rounded rectangle with the arc radius set to the `borderRadius` property.\n\nThe `clipMode` property lets the user control the clipping behavior of the View.\nSetting this to enforces all child views to be clipped to this views bounds.\nSetting this to allows child views to be drawn outside the bounds of this view.\nWhen set to or when this property is not set, clipping behavior is defined by the following rules applied in order.\n\n* If the `viewShadowColor` is defined to be a color with alpha > 0, clipping is disabled.\n* If the `borderWidth` or `borderRadius` of the view is set to a value > 0, clipping is enabled.\n* If the view has one or more `children` clipping is enabled.\n* If none of the conditions are met, clipping is disabled.\n\nIn earlier versions of Titanium Mobile, views had clipping enabled by default.\n\n#### iOS Animation on shadow associated with view\n\nIf `borderRadius` property has multiple values, animation on shadow associated with the view will not work.\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "focus", - "summary": "Fired when the view element gains focus.", - "description": "This event only fires when using the trackball to navigate.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ] - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longclick", - "summary": "Fired when the device detects a long click.", - "description": "A long click is generated by touching and holding on the touchscreen or holding down the\ntrackball button.\n\nThe event occurs before the finger/button is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nAs the trackball can fire this event, it is not intended to return the `x` and `y`\ncoordinates of the touch, even when it is generated by the touchscreen.\n\nA `longclick` blocks a `click`, meaning that a `click` event will not fire when a\n`longclick` listener exists.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ] - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "pinch", - "summary": "Fired when the device detects a pinch gesture.", - "description": "A pinch is a touch and expand or contract\nwith two fingers. The event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - }, - { - "since": "1.8.0", - "name": "iphone" - }, - { - "since": "1.8.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "scale", - "summary": "The scale factor relative to the points of the two touches in screen coordinates.", - "type": "Number" - }, - { - "name": "velocity", - "summary": "The velocity of the pinch in scale factor per second.", - "type": "Number" - }, - { - "name": "time", - "summary": "The event time of the current event being processed.", - "type": "Number" - }, - { - "name": "timeDelta", - "summary": "The time difference in milliseconds between the previous accepted scaling event and the\ncurrent scaling event.\n", - "type": "Number" - }, - { - "name": "currentSpan", - "summary": "The average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanX", - "summary": "The average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanY", - "summary": "The average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpan", - "summary": "The previous average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanX", - "summary": "The previous average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanY", - "summary": "The previous average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "focusX", - "summary": "The X coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "focusY", - "summary": "The Y coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "inProgress", - "summary": "Returns `true` if a scale gesture is in progress, `false` otherwise.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "12.7.0", - "name": "iphone" - }, - { - "since": "12.7.0", - "name": "ipad" - }, - { - "since": "12.7.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the single tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch\nevents, so this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "twofingertap", - "summary": "Fired when the device detects a two-finger tap against the view.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Round View Example", - "code": "Create a rounded view.\n\n``` js\nconst window = Ti.UI.createWindow();\nvar view = Titanium.UI.createView({\n borderRadius:10,\n backgroundColor:'red',\n width:50,\n height:50\n});\nwindow.add(view);\nwindow.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous example as an Alloy view.\n\n``` xml\n\n \n \n \n\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Adds a child to this view's hierarchy.", - "description": "The child view is added as the last child in this view's hierarchy.\n\nAlthough all views inherit from , not all views are capable of\ncontaining other views. In particular:\n\n* Some views are not designed to be containers at all.\n* Some views are special-purpose containers that can only contain certain other\n views.\n* Some views are top-level containers that cannot (or should not) be added to other views.\n\n#### Non-Container Views\n\nThe following views are not intended to act as containers that can hold other\nviews:\n\n* [ActivityIndicator](Titanium.UI.ActivityIndicator)\n* [Button](Titanium.UI.Button)\n* [ImageView](Titanium.UI.ImageView)\n* [Label](Titanium.UI.Label)\n* [ProgressBar](Titanium.UI.ProgressBar)\n* [SearchBar](Titanium.UI.SearchBar)\n* [Slider](Titanium.UI.Slider)\n* [Switch](Titanium.UI.Switch)\n* [TableView](Titanium.UI.TableView)\n* [TextArea](Titanium.UI.TextArea)\n* [TextField](Titanium.UI.TextField)\n* [WebView](Titanium.UI.WebView)\n\nAdding children to the these views _may_ be supported on some platforms,\nbut is not guaranteed to work across platforms. Where it is supported, it may not\nwork as expected.\n\nFor maximum portability, these views should be treated as if they do not support children.\nInstead of adding children to these views, applications can position other views as\nsiblings. For example, instead of adding a button as a child of a `WebView`, you can add\nthe button to the web view's parent such that it appears on top of the web view.\n\n#### Special-Purpose Containers\n\nA few view objects act as special-purpose containers--that is, they only manage\ncertain types of children, and many of them support a special means of adding\nthese children, instead of the general `add` method. These containers include:\n\n* [ButtonBar](Titanium.UI.ButtonBar) and [TabbedBar](Titanium.UI.iOS.TabbedBar) are designed\n to hold their own internally-created buttons, assigned by adding strings to the \"labels\" array.\n Views added using the `add` method are displayed on top of these buttons.\n\n* [Picker](Titanium.UI.Picker). Can only hold `PickerRows` and `PickerColumns`, which\n are added using the `add` method. Adding other types of views to a `Picker` is not\n supported.\n\n* [TableView](Titanium.UI.TableView) is a specialized container for\n `TableViewSection` and `TableViewRow` objects. These objects must be\n added using the properties and methods that `TableView` provides\n for adding and removing sections and rows.\n\n On some platforms, it is possible to add arbitrary child views to a table view\n using the `add` method. However, this is not guaranteed to work on all platforms,\n and in general, should be avoided.\n\n* [TableViewSection](Titanium.UI.TableViewSection) is a specialized container\n for `TableViewRow` objects, which _are_ added using the `add` method. The `add` method\n on `TableViewSection` can only be used to add `TableViewRow` objects.\n\n* [Toolbar](Titanium.UI.iOS.Toolbar) is designed to hold buttons and certain\n other controls, added to its `items` array. Views added using the `add` method are\n displayed on top of the controls in the `items` array.\n\n* The `Tab`, `TabGroup`, `NavigationWindow` and `SplitWindow` objects are\n special containers that manage windows. These are discussed in the\n \"Top-Level Containers\" section.\n\n\n#### Top-Level Containers\n\nThere are certain top-level containers that are not intended to be added\nas the children of other views. These top-level containers include\n, , ,\nand . Other types of views must be added\nto a top-level container in order to be displayed on screen.\n\nThe special containers ,\n, , and\n manage windows.\nThese managed windows may be referred to as *children* of the\ncontainer, but they are not added using the `add` method.\n\n`Tab` is another kind of special container: it is not itself a top-level container,\nbut can only be used within a `TabGroup`. You cannot `add` a `Tab` to an arbitrary\ncontainer.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "view", - "summary": "View to add to this view's hierarchy.\n\nYou may pass an array of views, e.g. `view.add([subview1, subview2]`.\n", - "type": [ - "Titanium.UI.View", - "Array" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "animate", - "summary": "Animates this view.", - "description": "The [Animation](Titanium.UI.Animation) object or dictionary passed to this method defines\nthe end state for the animation, the duration of the animation, and other properties.\n\nNote that on SDKs older than 9.1.0 - if you use `animate` to move a view, the view's actual *position* is changed, but\nits layout properties, such as `top`, `left`, `center` and so on are not changed--these\nreflect the original values set by the user, not the actual position of the view.\n\nAs of SDK 9.1.0, the final values of the animation will be set on the view just before the `complete` event and/or the callback is fired.\n\nThe [rect](Titanium.UI.View.rect) property can be used to determine the actual size and\nposition of the view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "animation", - "summary": "Either a dictionary of animation properties or an\n[Animation](Titanium.UI.Animation) object.\n", - "type": [ - "Titanium.UI.Animation", - "Dictionary" - ] - }, - { - "name": "callback", - "summary": "Function to be invoked upon completion of the animation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearMotionEffects", - "summary": "Removes all previously added motion effects.", - "description": "Use this method together with and .", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "remove", - "summary": "Removes a child view from this view's hierarchy.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "view", - "summary": "View to remove from this view's hierarchy.", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllChildren", - "summary": "Removes all child views from this view's hierarchy.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "toImage", - "summary": "Returns an image of the rendered view, as a Blob.", - "description": "The `honorScaleFactor` argument is only supported on iOS.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to be invoked upon completion. If non-null, this method will be performed\nasynchronously. If null, it will be performed immediately.\n", - "type": "Callback", - "optional": true - }, - { - "name": "honorScaleFactor", - "summary": "Determines whether the image is scaled based on scale factor of main screen. (iOS only)\n\nWhen set to true, image is scale factor is honored. When set to false, the image in the\nblob has the same dimensions for retina and non-retina devices.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "convertPointToView", - "summary": "Translates a point from this view's coordinate system to another view's coordinate system.\n", - "description": "Returns `null` if either view is not in the view hierarchy.\n\nKeep in mind that views may be removed from the view hierarchy if their window is blurred\nor if the view is offscreen (such as in some situations with ).\n\nIf this view is a , the view's x and y offsets are subtracted from\nthe return value.\n", - "platforms": [ - { - "since": "1.8", - "name": "android" - }, - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "point", - "summary": "A point in this view's coordinate system.\n\nIf this argument is missing an `x` or `y` property, or the properties can not be\nconverted into numbers, an exception will be raised.\n", - "type": "Point" - }, - { - "name": "destinationView", - "summary": "View that specifies the destination coordinate system to convert to. If this argument\nis not a view, an exception will be raised.\n", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "Point" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHidden", - "summary": "Whether the view should be \"hidden\" from (i.e., ignored by) the accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityElementsHidden` property defined in the\n[UIAccessibility\nProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\n\nOn Android, setting `accessibilityHidden` calls the native\n[View.setImportantForAccessibility](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29)\nmethod. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and\nlater; if this property is specified on earlier versions of Android, it is ignored.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "On iOS this is a direct analog of the `accessibilityHint` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityLabel` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to Title or label of the control.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityValue` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to State or value of the control.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on iOS only. For Android, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nSee the \"Using an anchorPoint\" example in for a demonstration.\nThe default is center of this view.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Point" - }, - { - "name": "animatedCenter", - "summary": "Current position of the view during an animation.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Point", - "permission": "read-only" - }, - { - "name": "backgroundColor", - "summary": "Background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of . Defaults to `Transparent`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundDisabledColor", - "summary": "Disabled background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundDisabledImage", - "summary": "Disabled background image for the view, specified as a local file path or URL.", - "description": "If `backgroundDisabledImage` is undefined, and the normal background image`backgroundImage`\nis set, the normal image is used when this view is disabled.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundFocusedColor", - "summary": "Focused background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nFor normal views, the focused color is only used if `focusable` is `true`.\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundFocusedImage", - "summary": "Focused background image for the view, specified as a local file path or URL.", - "description": "For normal views, the focused background is only used if `focusable` is `true`.\nIf `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage`\nis set, the normal image is used when this view is focused.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundGradient", - "summary": "A background gradient for the view.", - "description": "A gradient can be defined as either linear or radial. A linear gradient varies continuously\nalong a line between the `startPoint` and `endPoint`.\n\nA radial gradient is interpolated between two circles, defined by `startPoint` and\n`startRadius` and `endPoint` and `endRadius` respectively.\n\nThe start points, end points and radius values can be defined in device units, in the view's\ncoordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center\npoint of the view can be specified as:\n\n``` js\n{ x: 30, y: 30 }\n```\n\nOr:\n``` js\n{ x: '50%', y: '50%' }\n```\n\nWhen specifying multiple colors, you can specify an *offset* value for each color, defining\nhow far into the gradient it takes effect. For example, the following color array specifies\na gradient that goes from red to blue back to red:\n\n``` js\ncolors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]\n```\n\nAndroid's linear gradients ignores `backfillStart` and `backfillEnd`, treating them as if\nthey are true. Android's radial gradients ignore the `endPoint` property.\nDefaults to no gradient.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Linear and Radial Gradients", - "code": "The following code excerpt creates two views, one with a linear gradient and one with\na radial gradient.\n\n``` js\nvar win1 = Titanium.UI.createWindow({\n title:'Tab 1',\n backgroundColor:'#fff',\n layout: 'vertical'\n});\n\nvar radialGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'radial',\n startPoint: { x: 50, y: 50 },\n endPoint: { x: 50, y: 50 },\n colors: [ 'red', 'blue'],\n startRadius: 50,\n endRadius: 0,\n backfillStart: true\n }\n});\nvar linearGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'linear',\n startPoint: { x: '0%', y: '50%' },\n endPoint: { x: '100%', y: '50%' },\n colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],\n }\n});\nwin1.add(radialGradient);\nwin1.add(linearGradient);\nwin1.open();\n```\n" - } - ], - "type": "Gradient" - }, - { - "name": "backgroundImage", - "summary": "Background image for the view, specified as a local file path or URL.", - "description": "Default behavior when `backgroundImage` is unspecified depends on the type of view and the platform.\nFor generic views, no image is used. For most controls (buttons, textfields, and so on), platform-specific default images are used.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "backgroundRepeat", - "summary": "Determines whether to tile a background across a view.", - "description": "Setting this to `true` makes the set `backgroundImage` repeat across the view as a series\nof tiles. The tiling begins in the upper-left corner, where the upper-left corner of the\nbackground image is rendered. The image is then tiled to fill the available space of the\nview.\n\nNote that setting this to `true` may incur performance penalties for large views or\nbackground images, as the tiling must be redone whenever a view is resized.\n\nOn iOS, the following views do not currently support tiled backgrounds:\n\n* \n* \n* \n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "backgroundLeftCap", - "summary": "Size of the left end cap.", - "description": "See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in .\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0" - }, - { - "name": "backgroundSelectedColor", - "summary": "Selected background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to transparent, so the background color of this view will be used.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "13.1.0", - "name": "iphone" - }, - { - "since": "13.1.0", - "name": "ipad" - }, - { - "since": "13.1.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundSelectedImage", - "summary": "Selected background image URL for the view, specified as a local file path or URL.", - "description": "For normal views, the selected background is only used if `focusable` is `true`.\n\nIf `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set\nthe normal image is used when this view is selected.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundTopCap", - "summary": "Size of the top end cap.", - "description": "See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in .\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0" - }, - { - "name": "borderColor", - "summary": "Border color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nDefaults to the normal background color of this view (Android), black (iOS).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "borderRadius", - "summary": "Radius for the rounded corners of the view's border.", - "description": "Each corner is rounded using an arc of a circle.\nValues for each corner can be specified. For example, '20px 20px' will set both left and right corners to `20px`.\nSpecifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.\n\nIf you have issues with dark artifacts on Android you can try to disable Hardware acceleration by setting a\n`backgroundColor` with a small amount of transparency: `backgroundColor:\"rgba(255,255,255,254)\"`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String", - "Array", - "Array" - ], - "default": 0 - }, - { - "name": "borderWidth", - "summary": "Border width of the view.", - "description": "If [borderColor](Titanium.UI.View.borderColor) is set without [borderWidth](Titanium.UI.View.borderWidth), this value\nwill be changed to 1 of the unit declared as 'ti.ui.defaultunit' in tiapp.xml descriptor.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "center", - "summary": "View's center position, in the parent view's coordinates.", - "description": "This is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Point" - }, - { - "name": "children", - "summary": "Array of this view's child views.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "clipMode", - "summary": "View's clipping behavior.", - "description": "Setting this to enforces all child views to be clipped to this views bounds.\nSetting this to allows child views to be drawn outside the bounds of this view.\nWhen set to or when this property is not set, clipping behavior is inferred.\nSee section on iOS Clipping Behavior in .\n\nDefaults to `undefined`. Behaves as if set to .\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "focusable", - "summary": "Whether view should be focusable while navigating with the trackball.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "horizontalMotionEffect", - "summary": "Adds a horizontal parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "MinMaxOptions" - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "layout", - "summary": "Specifies how the view positions its children.\nOne of: 'composite', 'vertical', or 'horizontal'.\n", - "description": "There are three layout options:\n\n* `composite` (or `absolute`). Default layout. A child view is positioned based on its\n positioning properties or \"pins\" (`top`, `bottom`, `left`, `right` and `center`).\n If no positioning properties are specified, the child is centered.\n\n The child is always sized based on its `width` and `height` properties, if these are\n specified. If the child's height or width is *not* specified explicitly, it may be\n calculated implicitly from the positioning properties. For example, if both `left` and\n `center.x` are specified, they can be used to calculate the width of the child control.\n\n Because the size and position properties can conflict, there is a specific precedence\n order for the layout properties. For vertical positioning, the precedence\n order is: `height`, `top`, `center.y`, `bottom`.\n\n The following table summarizes the various combinations of properties that can\n be used for vertical positioning, in order from highest precedence to lowest.\n (For example, if `height`, `center.y` and `bottom` are all specified, the\n `height` and `center.y` values take precedence.)\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScenarioBehavior
height & top specified\n Child positioned top unit from parent's top, using specified height;\n any center.y and bottom values are ignored.\n
height & center.y specified\n Child positioned with center at center.y, using specified height;\n any bottom value is ignored.\n
height & bottom specifiedChild positioned bottom units from parent's bottom, using specified height.
top & center.y specified\n Child positioned with top edge top units from parent's top and center at\n center.y. Height is determined implicitly; any bottom value is ignored.\n
top & bottom specified\n Child positioned with top edge top units from parent's top and bottom edge\n bottom units from parent's bottom. Height is determined implicitly.\n
Only top specified\n Child positioned top units from parent's top, and uses the default height\n calculation for the view type.\n
center.y and bottom specified\n Child positioned with center at center.y and bottom edge bottom\n units from parent's bottom. Height is determined implicitly.\n
Only center.y specifiedChild positioned with center at center.y, and uses the default height calculation for the view type.
Only bottom specifiedChild positioned with bottom edge bottom units from parent's bottom, and uses the default height calculation for the view type.
height, top, center.y, and bottom unspecifiedChild entered vertically in the parent and uses the default height calculation for the child view type.
\n\n Horizontal positioning works like vertical positioning, except that the\n precedence is `width`, `left`, `center.x`, `right`.\n\n For complete details on composite layout rules, see\n [Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n in the Titanium Mobile Guides.\n\n * `vertical`. Children are laid out vertically from top to bottom. The first child\n is laid out `top` units from its parent's bounding box. Each subsequent child is\n laid out below the previous child. The space between children is equal to the\n upper child's `bottom` value plus the lower child's `top` value.\n\n Each child is positioned horizontally as in the composite layout mode.\n\n * `horizontal`. Horizontal layouts have different behavior depending on whether wrapping\n is enabled. Wrapping is enabled by default (the `horizontalWrap` property is `true`).\n\n With wrapping behavior, the children are laid out horizontally from left to right,\n _in rows_. If a child requires more horizontal space than exists in the current row,\n it is wrapped to a new row. The height of each row is equal to the maximum height of\n the children in that row.\n\n Wrapping behavior is available on iOS and Android. When the `horizontalWrap` property is\n set to true, the first row is placed at the top of the parent view, and successive rows\n are placed below the first row. Each child is positioned vertically _within its row_ somewhat\n like composite layout mode. In particular:\n\n * If neither `top` or `bottom` is specified, the child is centered in the\n row.\n * If either `top` or `bottom` is specified, the child is aligned to either\n the top or bottom of the row, with the specified amount of padding.\n * If *both* `top` and `bottom` is specified for a given child, the properties\n are both treated as padding.\n\n If the `horizontalWrap` property is false, the behavior is more equivalent to a vertical layout.\n Children are laid or horizontally from left to right in a single row. The `left` and\n `right` properties are used as padding between the children, and the `top` and `bottom`\n properties are used to position the children vertically.\n\n Defaults to Composite layout.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "opacity", - "summary": "Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque).", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "overrideCurrentAnimation", - "summary": "When on, animate call overrides current animation if applicable.", - "description": "If this property is set to false, the animate call is ignored if the view is currently being animated.\n\nDefaults to `undefined` but behaves as false\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation" - }, - { - "name": "pullBackgroundColor", - "summary": "Background color of the wrapper view when this view is used as either or .\n\nDefaults to `undefined`. Results in a light grey background color on the wrapper view.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "previewContext", - "summary": "The preview context used in the 3D-Touch feature \"Peek and Pop\".", - "description": "Preview context to present the \"Peek and Pop\" of a view. Use an configured instance\nof here.\n\nNote: This property can only be used on devices running iOS 9 or later and supporting 3D-Touch.\nIt is ignored on older devices and can manually be checked using .\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - } - ], - "type": "Titanium.UI.iOS.PreviewContext" - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "rect", - "summary": "The bounding box of the view relative to its parent, in system units.\n", - "description": "The view's bounding box is defined by its size and position.\n\nThe view's size is `rect.width` x `rect.height`. The view's top-left position relative to\nits parent is (`rect.x` , `rect.y`).\n\nOn Android it will also return `rect.absoluteX` and 'rect.absoluteY' which are relative to\nthe main window.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "DimensionWithAbsolutes", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "12.3.0", - "name": "iphone" - }, - { - "since": "12.3.0", - "name": "ipad" - } - ], - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "size", - "summary": "The size of the view in system units.\n", - "description": "Although property returns a dictionary, only the `width` and `height`\nproperties are valid. The position properties--`x` and `y`--are always 0.\n\nTo find the position _and_ size of the view, use the [rect](Titanium.UI.View.rect)\nproperty instead.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dimension", - "permission": "read-only" - }, - { - "name": "softKeyboardOnFocus", - "summary": "Determines keyboard behavior when this view is focused. Defaults to .", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS" - ] - }, - { - "name": "tintColor", - "summary": "The view's tintColor", - "description": "This property is a direct correspondent of the tintColor property of UIView on iOS. If no value is specified,\nthe tintColor of the View is inherited from its superview.\n", - "platforms": [ - { - "since": "3.1.3", - "name": "iphone" - }, - { - "since": "3.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ], - "default": null - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - }, - { - "since": "12.1.0", - "name": "iphone" - }, - { - "since": "12.1.0", - "name": "ipad" - }, - { - "since": "12.1.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchEnabled", - "summary": "Determines whether view should receive touch events.", - "description": "If false, will forward the events to peers.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the view.", - "description": "Android only supports Matrix2D transforms.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ], - "default": "Identity matrix" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "verticalMotionEffect", - "summary": "Adds a vertical parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "MinMaxOptions" - }, - { - "name": "viewShadowRadius", - "summary": "Determines the blur radius used to create the shadow.", - "description": "Defaults to `undefined`. Behaves as if set to 3. Accepts density units as of 10.0.1.", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "viewShadowColor", - "summary": "Determines the color of the shadow.", - "description": "iOS Defaults to `undefined`. Behaves as if transparent. Android default is black.\nOn Android you can set `0.5` and\n`0.5` in your theme to change the\nopacity.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "viewShadowOffset", - "summary": "Determines the offset for the shadow of the view.", - "description": "Defaults to `undefined`. Behaves as if set to (0,-3)", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Point" - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "width", - "summary": "View's width, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "horizontalWrap", - "summary": "Determines whether the layout has wrapping behavior.", - "description": "For more information, see the discussion of horizontal layout mode in the description of\nthe [layout](Titanium.UI.View.layout) property.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "zIndex", - "summary": "Z-index stack order position, relative to other sibling views.", - "description": "A view does not have a default z-index value, meaning that it is undefined by default.\nWhen this property is explicitly set, regardless of its value, it causes the view to be\npositioned in front of any sibling that has an undefined z-index.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "keepScreenOn", - "summary": "Determines whether to keep the device screen on.", - "description": "When `true` the screen will not power down. Note: enabling this feature will use more\npower, thereby adversely affecting run time when on battery.\nFor iOS look at [Titanium.App.idleTimerDisabled](Titanium.App.idleTimerDisabled).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Boolean", - "default": false - } - ], - "subtype": "proxy" - }, - "Global.Console": { - "name": "Global.Console", - "summary": "Console logging facilities.", - "extends": "Object", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Console/Console.yml", - "description": "The toplevel `console` support is intended to supplement \nand make it easier for developers to port existing JavaScript code\n(especially CommonJS modules) to Titanium.\n\nNote that `console` does not currently implement the complete\n[Console](https://developer.mozilla.org/de/docs/Web/API/Console) specification.\nSee the following supported methods for details and submit a pull request to add more!\n", - "methods": [ - { - "name": "log", - "summary": "Log a message at the `info` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n\nNote that this method has different behavior from ,\nwhich can take multiple arguments, but in doing so interprets the\nfirst argument as a custom log level.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "info", - "summary": "Log a message at the `info` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "warn", - "summary": "Log a message at the `warn` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "error", - "summary": "Log a message at the `error` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "debug", - "summary": "Log a message at the `debug` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "time", - "summary": "Start a timer to track duration of an operation.", - "description": "Begin a timer that can be used to track the duration of an operation.\nIf no label is passed to the function it will default to \"default\".\nIf a label already exists then the existing label will not be overwritten\nand a warning will be logged to the console.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "The label to track the timer by", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "timeEnd", - "summary": "Stop a timer that was previously started.", - "description": "Stop a timer that was started by calling [console.time](Global.Console.time), and\noutput the time since the timer was begun to the console in milliseconds.\nIf no timer exists a warning will be logged to the console.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "The label to track the timer by", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "timeLog", - "summary": "Log duration taken so far for an operation.", - "description": "Output the time since a timer was started by calling\n[console.time](Global.Console.time) to the console, as well as any\nother `data` arguments provided. To log extra data a label must\nbe provided. If no timer exists a warning will be logged to the\nconsole.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "The label to track the timer by", - "type": "String", - "optional": true - }, - { - "name": "data", - "summary": "Extra log data to be provided when logging, can be a single argument or any number of arguments.", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "trace", - "summary": "Log a message at the `trace` level.", - "description": "The message to log can either be a single argument, or any number\nof arguments, which will be converted to strings and then concatenated\ntogether with a space character.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "The message(s) to log.", - "type": "any", - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "count", - "summary": "Maintains an internal counter specific to `label` and outputs to stdout the number of times `console.count()` has been called with the given `label`.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "The display label for the counter", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "countReset", - "summary": "Resets the internal counter specific to `label`.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "The display label for the counter", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "assert", - "summary": "A simple assertion test that verifies whether value is truthy. If it is not, Assertion failed is logged. If provided, the error message is formatted using `util.format()` by passing along all message arguments. The output is used as the error message.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The value tested for being truthy.", - "type": "any", - "optional": true - }, - { - "name": "message", - "summary": "All arguments besides value are used as error message.", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "group", - "summary": "Increases indentation of subsequent lines by spaces for `groupIndentation` length.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "Labels to print before indentation (if provided)", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "groupCollapsed", - "summary": "Alias for `group()`", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "label", - "summary": "Labels to print before indentation (if provided)", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "groupEnd", - "summary": "Decreases indentation of subsequent lines by spaces for `groupIndentation` length.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ] - }, - "Global": { - "name": "Global", - "summary": "The APIs that reside in the global scope, which may be called without a namespace prefix.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Global.yml", - "description": "Titanium provides a number of global built-in objects, detailed below.\n\n#### String Utilities\n\nTitanium includes several extra utility functions for formatting text, attached to the\nglobal [String](Global.String) object.\n\n#### console\n\nTitanium provides [console](Global.Console) support familiar to many JavaScript developers\nfor logging at the toplevel, in addition to the [Titanium](Titanium.API) logging facilities.\n\n#### Timers\n\nTitanium has built-in support for one-off and repeating timers:\n\n* Use [setTimeout](Global.setTimeout) to start a one-off timer.\n* Use [setInterval](Global.setInterval) to start a repeating timer.\n\n#### Alert\n\nTitanium has a built-in convenience function [alert](Global.alert) which can be used as an alias\nfor the [AlertDialog](Titanium.UI.AlertDialog) module.\n\n#### Locale\n\nThe `L` macro can also be used as an alias for the method.\n", - "methods": [ - { - "name": "alert", - "summary": "Displays a pop-up alert dialog with the passed in `message`.", - "description": "This function is a shortcut for creating and displaying an\n[alert dialog](Titanium.UI.AlertDialog). For example, the following two statements produce\nthe same result.\n\n``` js\nalert('Danger, Will Robinson!');\n\nTi.UI.createAlertDialog({ message: 'Danger, Will Robinson!' }).show();\n```\n\nNote that unlike a web browser-based version of `alert`, the method is asynchronous. However,\nonly one alert dialog will be visible and modal at a time.\n\nBe aware that this method may be removed in the future.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Alert message.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearInterval", - "summary": "Cancels an interval timer.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "timerId", - "summary": "Unique timer identifier returned by [setInterval](Global.setInterval).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearTimeout", - "summary": "Cancels a one-time timer.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "timerId", - "summary": "Unique timer identifier returned by [setTimeout](Global.setTimeout).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "decodeURIComponent", - "summary": "Replaces each escape sequence in the specified string, created using the `encodedURI`\nmethod, with the character that it represents.\n", - "description": "For more information, see the MDN website for\n[encodeURIComponent](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent)\nand [decodeURIComponent](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/decodeURIComponent).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "encodedURI", - "summary": "Text that optionally contains encoded escape sequences.", - "type": "String" - } - ], - "returns": { - "summary": "Decoded string.", - "type": "String" - } - }, - { - "name": "encodeURIComponent", - "summary": "Replaces each special character in the specified string with the equivalent URI escape\nsequence. Useful for encoding URIs.\n", - "description": "For more information, see the MDN website for\n[encodeURIComponent](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/encodeURIComponent)\nand [decodeURIComponent](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/decodeURIComponent).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "string", - "summary": "Text that optionally contains special characters.", - "type": "String" - } - ], - "returns": { - "summary": "Encoded string.", - "type": "String" - } - }, - { - "name": "L", - "summary": "An alias for [Titanium.Locale.getString](Titanium.Locale.getString).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "key", - "summary": "Key used to lookup the localized string.", - "type": "String" - }, - { - "name": "hint", - "summary": "Text to return if `key` is not found.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "Localized string defined by `key`, or value of `hint` otherwise.", - "type": "String" - } - }, - { - "name": "require", - "summary": "Loads either a native Titanium module or a CommonJS module.", - "description": "The `require` function takes a module identifier as its argument and returns an object with\nreferences to the module's exported symbols.\n\n#### ES6+ Syntax\n\nUsing Titanium SDK 7.1.0 and later, you can also use the ES6+ [`import`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import) and [`export`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/export) syntax\nby enabling transpiling via the `true` property in your tiapp.xml\n\n#### Native Titanium Module\n\nTo load a native Titanium module:\n\n 1. Install the module to the project or copy it to the Titanium SDK home directory.\n 2. Add the module as a dependency to the project by modifying the `modules` section of the `tiapp.xml` file.\n 3. Initialize the module with the `require` method by passing the module ID to the method.\n\nFor detailed instructions, refer to\n[Using a Module](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Using_Modules/Using_a_Module.html).\n\n#### CommonJS Module\n\nTo load a local CommonJS module, place the CommonJS module in the `Resources` directory of\nyour project. Pass the `require` method the path to the file without the `Resources`\ndirectory, platform-specific directory and the `.js` extension.\n\nNote that the appropriate *platform-specific* `Resources` subdirectory is merged into the\nmain `Resources` directory at build time. For example, suppose the following files exist.\n\n* `Resources/app.js`\n* `Resources/ui/MainWindow.js`\n* `Resources/iphone/ui/TaskWindow.js`\n* `Resources/android/ui/TaskWindow.js`\n\nThe appropriate `TaskWindow.js` file is moved into the `Resources/ui` directory of the\nbuilt application. To include both the MainWindow module and the platform-specific\nTaskWindow module from any JavaScript file in the project:\n\n``` js\n// load main window module from ui subdirectory\nvar mainWindow = require('ui/MainWindow');\n\n// load platform-specific task window module\nvar taskWindow = require('ui/TaskWindow');\n```\n\nFor more information, see the official [CommonJS](http://requirejs.org/docs/commonjs.html) website.\n\n#### Alloy\n\nFor Alloy, place the CommonJS modules in the `app/lib` directory of your Alloy project,\nthen load the module with the `require` method without the `app/lib` path and `.js`\nextension.\n\nStarting with Alloy 1.5.0, you can add platform-specific directories to the `app/lib` directory.\nDo not include the platform-specific directory when referencing the CommonJS module.\n\nFor example, a module file `app/lib/android/myModule/module.js` may be loaded by\n`app/controllers/index.js` using:\n\n``` js\nrequire('myModule/module');\n```\n\n#### Android\n\nAdditionally, on Android, an absolute path to a module may be specified using a path\nseparator (`/`) at the beginning of the path.\n\nFor example, a module file `Resources/myModule/module.js` may be required by\n`Resources/example/example.js` using either of the following:\n\n``` js\nrequire('../myModule/module')\nrequire ('/myModule/module')\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Require a Native Module", - "code": "To load a native module with the ID `com.mycompany.module`:\n\n``` js\nvar module = require('com.mycompany.module');\n```\n" - }, - { - "description": "Require a JavaScript Module", - "code": "`myModule.js`:\n``` js\nexports.message = \"hello world\";\n```\n\n`app.js`:\n``` js\nvar myModule = require('myModule');\nalert(myModule.message);\n```\n" - } - ], - "parameters": [ - { - "name": "moduleId", - "summary": "Native module ID or local path to a JavaScript file *minus* the `.js` extension.", - "type": "String" - } - ], - "returns": { - "summary": "Exported `exports` object of the required module.", - "type": "any" - } - }, - { - "name": "setInterval", - "summary": "Executes a function repeatedly with a fixed time delay between each call to that function.", - "description": "Note that although the interval is not guaranteed to be exact, the interval between calls\nwill be no less than the specified delay.\n\nReturns a unique timer identifier that can be passed to [clearInterval](Global.clearInterval)\nto cancel this timer.\n\nFor more information, see the MDN website for\n[setInterval](https://developer.mozilla.org/en/DOM/window.setInterval).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Update a label once every second, and stop at 10 seconds", - "code": "``` js\nvar count = 0;\nvar timer = setInterval(function() {\n count++;\n label.text = 'count - ' + count;\n if (count == 10) {\n clearInterval(timer);\n }\n}, 1000);\n```\n" - } - ], - "parameters": [ - { - "name": "function", - "summary": "Function to call.", - "type": "Callback" - }, - { - "name": "delay", - "summary": "Time in milliseconds to wait between calls to function.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "Unique timer identifier.", - "type": "Number" - } - }, - { - "name": "setTimeout", - "summary": "Executes code or a function after a delay.", - "description": "Note that although the timeout is not guaranteed to be exact, the delay before the\nfunction is invoked will be no less than the specified delay.\n\nReturns a unique timer identifier that can be passed to [clearTimeout](Global.clearTimeout)\nto cancel this timer.\n\nFor more information, see the MDN website for\n[setTimeout](https://developer.mozilla.org/en/DOM/window.setTimeout).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Execute a function in 500 milliseconds", - "code": "``` js\nsetTimeout(function() {\n Ti.API.debug('Called using setTimeout');\n}, 500);\n```\n" - } - ], - "parameters": [ - { - "name": "function", - "summary": "Code or function to call.", - "type": "Callback" - }, - { - "name": "delay", - "summary": "Time in milliseconds to wait before the function is called.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "Unique timer identifier.", - "type": "Number" - } - } - ], - "properties": [ - { - "name": "OS_ANDROID", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value.", - "description": "This value is replaced by an injected boolean literal value indicating if the current platform is Android.\n\nThe replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard platform-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "OS_IOS", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value.", - "description": "This value is replaced by an injected boolean literal value indicating if the current platform is ipad/iphone.\n\nThe replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard platform-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "OS_VERSION_MAJOR", - "summary": "The operation system's major version number.", - "description": "This returns the same value as the property.\n\n``` js\nif (OS_IOS && (OS_VERSION_MAJOR >= 13)) {\n // Do something on iOS 13 or higher only.\n}\n```\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "OS_VERSION_MINOR", - "summary": "The operating system's minor version number.", - "description": "This returns the same value as the property.\n\nWill return zero if the OS does not have a minor version.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "permission": "read-only" - }, - { - "name": "OS_VERSION_PATCH", - "summary": "The operating system's patch version number.", - "description": "This returns the same value as the property.\n\nWill return zero if the OS does not have a patch version.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "permission": "read-only" - }, - { - "name": "ENV_DEV", - "summary": "Alias for ", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "ENV_DEVELOPMENT", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value, based on whether deploy type is `'development'`. Typically true for simulator/emulator builds.", - "description": "The replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard deploy type-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "ENV_PROD", - "summary": "Alias for ", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "ENV_PRODUCTION", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value, based on whether deploy type is `'production'`. Typically true for app store/ad-hoc builds.", - "description": "The replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard deploy type-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "ENV_TEST", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value, based on whether deploy type is `'test'`. Typically true for device builds.", - "description": "The replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard deploy type-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "DIST_ADHOC", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value, based on whether build target is `'dist-adhoc'`.", - "description": "The replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard deploy type-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "DIST_STORE", - "summary": "A special constant that is replaced during the app build with a boolean `true`/`false` value, based on whether build target is `'dist-appstore'` or `'dist-playstore'`.", - "description": "The replacement is done by a Babel plugin during JS transpilation phase of the app build.\nThis is an easy way to guard deploy type-specific codepaths (and make it easier for Babel to strip away dead code paths).\n\nThis pre-define originally lived in Alloy compilation but has been migrated to the SDK build process.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - }, - { - "since": "9.0.0", - "name": "iphone" - }, - { - "since": "9.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "console", - "summary": "Console logging facilities.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Global.Console" - }, - { - "name": "global", - "summary": "Reference to the global object itself.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Global" - }, - { - "name": "Buffer", - "summary": "a global reference to the [Buffer](buffer.Buffer) class.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "buffer.Buffer" - }, - { - "name": "process", - "summary": "Reference to the global `process` object.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "process" - } - ] - }, - "Global.Intl.Collator": { - "name": "Global.Intl.Collator", - "summary": "Immutable object used to perform language sensitive string comparisons.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/Collator.yml", - "description": "A collator is used to perform a localized string compare or sort using a given language locale.\n\nFor more detail, see the MDN website about\n[Intl.Collator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator).\n", - "examples": [ - { - "description": "Array Sorting", - "code": "``` js\n// Sort using collator. Array becomes: [ 'a', 'b', 'c' ]\nconst elements = [ 'c', 'b', 'a' ];\nelements.sort(new Intl.Collator().compare);\nconsole.log(`Sorted Elements: ${elements}`);\n```\n" - }, - { - "description": "String Compare Sensitivity", - "code": "``` js\n// Case sensitive and accent sensitive string matching.\n// This is the default collator sensitivity.\nconsole.log('Variant Sensitivity:');\nlet collator = new Intl.Collator(Ti.Locale.currentLocale, { sensitivity: 'variant' });\nconsole.log(collator.compare('a', 'a') === 0); // Equal\nconsole.log(collator.compare('a', 'á') === 0); // Not Equal\nconsole.log(collator.compare('a', 'A') === 0); // Not Equal\nconsole.log(collator.compare('a', 'b') === 0); // Not Equal\n\n// Case sensitive matching, ignoring accents marks.\nconsole.log('Case Sensitivity:');\ncollator = new Intl.Collator(Ti.Locale.currentLocale, { sensitivity: 'case' });\nconsole.log(collator.compare('a', 'a') === 0); // Equal\nconsole.log(collator.compare('a', 'á') === 0); // Equal\nconsole.log(collator.compare('a', 'A') === 0); // Not Equal\nconsole.log(collator.compare('a', 'b') === 0); // Not Equal\n\n// Do an accent sensitive match, ignoring case.\nconsole.log('Accent Sensitivity:');\ncollator = new Intl.Collator(Ti.Locale.currentLocale, { sensitivity: 'accent' });\nconsole.log(collator.compare('a', 'a') === 0); // Equal\nconsole.log(collator.compare('a', 'á') === 0); // Not Equal\nconsole.log(collator.compare('a', 'A') === 0); // Equal\nconsole.log(collator.compare('a', 'b') === 0); // Not Equal\n\n// Match strings having same base letters, ignoring case and accents.\nconsole.log('Base Sensitivity:');\ncollator = new Intl.Collator(Ti.Locale.currentLocale, { sensitivity: 'base' });\nconsole.log(collator.compare('a', 'a') === 0); // Equal\nconsole.log(collator.compare('a', 'á') === 0); // Equal\nconsole.log(collator.compare('a', 'A') === 0); // Equal\nconsole.log(collator.compare('a', 'b') === 0); // Not Equal\n```\n" - } - ], - "methods": [ - { - "name": "compare", - "summary": "Determines the sort order of the given strings or if they match.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "string1", - "summary": "The string to be compared with argument `string2`.", - "type": "String" - }, - { - "name": "string2", - "summary": "The string to be compared with argument `string1`.", - "type": "String" - } - ], - "returns": { - "summary": "Returns zero if strings are equal.\nReturns a negative value if `string1` sorts before `string2`.\nReturns a positive value if `string1` sorts after `string2`.\n", - "type": "Number" - } - }, - { - "name": "resolvedOptions", - "summary": "Gets the object's collation options.", - "description": "Returns the collation options the collator object uses.\n\nFor more detail, see the MDN website about\n[resolvedOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/resolvedOptions).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns the collation options used.", - "type": "CollatorOptions" - } - }, - { - "name": "supportedLocalesOf", - "summary": "Static method indicating what locales are supported by collators from the given locale(s).", - "description": "For more detail, see the MDN website about\n[supportedLocalesOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/supportedLocalesOf).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locales", - "summary": "A string or array of strings providing BCP 47 locale identifiers to query.", - "type": [ - "String", - "Array" - ] - } - ], - "returns": { - "summary": "Array containing a subset of the given locale strings supported by collators.", - "type": "Array" - } - } - ], - "properties": [ - { - "name": "constructor", - "summary": "Creates a new `Intl.Collator` object with the given locale and comparison options.", - "description": "#### Syntax\n\n``` js\nnew Intl.Collator([locales[, options]])\n```\n\n#### Parameters\n\n* `locales`: [String](Global.String)/[String](Global.String)`[]` (optional)\n\n The [BCP 47](https://www.unicode.org/reports/tr35/tr35.html#BCP_47_Conformance) language and country\n code(s) to use for localized string comparisons. Can provide multiple locales where the best-supported\n locale will be favored in the order provided by the array. If parameter is not assigned, then\n the system may use the `'en-US'` locale by default instead of the system's current locale.\n It's recommended to set this parameter using .\n\n* `options`: (optional)\n\n Provides settings indicating how strings should be compared.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Global.Intl.Collator", - "permission": "read-only" - } - ] - }, - "CollatorOptions": { - "name": "CollatorOptions", - "summary": "Options to be passed into the method.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/Collator.yml", - "properties": [ - { - "name": "localeMatcher", - "summary": "The locale matching algorithm to use.", - "description": "Can be set to `'lookup'` or `'best fit'`.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "best fit" - }, - { - "name": "usage", - "summary": "Indicates if the comparison is for sorting or searching when matching strings.", - "description": "Can be set to `'sort'` or `'search'`.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "sort" - }, - { - "name": "sensitivity", - "summary": "Indicates how characters should be compared.", - "description": "Can be set to one of the following:\n\n* `'base'` Strings that differ in base letters are unequal.\n For example `a !== b`, `a === á`, `a === A`\n* `'accent'` Strings that differ in base letters and accents are unequal.\n For example `a !== b`, `a !== á`, `a === A`\n* `'case'` Strings that differ in base letters or casing are unequal.\n For example `a !== b`, `a === á`, `a !== A`\n* `'variant'` Strings that differ in base letters, accents, or casing are unequal.\n For example `a !== b`, `a !== á`, `a !== A`\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "variant" - }, - { - "name": "ignorePunctuation", - "summary": "Indicates if punctuation characters should be ignored during the compare.", - "description": "This option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "numeric", - "summary": "Indicates if numbers in string should be compared as integers.", - "description": "When set `true`, strings containing numbers will be sorted as `'1' < '2' < '10'` by their numeric\nvalue instead of by their character codes.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "caseFirst", - "summary": "Indicates if upper case or lower case characters should sort first.", - "description": "Can be set to one of the following:\n\n* `'upper'` Upper case characters are sorted before lower case characters.\n* `'lower'` Lower case characters are sorted before upper case characters.\n* `'false'` Use the locale's default case handling.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "false" - } - ] - }, - "Global.Intl.DateTimeFormat": { - "name": "Global.Intl.DateTimeFormat", - "summary": "Immutable object used to generate localized date and time formatted strings.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/DateTimeFormat.yml", - "description": "A `DateTimeFormat` object is used to format a `Date` object to a localized date and/or time string.\nThis will respect the system's current language setting when outputting a full month or weekday name.\nIt will also respect the current locale's date component ordering such as Month/Day/Year,\nDay/Month/Year, and Year/Month/Day.\n\nFor more detail, see the MDN website about\n[Intl.DateTimeFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat).\n", - "examples": [ - { - "description": "Output Numeric Date", - "code": "``` js\n// 2020-March-1st\nconst date = new Date(Date.UTC(2020, 2, 1));\n\n// Logs \"3/1/2020\" for US English locale.\n// Logs \"1.3.2020\" for German locale.\n// Logs \"2020/3/1\" for Japanese locale.\nconst formatter = new Intl.DateTimeFormat(Ti.Locale.currentLocale, {\n year: 'numeric',\n month: 'numeric',\n day: 'numeric',\n timeZone: 'UTC'\n});\nconsole.log(`Time: ${formatter.format(date)}`);\n```\n" - }, - { - "description": "Output 12-Hour Time", - "code": "``` js\n// 2020-January-1st 08:02:05 PM\nconst date = new Date(Date.UTC(2020, 0, 1, 20, 2, 5));\n\n// Logs \"8:02:05 PM\" for English locales.\n// Logs \"8:02:05 nachm.\" for German locales.\nconst formatter = new Intl.DateTimeFormat(Ti.Locale.currentLocale, {\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit',\n hour12: true,\n dayPeriod: 'narrow',\n timeZone: 'UTC'\n});\nconsole.log(`Time: ${formatter.format(date)}`);\n```\n" - }, - { - "description": "Output 24-Hour Time", - "code": "``` js\n// 2020-January-1st 08:02:05 PM\nconst date = new Date(Date.UTC(2020, 0, 1, 20, 2, 5));\n\n// Logs \"20:02:05\".\nconst formatter = new Intl.DateTimeFormat(Ti.Locale.currentLocale, {\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n timeZone: 'UTC'\n});\nconsole.log(`Time: ${formatter.format(date)}`);\n```\n" - }, - { - "description": "Output Localized Weekday Name", - "code": "``` js\n// Log current weekday name (such as \"Monday\") using system's selected language.\nconst formatter = new Intl.DateTimeFormat(Ti.Locale.currentLocale, { weekday: 'long' });\nconsole.log(formatter.format(new Date()));\n```\n" - } - ], - "methods": [ - { - "name": "format", - "summary": "Formats the given date object to a localized date and/or time string.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "date", - "summary": "The date to be formatted.", - "type": "Date" - } - ], - "returns": { - "summary": "The localized date and/or time string.", - "type": "String" - } - }, - { - "name": "formatToParts", - "summary": "Formats given date to an array of components describing what the formatted string would produce.", - "description": "Returns an array of objects providing the \"type\" and \"value\" of each component the formatted\nstring would produce. Can be used to detect month/day/year ordering for the current locale,\nto fetch the localized separators between date and time components, etc.\n\nFor more detail, see the MDN website about\n[formatToParts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "date", - "summary": "The date to be formatted into parts.", - "type": "Date" - } - ], - "returns": { - "summary": "Array of objects providing the \"type\" and \"value\" of each component in formatted string.", - "type": "Array" - } - }, - { - "name": "resolvedOptions", - "summary": "Gets the object's formatting options.", - "description": "Returns the formatting options the format object uses.\n\nFor more detail, see the MDN website about\n[resolvedOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/resolvedOptions).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns the formatting options used.", - "type": "DateTimeFormatOptions" - } - }, - { - "name": "supportedLocalesOf", - "summary": "Static method indicating what locales are supported by `DateTimeFormat` from the given locale(s).", - "description": "For more detail, see the MDN website about\n[supportedLocalesOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/supportedLocalesOf).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locales", - "summary": "A string or array of strings providing BCP 47 locale identifiers to query.", - "type": [ - "String", - "Array" - ] - } - ], - "returns": { - "summary": "Array containing a subset of the given locale strings supported by `DateTimeFormat` objects.", - "type": "Array" - } - } - ], - "properties": [ - { - "name": "constructor", - "summary": "Creates a new `Intl.DateTimeFormat` object with the given locale and formatting options.", - "description": "#### Syntax\n\n``` js\nnew Intl.DateTimeFormat([locales[, options]])\n```\n\n#### Parameters\n\n* `locales`: [String](Global.String)/[String](Global.String)`[]` (optional)\n\n The [BCP 47](https://www.unicode.org/reports/tr35/tr35.html#BCP_47_Conformance) language and country\n code(s) to use for localized formatting. Can provide multiple locales where the best-supported\n locale will be favored in the order provided by the array. If parameter is not assigned, then\n the system may use the `'en-US'` locale by default instead of the system's current locale.\n It's recommended to set this parameter using .\n\n* `options`: (optional)\n\n Provides settings indicating how a `Date` object should be formatted to a `String`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Global.Intl.DateTimeFormat", - "permission": "read-only" - } - ] - }, - "DateTimeFormatOptions": { - "name": "DateTimeFormatOptions", - "summary": "Options to be passed into the method.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/DateTimeFormat.yml", - "properties": [ - { - "name": "dateStyle", - "summary": "Specifies the locale's built-in month, day, and year formatting styles.", - "description": "Can be set to one of the following:\n\n* `'short'` Outputs a numeric string such as `1/1/20`.\n* `'medium'` Outputs a string such as `Jan 1, 2020`.\n* `'long'` Outputs a string such as `January 1, 2020`.\n* `'full'` Outputs all components such as `Wednesday, January 1, 2020 AD`.\n\nThis option is only supported on Android.\n\nThis option will be ignored if you assign other date related options\nsuch as `month`, `day`, `year`, etc.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "timeStyle", - "summary": "Specifies the locale's built-in hour, minute, and second formatting styles.", - "description": "Can be set to one of the following:\n\n* `'short'` Outputs a string such as `3:30 PM`.\n* `'medium'` Outputs a string such as `3:30 PM`.\n* `'long'` Outputs a string such as `3:30:32 PM`.\n* `'full'` Outputs all time components such as `3:30:32 PM PST`.\n\nThis option is only supported on Android.\n\nThis option will be ignored if you assign other date related options\nsuch as `hour`, `minute`, `second`, etc.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "fractionalSecondDigits", - "summary": "Number of millisecond digits to show. Valid values are 0-3.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "dayPeriod", - "summary": "Indicates how the AM/PM time component should be shown.", - "description": "Can be set to one of the following:\n\n* `'narrow'` Output the shortest AM/PM name.\n* `'short'` Output a short AM/PM name.\n* `'long'` Outputs the longest AM/PM name.\n\nThis option is only relevant in non-English languages where this component can have a much longer name.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "timeZone", - "summary": "The time zone the `Date` object's value should be converted to when formatted.", - "description": "Sets the time zone name to use. Can be set to `'UTC'` to use Universal Time.\nCan also be set to a time zone name defined by the [IANA time zone database](https://www.iana.org/time-zones)\nsuch as `'America/New_York'`, `'Asia/Shanghai'`, etc.\n\nBy default, the formatter object will use the system assigned time zone.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "hour12", - "summary": "Indicates if formatter should output to either 12-hour or 24-hour time.", - "description": "Set `true` to output to 12-hour time, which means the AM/PM `dayPeriod` option becomes applicable.\nSet `false` to output to 24-hour time.\n\nBy default, the formatter object will use the system's assigned time setting.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "hourCycle", - "summary": "Indicates how the hour should be formatted.", - "description": "Can be set to one of the following:\n\n* `'h11'` Outputs hour between `0` and `11`.\n* `'h12'` Outputs hour between `1` and `12`. (a.k.a.: 12-hour time)\n* `'h23'` Outputs hour between `0` and `23`. (a.k.a.: 24-hour time)\n* `'h24'` Outputs hour between `1` and `24`.\n\nThis option is ignored if the `hour12` option has been set.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "localeMatcher", - "summary": "The locale matching algorithm to use.", - "description": "Can be set to `'lookup'` or `'best fit'`.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "best fit" - }, - { - "name": "formatMatcher", - "summary": "The format matching algorithm to use.", - "description": "Can be set to `'basic'` or `'best fit'`.\nThe `'basic'` setting is documented [here](https://www.ecma-international.org/ecma-402/1.0/#BasicFormatMatcher).\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "basic" - }, - { - "name": "weekday", - "summary": "Indicates how a weekday name should be shown.", - "description": "Can be set to one of the following:\n\n* `'narrow'` Outputs weekday such as `'T'` for Thursday.\n* `'short'` Outputs weekday such as `'Thu'` for Thursday.\n* `'long'` Outputs weekday such as `'Thursday'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "era", - "summary": "Indicates how the era name, such as AD or BC, should be shown.", - "description": "Can be set to one of the following:\n\n* `'narrow'` Outputs era such as `'A'` for AD.\n* `'short'` Outputs era such as `'AD'`.\n* `'long'` Outputs full era name such as `'Anno Domini'` for AD.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "year", - "summary": "Indicates how the year should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs to a 4 digit year such as `'2020'`.\n* `'2-digit'` Outputs to a 2 digit year such as `'20'` for the year 2020.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "month", - "summary": "Indicates how the month should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs without a leading zero such as `'3'` for March.\n* `'2-digit'` Outputs a 2 digit month such as `'03'` for March.\n* `'narrow'` Outputs a very short month name such as `'M'` for March.\n (Android treats `'narrow'` as `'short'` instead.)\n* `'short'` Outputs an abbreviated month name such as `'Mar'` for March.\n* `'long'` Outputs the full month name such as `'March'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "day", - "summary": "Indicates how the numeric day should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs without a leading zero such as `'1'`.\n* `'2-digit'` Outputs to a 2 digit day such as `'01'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "hour", - "summary": "Indicates how the hour should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs without a leading zero such as `'1'`.\n* `'2-digit'` Outputs with a leading zero such as `'01'` when configured for 24-hour time.\n This setting is ignored when using 12-hour time.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "minute", - "summary": "Indicates how minutes should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs without a leading zero such as `'1'`.\n* `'2-digit'` Outputs with a leading zero such as `'01'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "second", - "summary": "Indicates how seconds should be formatted.", - "description": "Can be set to one of the following:\n\n* `'numeric'` Outputs without a leading zero such as `'1'`.\n* `'2-digit'` Outputs with a leading zero such as `'01'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "timeZoneName", - "summary": "Indicates how the time zone should be shown.", - "description": "Can be set to one of the following:\n\n* `'short'` Outputs the GMT offset such as `'GMT-8'` for US Pacific Time.\n* `'long'` Outputs the full time zone name such as `'British Summer Time'`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "DateTimeFormattedPart": { - "name": "DateTimeFormattedPart", - "summary": "Generic type for elements of returned `Array` from ", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/DateTimeFormat.yml", - "properties": [ - { - "name": "type", - "summary": "The type of the locale-specific token.\n\nSee [MDN formatToParts documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat/formatToParts)\nfor details on the possible types and typical values.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "value", - "summary": "The locale-specific token value", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "Global.Intl": { - "name": "Global.Intl", - "summary": "Namespace providing JavaScript's standard internationalization APIs.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/Intl.yml", - "description": "Provides support for localized number formatting, date/time formatting,\nand language sensitive string comparisons.\n\nFor more detail, see the MDN website about\n[Intl](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl).\n", - "methods": [ - { - "name": "getCanonicalLocales", - "summary": "Gets canonical locale identifiers matching given BCP 47 locale identifiers.", - "description": "``` js\n// Will return ['en-US'].\nTi.API.info(Intl.getCanonicalLocales('EN-US'));\n\n// Will return ['en-US', 'fr'].\nTi.API.info(Intl.getCanonicalLocales(['EN-US', 'Fr']));\n```\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locales", - "summary": "A string or array of strings providing BCP 47 locale identifiers to fetch the canonical names of.", - "type": [ - "String", - "Array" - ], - "optional": true - } - ], - "returns": { - "summary": "Returns an array of canonical names matching given BCP 47 locale names. Duplicate locales will be removed.\nReturns an empty array if argument is empty or undefined.\n", - "type": "Array" - } - } - ] - }, - "Global.Intl.NumberFormat": { - "name": "Global.Intl.NumberFormat", - "summary": "Immutable object used to convert numbers to localized numeric strings.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/NumberFormat.yml", - "description": "A `NumberFormat` object is used to convert a `Number` value to a localized numeric string.\nIt provides various formatting options controlling the number of integer and fractional digits\nto be displayed. It can also output currency values, percentage based values, and\nscientific notation.\n\nFor more detail, see the MDN website about\n[Intl.NumberFormat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat).\n", - "examples": [ - { - "description": "Format with Leading Zeros", - "code": "``` js\n// Set up to pad first 3 integer digits with zeros if needed.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n minimumIntegerDigits: 3,\n useGrouping: false\n});\n\n// Logs: 000\nconsole.log(formatter.format(0));\n\n// Logs: 001\nconsole.log(formatter.format(1));\n\n// Logs: 001.23\nconsole.log(formatter.format(1.23));\n\n// Logs: 12345\nconsole.log(formatter.format(12345));\n```\n" - }, - { - "description": "Round to Significant Digits", - "code": "``` js\n// Round up to 3 significant digits.\n// All trailing non-fractional digits will be zero.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n maximumSignificantDigits: 3,\n useGrouping: false\n});\n\n// Logs: 12300\nconsole.log(formatter.format(12345.6));\n\n// Logs: -12300\nconsole.log(formatter.format(-12345.6));\n\n// Logs: 1.23\nconsole.log(formatter.format(1.23456));\n```\n" - }, - { - "description": "Currency Format", - "code": "``` js\n// Set up currency style format options.\nconst options = {\n style: 'currency',\n maximumFractionDigits: 2,\n minimumFractionDigits: 2,\n useGrouping: true\n};\n\n// Format in dollars in USA. Logs: $1,000.00\n// Note that the \"currency\" option is required.\nlet formatter = Intl.NumberFormat('en-US', Object.assign({ currency: 'USD' }, options));\nconsole.log(formatter.format(1000));\n\n// Format in euros in USA. Logs: €1,000.00\nformatter = Intl.NumberFormat('en-US', Object.assign({ currency: 'EUR' }, options));\nconsole.log(formatter.format(1000));\n\n// Format in euros in Germany. Logs: 1.000,00 €\nformatter = Intl.NumberFormat('de-DE', Object.assign({ currency: 'EUR' }, options));\nconsole.log(formatter.format(1000));\n\n// Format in dollars in Germany. Logs: 1.000,00 $\nformatter = Intl.NumberFormat('de-DE', Object.assign({ currency: 'USD' }, options));\nconsole.log(formatter.format(1000));\n```\n" - }, - { - "description": "Percentage Format", - "code": "``` js\n// Set up percentage style numeric formatting.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n style: 'percent',\n maximumFractionDigits: 1,\n minimumFractionDigits: 1,\n useGrouping: false\n});\n\n// Logs: 25.0%\nconsole.log(formatter.format(0.25));\n\n// Logs: 100.0%\nconsole.log(formatter.format(1.0));\n\n// Logs: 1234.5%\nconsole.log(formatter.format(12.345));\n\n// Logs: 1234.6%\n// Since value exceeds \"maximumFractionDigits\" of 1, it is rounded.\nconsole.log(formatter.format(12.3456));\n```\n" - }, - { - "description": "Scientific Notation (Android Only)", - "code": "``` js\n// Logs: 1.235E5\n// Decimal point will be a period, comma, or space depending on the locale.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, { notation: 'scientific' });\nconsole.log(formatter.format(123456.7));\n```\n" - } - ], - "methods": [ - { - "name": "format", - "summary": "Formats the given number to a localized numeric string.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The number to be formatted.", - "type": "Number" - } - ], - "returns": { - "summary": "The localized numeric string.", - "type": "String" - } - }, - { - "name": "formatToParts", - "summary": "Formats given number to an array of components describing what the formatted string would produce.", - "description": "Returns an array of objects providing the \"type\" and \"value\" of each component the formatted\nstring would produce. Can be used to fetch localized separator characters, currency characters,\ncurrency symbol positions, etc.\n\nFor more detail, see the MDN website about\n[formatToParts](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The number to be formatted into parts.", - "type": "Number" - } - ], - "returns": { - "summary": "Array of objects providing the \"type\" and \"value\" of each component in formatted string.", - "type": "Array" - } - }, - { - "name": "resolvedOptions", - "summary": "Gets the object's formatting options.", - "description": "Returns the formatting options the format object uses.\n\nFor more detail, see the MDN website about\n[resolvedOptions](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/resolvedOptions).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns the formatting options used.", - "type": "NumberFormatOptions" - } - }, - { - "name": "supportedLocalesOf", - "summary": "Static method indicating what locales are supported by `NumberFormat` from the given locale(s).", - "description": "For more detail, see the MDN website about\n[supportedLocalesOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/supportedLocalesOf).\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locales", - "summary": "A string or array of strings providing BCP 47 locale identifiers to query.", - "type": [ - "String", - "Array" - ] - } - ], - "returns": { - "summary": "Array containing a subset of the given locale strings supported by `NumberFormat` objects.", - "type": "Array" - } - } - ], - "properties": [ - { - "name": "constructor", - "summary": "Creates a new `Intl.NumberFormat` object with the given locale and formatting options.", - "description": "#### Syntax\n\n``` js\nnew Intl.NumberFormat([locales[, options]])\n```\n\n#### Parameters\n\n* `locales`: [String](Global.String)/[String](Global.String)`[]` (optional)\n\n The [BCP 47](https://www.unicode.org/reports/tr35/tr35.html#BCP_47_Conformance) language and country\n code(s) to use for localized formatting. Can provide multiple locales where the best-supported\n locale will be favored in the order provided by the array. If parameter is not assigned, then\n the system may use the `'en-US'` locale by default instead of the system's current locale.\n It's recommended to set this parameter using .\n\n* `options`: (optional)\n\n Provides settings indicating how a number should be formatted to a string.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Global.Intl.NumberFormat", - "permission": "read-only" - } - ] - }, - "NumberFormatOptions": { - "name": "NumberFormatOptions", - "summary": "Options to be passed into the method.", - "extends": "Object", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/NumberFormat.yml", - "properties": [ - { - "name": "style", - "summary": "Specifies the format style such as decimal, currency, or percentage.", - "description": "Can be set to one of the following:\n\n* `'decimal'` Formats as a floating point value such as `'-1,234.5'`.\n* `'currency'` Formats value as a currency such as `'$100'`.\n You must also set the option\n when using this style or else an exception will be thrown.\n* `'percent'` Multiplies value by 100 and formats as a percentage.\n For example, a value of `1.0` will be formatted as `'100%'`.\n\nNote that Android and iOS do not support the `'unit'` style defined in the ECMA standard.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "decimal" - }, - { - "name": "localeMatcher", - "summary": "The locale matching algorithm to use.", - "description": "Can be set to `'lookup'` or `'best fit'`.\n\nThis option is ignored on Android.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "best fit" - }, - { - "name": "currency", - "summary": "Set to the ISO 4217 currency code to use when formatting with the currency style.", - "description": "If the option is set to `'currency'`,\nthen you must also set this `currency` option to an\n[ISO 4217](https://www.currency-iso.org/en/home/tables/table-a1.html) currency code\nsuch as `'USD'` for US dollars or `'EUR'` for euros.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "currencyDisplay", - "summary": "Indicates how the currency symbol or name should be shown.", - "description": "This option is only applicable if \nis set to `'currency'`.\n\nThis option can be set to one of the following:\n\n* `'symbol'` Outputs the currency symbol such as `'$'` for US dollars.\n* `'code'` Outputs the ISO 4217 currency code such as `'USD'` or `'EUR'`.\n* `'name'` Outputs the full currency name such as `'US dollars'`.\n\nAndroid ignores this option and will always display a currency symbol.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "symbol" - }, - { - "name": "useGrouping", - "summary": "Indicates if grouping separators should be displayed.", - "description": "When set `true`, grouping separators will be displayed in the integer portion of the number\nsuch as `'1,234,567.8'` for English region formatted numbers.\n\nSet `false` to not show grouping separators such as `1234567.8`.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "minimumIntegerDigits", - "summary": "Applies leading zeros to the integer portion of the formatted number.", - "description": "A value ranging between `0` to `21` setting the minimum number of integer digits to be shown\non the left side of the decimal separator. This will pad the formatted number with\nleading zeros if the number of digits is below this minimum value.\n\n``` js\n// Pad with 3 leading zeros.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n minimumIntegerDigits: 3,\n});\nconsole.log(formatter.format(1)); // Logs: 001\nconsole.log(formatter.format(12)); // Logs: 012\nconsole.log(formatter.format(123)); // Logs: 123\nconsole.log(formatter.format(1234)); // Logs: 1234\n```\n\nSet to `0` to not show any leading zeros.\n\n``` js\n// Do not pad with leading zeros.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n minimumIntegerDigits: 0,\n});\nconsole.log(formatter.format(1)); // Logs: 1\nconsole.log(formatter.format(0)); // Logs: 0\nconsole.log(formatter.format(0.5)); // Logs: .5\nconsole.log(formatter.format(0.05)); // Logs: .05\n```\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 1 - }, - { - "name": "minimumFractionDigits", - "summary": "Applies trailing zeros in fractional portion of the formatted number.", - "description": "A value ranging between `0` to `20` setting the minimum number of fractional digits\nto be shown. This will pad the formatted number with trailing zeros if needed.\n\n``` js\n// Pad with 2 trailing zeros.\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n minimumFractionDigits: 2,\n});\nconsole.log(formatter.format(123)); // Logs: 123.00\nconsole.log(formatter.format(0.1)); // Logs: 0.10\nconsole.log(formatter.format(0.123)); // Logs: 0.123\n```\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "maximumFractionDigits", - "summary": "Max number of fractional digits to be shown. Will round at this max digit.", - "description": "A value ranging between `0` to `20` setting the maximum number of fractional digits\nto be shown. Will round the number at this maximum.\n\n``` js\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n maximumFractionDigits: 3,\n});\nconsole.log(formatter.format(1.2345)); // Logs: 1.235\nconsole.log(formatter.format(0.1)); // Logs: 0.1\nconsole.log(formatter.format(1)); // Logs: 1\n```\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "maximumSignificantDigits", - "summary": "Max number of significant digits to be shown. Will round at this max digit.", - "description": "A value ranging between `1` to `21` setting the maximum number of significant digits\nto be shown. Will round the number at this maximum.\n\n``` js\nconst formatter = new Intl.NumberFormat(Ti.Locale.currentLocale, {\n maximumSignificantDigits: 3,\n});\nconsole.log(formatter.format(12345.6)); // Logs: 12300\nconsole.log(formatter.format(1.23456)); // Logs: 1.23\nconsole.log(formatter.format(0.0123456)); // Logs: 0.0123\n```\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 21 - }, - { - "name": "notation", - "summary": "Indicates if number should be formatted to scientific or engineering notation.", - "description": "Can be set to one of the following:\n\n* `'standard'` Format to a plain number such as `'123456.7'`.\n* `'scientific'` Formats to scientific notation having only 1 integer digit such as `'1.235E5'`.\n* `'engineering'` Formats to engineering notation where exponent is in increments of 3 such as `'123.457E3'`.\n\nThis option is only supported on Android.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "type": "String", - "default": "standard" - } - ] - }, - "NumberFormattedPart": { - "name": "NumberFormattedPart", - "summary": "Generic type for elements of returned `Array` from ", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/Intl/NumberFormat.yml", - "properties": [ - { - "name": "type", - "summary": "The type of the locale-specific token.\n\nSee [MDN formatToParts documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/formatToParts)\nfor details on the possible types and typical values.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "value", - "summary": "The locale-specific token value", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "Global.String": { - "name": "Global.String", - "summary": "The JavaScript built-in String type.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Global/String/String.yml", - "description": "This module contains Titanium-only extensions for formatting data into locale-specific strings. \nThe target locale is configured by the user in the device's system Settings.\n", - "methods": [ - { - "name": "format", - "summary": "Formats a string using `printf`-style substitution.", - "description": "The format string follows the \n[IEEE printf specification](http://pubs.opengroup.org/onlinepubs/009695399/functions/printf.html).\n\nFor each \"conversion specification\" (ie. `%s` for a string or `%d` for a number) used inside\nthe string, `formatString` argument, the respective value is substituted from the\nargument list. For example:\n\n``` js\nvar forename = 'Paul';\nvar number = 21;\nvar message = String.format('Welcome, %s! You are visitor number %d', forename, number);\nTi.API.info(message);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "formatString", - "summary": "An IEEE `printf`-style string, containing zero or more conversion specifications.", - "type": "String" - }, - { - "name": "value", - "summary": "Values to substitute into the `formatString`. The method expects a variable number\nof `value` arguments, one for each `%` conversion specification in the format\nstring. Optional on Android.\n", - "type": [ - "String", - "Number" - ], - "repeatable": true - } - ], - "returns": { - "summary": "Formatted string.", - "type": "String" - } - }, - { - "name": "formatCurrency", - "summary": "Formats a number into the currency format, including currency symbol, of the locale \nconfigured for the system.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Currency value.", - "type": "Number" - } - ], - "returns": { - "summary": "Formatted, localized string.", - "type": "String" - } - }, - { - "name": "formatDate", - "summary": "Formats a date into the date format of the locale configured for the system.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "date", - "summary": "Date to format.", - "type": "Date" - }, - { - "name": "format", - "summary": "Date format to use. One of 'short', 'medium', 'long' or 'full'.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "Formatted, localized string.", - "type": "String" - } - }, - { - "name": "formatDecimal", - "summary": "Formats a number into the decimal format, including decimal symbol, of the locale \nconfigured for the system.\n", - "description": "The localized string created by this method can be parsed be parsed back to a number\nvia the method.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Value to format.", - "type": "Number" - }, - { - "name": "locale", - "summary": "Locale string. For example, `en-US` for US English.", - "type": "String", - "optional": true - }, - { - "name": "pattern", - "summary": "Format pattern.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "String representation of the specified number, using a locale-specific decimal symbol, \nif required.\n", - "type": "String" - } - }, - { - "name": "formatTime", - "summary": "Formats a date into the time format of the locale configured for the system.", - "description": "On Android, this method returns the short format.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "date", - "summary": "Date to format.", - "type": "Date" - }, - { - "name": "format", - "summary": "Date format to use. One of 'short', 'medium', or 'long' (iOS only.)", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "Formatted, localized string.", - "type": "String" - } - } - ] - }, - "Modules": { - "name": "Modules", - "summary": "Optional Titanium modules.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Modules/Modules.yml", - "description": "Modules in this section are optional modules that may be packaged with the Titanium SDK.\nThese modules are not part of the Titanium namespace, and must be added to the `tiapp.xml`\nfile and imported using [require](Global.require).\n\nEach of the modules in this section is either packaged with the Titanium SDK or\navailable for free through the [Axway Marketplace](https://marketplace.axway.com/home) and\nthe community based [Gitt.io](http://gitt.io) project.\n" - }, - "assert": { - "name": "assert", - "summary": "A Node.js-compatible implementation of the core `assert` module", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/assert.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `assert` core module.\n\nMore details on the Node.js API can be found in their [assert module documentation](https://nodejs.org/api/assert.html)\n\n**Note:** The `assert` module can also be invoked as a function and is equivalent to calling the method:\n\n``` javascript\n const assert = require('assert');\n assert(value, 'message'); // equivalent to assert.ok(value, 'message')\n```\n", - "methods": [ - { - "name": "deepEqual", - "summary": "Tests for deep equality between the `actual` and `expected` parameters.\nConsider using `assert.deepStrictEqual()` instead.\n`assert.deepEqual()` can have surprising results.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deepStrictEqual", - "summary": "Tests for deep equality between the `actual` and `expected` parameters.\n\"Deep\" equality means that the enumerable \"own\" properties of child objects are recursively evaluated also by the following rules.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "doesNotReject", - "summary": "Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is not rejected.\n\nIf `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If the function does not return a promise, `assert.doesNotReject()` will return a rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error handler is skipped.\n\nUsing `assert.doesNotReject()` is actually not useful because there is little benefit in catching a rejection and then rejecting it again. Instead, consider adding a comment next to the specific code path that should not reject and keep error messages as expressive as possible.\n\nIf specified, `error` can be a `Class`, `RegExp` or a validation function. See `assert.throws()` for more details.\n\nBesides the async nature to await the completion behaves identically to `assert.doesNotThrow()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "asyncFn", - "summary": "function to invoke", - "type": [ - "Function", - "Promise" - ] - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "doesNotThrow", - "summary": "Asserts that the function `fn` does not throw an `error`.\n\nUsing `assert.doesNotThrow()` is actually not useful because there is no benefit in catching an error and then rethrowing it. Instead, consider adding a comment next to the specific code path that should not throw and keep error messages as expressive as possible.\n\nWhen `assert.doesNotThrow()` is called, it will immediately call the `fn` function.\n\nIf an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a different type, or if the error parameter is undefined, the error is propagated back to the caller.\n\nIf specified, `error` can be a Class, RegExp or a validation function. See `assert.throws()` for more details.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fn", - "summary": "function to invoke", - "type": "Function" - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "equal", - "summary": "Tests shallow, coercive equality between the actual and expected parameters using the Abstract Equality Comparison (`==`).\n`NaN` is special handled and treated as being identical in case both sides are `NaN`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fail", - "summary": "Throws an `AssertionError` with the provided error message or a default error message.\nIf the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "ifError", - "summary": "Throws `value` if `value` is not `undefined` or `null`.\nThis is useful when testing the error argument in callbacks.\nThe stack trace contains all frames from the error passed to `ifError()` including the potential new frames for `ifError()` itself.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "potentially thrown value/object", - "type": "any" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notDeepEqual", - "summary": "Tests for any deep inequality. Opposite of `assert.deepEqual()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notDeepStrictEqual", - "summary": "Tests for deep strict inequality. Opposite of `assert.deepStrictEqual()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notEqual", - "summary": "Tests shallow, coercive inequality with the Abstract Equality Comparison (`!=`).\n`NaN` is special handled and treated as being identical in case both sides are `NaN`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notStrictEqual", - "summary": "Tests strict inequality between the actual and expected parameters as determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "ok", - "summary": "Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.\n\nIf `value` is not truthy, an `AssertionError` is thrown with a message property set equal to the value of the `message` parameter.\nIf the `message` parameter is `undefined`, a default error message is assigned.\nIf the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.\nIf no arguments are passed in at all message will be set to the string: `'No value argument passed to \\`assert.ok()\\`'`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The input that is checked for being truthy.", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "rejects", - "summary": "Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is rejected.\n\nIf `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error handler is skipped.\n\nBesides the async nature to await the completion behaves identically to `assert.throws()`.\n\nIf specified, `error` can be a `Class`, `RegExp`, a validation function, an object where each property will be tested for, or an instance of error where each property will be tested for including the non-enumerable `message` and `name` properties.\n\nIf specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "asyncFn", - "summary": "function to invoke", - "type": [ - "Function", - "Promise" - ] - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function", - "Object", - "Error" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "strictEqual", - "summary": "Tests strict equality between the actual and expected parameters as determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "throws", - "summary": "Expects the function `fn` to throw an error.\n\nIf specified, `error` can be a `Class`, `RegExp`, a validation function, a validation object where each property will be tested for strict deep equality, or an instance of error where each property will be tested for strict deep equality including the non-enumerable `message` and `name` properties.\nWhen using an object, it is also possible to use a regular expression, when validating against a string property. See below for examples.\n\nIf specified, `message` will be appended to the message provided by the AssertionError if the fn call fails to throw or in case the error validation fails.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fn", - "summary": "function to invoke", - "type": "Function" - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "strict", - "summary": "an alias of `assert` that enforces strict version of comparison methods", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "assert.strict" - }, - { - "name": "AssertionError", - "summary": "extension of `Error`", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "assert.AssertionError" - } - ] - }, - "assert.strict": { - "name": "assert.strict", - "summary": "An extension of which overrides some of the methods to use their strict counterparts.", - "extends": "assert", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/assert.yml", - "methods": [ - { - "name": "deepEqual", - "summary": "equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deepStrictEqual", - "summary": "Tests for deep equality between the `actual` and `expected` parameters.\n\"Deep\" equality means that the enumerable \"own\" properties of child objects are recursively evaluated also by the following rules.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "doesNotReject", - "summary": "Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is not rejected.\n\nIf `asyncFn` is a function and it throws an error synchronously, `assert.doesNotReject()` will return a rejected `Promise` with that error. If the function does not return a promise, `assert.doesNotReject()` will return a rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error handler is skipped.\n\nUsing `assert.doesNotReject()` is actually not useful because there is little benefit in catching a rejection and then rejecting it again. Instead, consider adding a comment next to the specific code path that should not reject and keep error messages as expressive as possible.\n\nIf specified, `error` can be a `Class`, `RegExp` or a validation function. See `assert.throws()` for more details.\n\nBesides the async nature to await the completion behaves identically to `assert.doesNotThrow()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "asyncFn", - "summary": "function to invoke", - "type": [ - "Function", - "Promise" - ] - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "doesNotThrow", - "summary": "Asserts that the function `fn` does not throw an `error`.\n\nUsing `assert.doesNotThrow()` is actually not useful because there is no benefit in catching an error and then rethrowing it. Instead, consider adding a comment next to the specific code path that should not throw and keep error messages as expressive as possible.\n\nWhen `assert.doesNotThrow()` is called, it will immediately call the `fn` function.\n\nIf an error is thrown and it is the same type as that specified by the `error` parameter, then an `AssertionError` is thrown. If the error is of a different type, or if the error parameter is undefined, the error is propagated back to the caller.\n\nIf specified, `error` can be a Class, RegExp or a validation function. See `assert.throws()` for more details.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "fn", - "summary": "function to invoke", - "type": "Function" - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "equal", - "summary": "equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fail", - "summary": "Throws an `AssertionError` with the provided error message or a default error message.\nIf the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "ifError", - "summary": "Throws `value` if `value` is not `undefined` or `null`.\nThis is useful when testing the error argument in callbacks.\nThe stack trace contains all frames from the error passed to `ifError()` including the potential new frames for `ifError()` itself.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "value", - "summary": "potentially thrown value/object", - "type": "any" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notDeepEqual", - "summary": "equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notDeepStrictEqual", - "summary": "Tests for deep strict inequality. Opposite of `assert.deepStrictEqual()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notEqual", - "summary": "equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notStrictEqual", - "summary": "Tests strict inequality between the actual and expected parameters as determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "ok", - "summary": "Tests if `value` is truthy. It is equivalent to `assert.equal(!!value, true, message)`.\n\nIf `value` is not truthy, an `AssertionError` is thrown with a message property set equal to the value of the `message` parameter.\nIf the `message` parameter is `undefined`, a default error message is assigned.\nIf the `message` parameter is an instance of an `Error` then it will be thrown instead of the `AssertionError`.\nIf no arguments are passed in at all message will be set to the string: `'No value argument passed to \\`assert.ok()\\`'`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "value", - "summary": "The input that is checked for being truthy.", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "rejects", - "summary": "Awaits the `asyncFn` promise or, if `asyncFn` is a function, immediately calls the function and awaits the returned promise to complete. It will then check that the promise is rejected.\n\nIf `asyncFn` is a function and it throws an error synchronously, `assert.rejects()` will return a rejected `Promise` with that error. If the function does not return a promise, `assert.rejects()` will return a rejected `Promise` with an `ERR_INVALID_RETURN_VALUE` error. In both cases the error handler is skipped.\n\nBesides the async nature to await the completion behaves identically to `assert.throws()`.\n\nIf specified, `error` can be a `Class`, `RegExp`, a validation function, an object where each property will be tested for, or an instance of error where each property will be tested for including the non-enumerable `message` and `name` properties.\n\nIf specified, `message` will be the message provided by the `AssertionError` if the `asyncFn` fails to reject.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "asyncFn", - "summary": "function to invoke", - "type": [ - "Function", - "Promise" - ] - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function", - "Object", - "Error" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "strictEqual", - "summary": "Tests strict equality between the actual and expected parameters as determined by the [SameValue Comparison](https://tc39.github.io/ecma262/#sec-samevalue).\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "actual", - "summary": "The actual value", - "type": "any" - }, - { - "name": "expected", - "summary": "The expected value", - "type": "any" - }, - { - "name": "message", - "summary": "error message", - "type": [ - "String", - "Error" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "throws", - "summary": "Expects the function `fn` to throw an error.\n\nIf specified, `error` can be a `Class`, `RegExp`, a validation function, a validation object where each property will be tested for strict deep equality, or an instance of error where each property will be tested for strict deep equality including the non-enumerable `message` and `name` properties.\nWhen using an object, it is also possible to use a regular expression, when validating against a string property. See below for examples.\n\nIf specified, `message` will be appended to the message provided by the AssertionError if the fn call fails to throw or in case the error validation fails.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "parameters": [ - { - "name": "fn", - "summary": "function to invoke", - "type": "Function" - }, - { - "name": "error", - "summary": "The expected `Error` type (class or name)", - "type": [ - "RegExp", - "Function" - ], - "optional": true - }, - { - "name": "message", - "summary": "error message", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "strict", - "summary": "an alias of `assert` that enforces strict version of comparison methods", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "type": "assert.strict" - }, - { - "name": "AssertionError", - "summary": "extension of `Error`", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "assert", - "type": "assert.AssertionError" - } - ] - }, - "assert.AssertionError": { - "name": "assert.AssertionError", - "summary": "Indicates the failure of an assertion. All errors thrown by the module will be instances of the `AssertionError` class.\n", - "extends": "Error", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/assert.yml", - "methods": [ - { - "name": "constructor", - "summary": "A subclass of `Error` that indicates the failure of an assertion.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "options", - "type": "assert.AssertionError.options", - "optional": true - } - ], - "returns": { - "type": "assert.AssertionError" - } - } - ], - "properties": [ - { - "name": "actual", - "summary": "Set to the actual argument for methods such as `assert.strictEqual()`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "any" - }, - { - "name": "expected", - "summary": "Set to the expected value for methods such as `assert.strictEqual()`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "any" - }, - { - "name": "generatedMessage", - "summary": "Indicates if the message was auto-generated (`true`) or not.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "code", - "summary": "Value is always `ERR_ASSERTION` to show that the error is an assertion error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "operator", - "summary": "Set to the passed in operator value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "assert.AssertionError.options": { - "name": "assert.AssertionError.options", - "summary": "options used in the constructor argument", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/assert.yml", - "properties": [ - { - "name": "message", - "summary": "If provided, the error message is set to this value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "actual", - "summary": "The `actual` property on the error instance.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "any" - }, - { - "name": "expected", - "summary": "The `expected` property on the error instance.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "any" - }, - { - "name": "operator", - "summary": "The `operator` property on the error instance.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "stackStartFn", - "summary": "If provided, the generated stack trace omits frames before this function.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Function", - "optional": true - } - ] - }, - "buffer": { - "name": "buffer", - "summary": "A Node.js-compatible implementation of the core `buffer` module", - "extends": "Object", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/buffer.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `buffer`.\n\nMore details on the Node.js API can be found in their [buffer module documentation](https://nodejs.org/api/buffer.html)\n", - "methods": [ - { - "name": "alloc", - "summary": "Allocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the `Buffer` will be zero-filled.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "size", - "summary": "The desired length of the new `Buffer`.", - "type": "Number" - }, - { - "name": "fill", - "summary": "A value to pre-fill the new `Buffer` with.", - "type": [ - "String", - "Number", - "buffer.Buffer", - "Uint8Array" - ], - "optional": true - }, - { - "name": "encoding", - "summary": "If `fill` is a string, this is its encoding.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "allocUnsafe", - "summary": "Allocates a new `Buffer` of `size` bytes.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "size", - "summary": "The desired length of the new `Buffer`.", - "type": "Number" - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "allocUnsafeSlow", - "summary": "Allocates a new `Buffer` of `size` bytes.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "size", - "summary": "The desired length of the new `Buffer`.", - "type": "Number" - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "byteLength", - "summary": "Returns the byte length of a string when encoded using `encoding`. This is not the same as `String.prototype.length`, which does not account for the encoding that is used to convert the string into bytes.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "string", - "summary": "A value to calculate the length of.", - "type": [ - "String", - "buffer.Buffer", - "ArrayBuffer" - ] - }, - { - "name": "encoding", - "summary": "If `string` is a string, this is its encoding.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "compare", - "summary": "Compares `buf1` to `buf2`, typically for the purpose of sorting arrays of instances. This is equivalent to calling `buf1.compare(buf2)`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "buf1", - "summary": "A value to calculate the length of.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "buf2", - "summary": "If `string` is a string, this is its encoding.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - } - ], - "returns": { - "summary": "Either `-1`, `0`, or `1`, depending on the result of the comparison. See for details.", - "type": "Number" - } - }, - { - "name": "concat", - "summary": "Returns a new which is the result of concatenating all the instances in the list together.\n\nIf the list has no items, or if the `totalLength` is `0`, then a new zero-length Buffer is returned.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "list", - "summary": "List of `Buffer` or `Uint8Array` instances to concatenate.", - "type": [ - "Array", - "Array" - ] - }, - { - "name": "totalLength", - "summary": "Total length of the Buffer instances in list when concatenated.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "Either `-1`, `0`, or `1`, depending on the result of the comparison. See for details.", - "type": "buffer.Buffer" - } - }, - { - "name": "from", - "summary": "Allocates a new `Buffer` using an `array` of bytes in the range `0 – 255`. Array entries outside that range will be truncated to fit into it.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "arg", - "summary": "The array of bytes to wrap in a `Buffer`, `Buffer` to copy, String to decode into bytes, or to wrap.", - "type": [ - "Array", - "buffer.Buffer", - "String", - "Titanium.Buffer", - "Uint8Array" - ] - }, - { - "name": "encodingOrOffset", - "summary": "encoding of the string, or start offset of array/buffer", - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "length", - "summary": "length of the underlying array/buffer to wrap", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "isBuffer", - "summary": "Returns `true` if `obj` is a `Buffer`, `false` otherwise.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "obj", - "summary": "The object to check if it is a `Buffer`", - "type": "Object" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isEncoding", - "summary": "Returns `true` if `encoding` is the name of a supported character encoding, or `false` otherwise.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "encoding", - "summary": "A character encoding name to check.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "poolSize", - "summary": "This is the size (in bytes) of pre-allocated internal `Buffer` instances used for pooling. This value may be modified.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 8192 - }, - { - "name": "INSPECT_MAX_BYTES", - "summary": "The maximum number of bytes that will be returned when `buf.inspect()` is called. This can be overridden by user modules.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 50 - }, - { - "name": "kMaxLength", - "summary": "The largest size allowed for a single instance.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "buffer.Buffer": { - "name": "buffer.Buffer", - "summary": "The `Buffer` class is a global type for dealing with binary data directly. It can be constructed in a variety of ways.", - "extends": "Object", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/buffer.yml", - "description": "Note that this `Buffer` class is highly related to the type. Both are wrappers around an underlying array of bytes and can be accessed in an array-like manner:\n\n``` javascript\nconst value = buffer[index];\nbuffer[index] = 1;\n```\n\nIn fact, this Node.js shim has been written to allow wrapping a into a Node.js compatible instance:\n\n``` javascript\nconst wrapped = Buffer.from(tiBuffer);\n```\n\nNote that this will result in a **slow** `Buffer` instance (because reads/writes pass-through to the underlying\n`Ti.Buffer` which in turn goes through the JS/native binding layer). If you only intend to *read* the data\n(or do not need to write back to the original ) you can perform a one-time copy\nof the underlying bytes to a faster JS-only `Uint8Array`:\n\n```javascript\nconst fastBuffer = Buffer.from(tiBuffer.toBlob().toArrayBuffer()); // here we're converting from Blob to Ti.Buffer to ArrayBuffer and the shim wraps that copy\n```\n", - "methods": [ - { - "name": "compare", - "summary": "Compares `buf` with `target` and returns a number indicating whether buf comes before, after, or is the same as target in sort order. Comparison is based on the actual sequence of bytes in each `Buffer`.", - "description": "`0` is returned if target is the same as buf\n`1` is returned if target should come before buf when sorted.\n`-1` is returned if target should come after buf when sorted.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "target", - "summary": "A `Buffer` or `Uint8Array` with which to compare buf.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "targetStart", - "summary": "The offset within target at which to begin comparison.", - "type": "Number", - "optional": true - }, - { - "name": "targetEnd", - "summary": "The offset within target at which to end comparison (not inclusive).", - "type": "Number", - "optional": true - }, - { - "name": "sourceStart", - "summary": "The offset within buf at which to begin comparison.", - "type": "Number", - "optional": true - }, - { - "name": "sourceEnd", - "summary": "The offset within buf at which to end comparison (not inclusive).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "copy", - "summary": "Copies data from a region of `buf` to a region in `target`, even if the target memory region overlaps with `buf`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "target", - "summary": "A `Buffer` or `Uint8Array` with which to compare buf.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "targetStart", - "summary": "The offset within target at which to begin writing.", - "type": "Number", - "optional": true - }, - { - "name": "sourceStart", - "summary": "The offset within buf at which to begin copying.", - "type": "Number", - "optional": true - }, - { - "name": "sourceEnd", - "summary": "The offset within buf at which to stop copying (not inclusive).", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "The number of bytes copied.", - "type": "Number" - } - }, - { - "name": "entries", - "summary": "Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol) of `[index, byte]` pairs from the contents of `buf`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "equals", - "summary": "Returns `true` if both `buf` and `otherBuffer` have exactly the same bytes, false otherwise. Equivalent to `buf.compare(otherBuffer) === 0`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "otherBuffer", - "summary": "A `Buffer` or `Uint8Array` with which to compare buf.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "fill", - "summary": "Fills `buf` with the specified value. If the `offset` and `end` are not given, the entire `buf` will be filled.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The value with which to fill `buf`.", - "type": [ - "String", - "Number", - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to fill `buf`.", - "type": "Number", - "optional": true - }, - { - "name": "end", - "summary": "Where to stop filling `buf` (not inclusive).", - "type": "Number", - "optional": true - }, - { - "name": "encoding", - "summary": "The encoding for `value` if `value` is a string.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "A reference to `buf`.", - "type": "buffer.Buffer" - } - }, - { - "name": "includes", - "summary": "Equivalent to `buf.indexOf() !== -1`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "What to search for.", - "type": [ - "String", - "Number", - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "byteOffset", - "summary": "Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.", - "type": "Number", - "optional": true - }, - { - "name": "encoding", - "summary": "If `value` is a string, this is its encoding.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "`true` if `value` was found in buf, `false` otherwise.", - "type": "Boolean" - } - }, - { - "name": "indexOf", - "summary": "If value is:\n\n- a string, `value` is interpreted according to the character encoding in `encoding`.\n- a `Buffer` or `Uint8Array`, value will be used in its entirety. To compare a partial `Buffer`, use [buf.slice()](buffer.Buffer.slice).\n- a number, `value` will be interpreted as an unsigned 8-bit integer value between `0` and `255`.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "What to search for.", - "type": [ - "String", - "Number", - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "byteOffset", - "summary": "Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.", - "type": "Number", - "optional": true - }, - { - "name": "encoding", - "summary": "If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "The index of the first occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.", - "type": "Number" - } - }, - { - "name": "keys", - "summary": "Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol) of `buf` keys (indices).", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "lastIndexOf", - "summary": "Identical to `buf.indexOf()`, except the last occurrence of `value` is found rather than the first occurrence.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "What to search for.", - "type": [ - "String", - "Number", - "buffer.Buffer", - "Uint8Array" - ] - }, - { - "name": "byteOffset", - "summary": "Where to begin searching in `buf`. If negative, then offset is calculated from the end of `buf`.", - "type": "Number", - "optional": true - }, - { - "name": "encoding", - "summary": "If `value` is a string, this is the encoding used to determine the binary representation of the string that will be searched for in `buf`.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "The index of the last occurrence of `value` in `buf`, or `-1` if `buf` does not contain `value`.", - "type": "Number" - } - }, - { - "name": "readDoubleBE", - "summary": "Reads a 64-bit, big-endian double from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readDoubleLE", - "summary": "Reads a 64-bit, little-endian double from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 8`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readFloatBE", - "summary": "Reads a 32-bit, big-endian float from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readFloatLE", - "summary": "Reads a 32-bit, little-endian float from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readInt8", - "summary": "Reads a signed 8-bit integer from `buf` at the specified `offset`.\n\nIntegers read from a Buffer are interpreted as two's complement signed values.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readInt16BE", - "summary": "Reads a signed 16-bit, big-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readInt16LE", - "summary": "Reads a signed 16-bit, little-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readInt32BE", - "summary": "Reads a signed 32-bit, big-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readInt32LE", - "summary": "Reads a signed 32-bit, little-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readIntBE", - "summary": "Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a big-endian, two's complement signed value supporting up to 48 bits of accuracy.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to read. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readIntLE", - "summary": "Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as a little-endian, two's complement signed value supporting up to 48 bits of accuracy.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to read. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUInt8", - "summary": "Reads an unsigned 8-bit integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 1`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUInt16BE", - "summary": "Reads an unsigned 16-bit, big-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUInt16LE", - "summary": "Reads an unsigned 16-bit, little-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUInt32BE", - "summary": "Reads an unsigned 32-bit, big-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUInt32LE", - "summary": "Reads an unsigned 32-bit, little-endian integer from `buf` at the specified `offset`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUIntBE", - "summary": "Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned big-endian value supporting up to 48 bits of accuracy.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to read. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "readUIntLE", - "summary": "Reads `byteLength` number of bytes from `buf` at the specified `offset` and interprets the result as an unsigned little-endian value supporting up to 48 bits of accuracy.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Number of bytes to skip before starting to read. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to read. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "subarray", - "summary": "Returns a new `Buffer` that references the same memory as the original, but offset and cropped by the `start` and `end` indices.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "start", - "summary": "here the new Buffer will start.", - "type": "Number", - "optional": true - }, - { - "name": "end", - "summary": "Where the new Buffer will end (not inclusive).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "slice", - "summary": "Returns a new `Buffer` that references the same memory as the original, but offset and cropped by the `start` and `end` indices.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "start", - "summary": "here the new Buffer will start.", - "type": "Number", - "optional": true - }, - { - "name": "end", - "summary": "Where the new Buffer will end (not inclusive).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "swap16", - "summary": "Interprets `buf` as an array of unsigned 16-bit integers and swaps the byte order *in-place*.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "swap32", - "summary": "Interprets `buf` as an array of unsigned 32-bit integers and swaps the byte order *in-place*.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "swap64", - "summary": "Interprets `buf` as an array of unsigned 64-bit integers and swaps the byte order *in-place*.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "buffer.Buffer" - } - }, - { - "name": "toJSON", - "summary": "Returns a JSON representation of `buf`. `JSON.stringify()` implicitly calls this function when stringifying a `Buffer` instance.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "toString", - "summary": "Decodes `buf` to a string according to the specified character encoding in `encoding`. `start` and `end` may be passed to decode only a subset of `buf`.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "encoding", - "summary": "The character encoding to use.", - "type": "String", - "optional": true - }, - { - "name": "start", - "summary": "The byte offset to start decoding at.", - "type": "Number", - "optional": true - }, - { - "name": "end", - "summary": "The byte offset to stop decoding at (not inclusive).", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "values", - "summary": "Creates and returns an [iterator](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterator_protocol) for `buf` values (bytes). This function is called automatically when a `Buffer` is used in a `for..of` statement.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "write", - "summary": "Writes `string` to `buf` at `offset` according to the character encoding in `encoding`. The `length` parameter is the number of bytes to write. If `buf` did not contain enough space to fit the entire string, only part of `string` will be written. However, partially encoded characters will not be written.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "string", - "summary": "String to write to `buf`.", - "type": "String" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write string.", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write (written bytes will not exceed buf.length - offset).", - "type": "Number", - "optional": true - }, - { - "name": "encoding", - "summary": "The character encoding of string.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeDoubleBE", - "summary": "Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything other than a JavaScript number.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeDoubleLE", - "summary": "Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything other than a JavaScript number.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 8`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeFloatBE", - "summary": "Writes `value` to `buf` at the specified `offset` as big-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything other than a JavaScript number.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeFloatLE", - "summary": "Writes `value` to `buf` at the specified `offset` as little-endian. The `value` must be a JavaScript number. Behavior is undefined when `value` is anything other than a JavaScript number.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeInt8", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid signed 8-bit integer. Behavior is undefined when `value` is anything other than a signed 8-bit integer.\n\n`value` is interpreted and written as a two's complement signed integer.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeInt16BE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.\n\n`value` is interpreted and written as a two's complement signed integer.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeInt16LE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid signed 16-bit integer. Behavior is undefined when `value` is anything other than a signed 16-bit integer.\n\n`value` is interpreted and written as a two's complement signed integer.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeInt32BE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.\n\n`value` is interpreted and written as a two's complement signed integer.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeInt32LE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid signed 32-bit integer. Behavior is undefined when `value` is anything other than a signed 32-bit integer.\n\n`value` is interpreted and written as a two's complement signed integer.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeIntBE", - "summary": "Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is anything other than a signed integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to write. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeIntLE", - "summary": "Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is anything other than a signed integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to write. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUInt8", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid unsigned 8-bit integer. Behavior is undefined when `value` is anything other than an unsigned 8-bit integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 1`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUInt16BE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUInt16LE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid unsigned 16-bit integer. Behavior is undefined when `value` is anything other than an unsigned 16-bit integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 2`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUInt32BE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUInt32LE", - "summary": "Writes `value` to `buf` at the specified `offset`. `value` must be a valid unsigned 32-bit integer. Behavior is undefined when `value` is anything other than an unsigned 32-bit integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - 4`.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUIntBE", - "summary": "Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as big-endian. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is anything other than an unsigned integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to write. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - }, - { - "name": "writeUIntLE", - "summary": "Writes `byteLength` bytes of `value` to `buf` at the specified `offset` as little-endian. Supports up to 48 bits of accuracy. Behavior is undefined when `value` is anything other than an unsigned integer.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Number to be written to `buf`.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Number of bytes to skip before starting to write. Must satisfy `0 <= offset <= buf.length - byteLength`.", - "type": "Number" - }, - { - "name": "byteLength", - "summary": "Number of bytes to write. Must satisfy `0 < byteLength <= 6`.", - "type": "Number" - } - ], - "returns": { - "summary": "`offset` plus the number of bytes written.", - "type": "Number" - } - } - ], - "properties": [ - { - "name": "buffer", - "summary": "The underlying `ArrayBuffer` object based on which this `Buffer` object is created.", - "description": "This `ArrayBuffer` is not guaranteed to correspond exactly to the original `Buffer`. See the notes on for details.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "ArrayBuffer" - }, - { - "name": "byteOffset", - "summary": "The `byteOffset` of the `Buffer`s underlying `ArrayBuffer` object.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "length", - "summary": "Returns the number of bytes in buf.", - "platforms": [ - { - "since": "8.2.0", - "name": "android" - }, - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "events": { - "name": "events", - "summary": "A Node.js-compatible implementation of the core `events` module", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/events.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `events`.\n\nMore details on the Node.js API can be found in their [events module documentation](https://nodejs.org/api/events.html)\n", - "methods": [ - { - "name": "listenerCount", - "summary": "A class method that returns the number of listeners for the given `eventName` registered on the given `emitter`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "emitter", - "summary": "The emitter to query", - "type": "EventEmitter" - }, - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Number" - } - } - ], - "properties": [ - { - "name": "defaultMaxListeners", - "summary": "The default number of maximum listeners for all EventEmitters", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 10 - }, - { - "name": "EventEmitter", - "summary": "The `EventEmitter` class is defined and exposed by the `events` module:\n``` javascript\nconst EventEmitter = require('events');\n```\nAll `EventEmitter`s emit the event `'newListener'` when new listeners are added and `'removeListener'` when existing listeners are removed.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "EventEmitter" - } - ] - }, - "EventEmitter": { - "name": "EventEmitter", - "summary": "The EventEmitter class is defined and exposed by the events module:\n``` javascript\nconst EventEmitter = require('events');\n```\nAll EventEmitters emit the event 'newListener' when new listeners are added and 'removeListener' when existing listeners are removed.\n", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/events.yml", - "events": [ - { - "name": "newListener", - "summary": "The `'newListener'` event is emitted after the listener is added.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event handler function", - "type": "Function" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "removeListener", - "summary": "The `'removeListener'` event is emitted after the listener is removed.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event handler function", - "type": "Function" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addListener", - "summary": "Alias for ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "emit", - "summary": "Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.\n\nReturns `true` if the event had listeners, `false` otherwise.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "args", - "summary": "Optional arguments to pass along to event listeners", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "eventNames", - "summary": "Returns an array listing the events for which the emitter has registered listeners.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getMaxListeners", - "summary": "Returns the current max listener value for the `EventEmitter` which is either set by or defaults to .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "listenerCount", - "summary": "Returns the number of listeners listening to the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "listeners", - "summary": "Returns a copy of the array of listeners for the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "off", - "summary": "Alias for .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "on", - "summary": "Adds the listener function to the end of the listeners array for the event named eventName.", - "description": "No checks are made to see if the listener has already been added.\n\nMultiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "once", - "summary": "Adds a **one-time** listener function for the event named `eventName`. The next time `eventName` is triggered, this listener is removed and then invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "prependListener", - "summary": "Adds the listener function to the *beginning* of the listeners array for the event named `eventName`.", - "description": "No checks are made to see if the listener has already been added.\nMultiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "prependOnceListener", - "summary": "Adds a **one-time** listener function for the event named `eventName` to the *beginning* of the listeners array. The next time `eventName` is triggered, this listener is removed, and then invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "rawListeners", - "summary": "Returns a copy of the array of listeners for the event named `eventName`, including any wrappers (such as those created by `.once()`).", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "removeAllListeners", - "summary": "Removes all listeners, or those of the specified `eventName`.", - "description": "It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams).\n\nReturns a reference to the `EventEmitter`, so that calls can be chained.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "removeListener", - "summary": "Removes the specified listener from the listener array for the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "setMaxListeners", - "summary": "By default `EventEmitter`s will print a warning if more than `10` listeners are added for a particular event.\nThis is a useful default that helps finding memory leaks.\nThe `emitter.setMaxListeners()` method allows the limit to be modified for this specific `EventEmitter` instance.\nThe value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "n", - "summary": "new max listener count", - "type": "Number" - } - ], - "returns": { - "type": "EventEmitter" - } - } - ] - }, - "fs": { - "name": "fs", - "summary": "A Node.js-compatible implementation of the core `fs` module", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `fs` core module.\n\nMore details on the Node.js API can be found in their [fs module documentation](https://nodejs.org/api/fs.html)\n\nThe `fs` module enables interacting with the file system in a way modeled on standard POSIX functions.\n\nTo use this module:\n\n``` javascript\nconst fs = require('fs');\n```\n\nAll file system operations have synchronous and asynchronous callback forms.\n\n**NOTE:** The Titanium shim for this module does not support the new Promises API yet, nor does it support some of the newer (and a subset of older) APIs.\n\nSome of the APIs are implemented as no-ops:\n\n- `chmod`\n- `chmodSync`\n- `chown`\n- `chownSync`\n- `fchmod`\n- `fchmodSync`\n- `fchown`\n- `fchownSync`\n- `fdatasync`\n- `fdatasyncSync`\n- `symlink`\n- `symlinkSync`\n- `unwatchFile`\n- `utimes`\n- `utimesSync`\n- `watch`\n- `watchFile`\n\nExplicitly unsupported for now are:\n\n- `fs.createReadStream`\n- `fs.createWriteStream`\n- `fs.fsync(fd, callback)`\n- `fs.fsyncSync(fd)`\n- `fs.ftruncate(fd[, len], callback)`\n- `fs.ftruncateSync(fd[, len])`\n- `fs.futimes(fd, atime, mtime, callback)`\n- `fs.futimesSync(fd, atime, mtime)`\n- `fs.lchmod(path, mode, callback)`\n- `fs.lchmodSync(path, mode)`\n- `fs.lchown(path, uid, gid, callback)`\n- `fs.lchownSync(path, uid, gid)`\n- `fs.link(existingPath, newPath, callback)`\n- `fs.linkSync(existingPath, newPath)`\n- `fs.opendir`\n- `fs.opendirSync`\n- `fs.readlink(path[, options], callback)`\n- `fs.readlinkSync(path[, options])`\n- `fs.rm`\n- `fs.rmSync`\n", - "methods": [ - { - "name": "access", - "summary": "Tests a user's permissions for the file or directory specified by `path`.\nThe `mode` argument is an optional integer that specifies the accessibility checks to be performed.\nCheck File access constants for possible values of `mode`.\nIt is possible to create a mask consisting of the bitwise OR of two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "mode", - "summary": "mode/permissions to check", - "type": "Number", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "accessSync", - "summary": "Synchronously tests a user's permissions for the file or directory specified by `path`.\nThe `mode` argument is an optional integer that specifies the accessibility checks to be performed.\nCheck File access constants for possible values of `mode`.\nIt is possible to create a mask consisting of the bitwise OR of two or more values (e.g. `fs.constants.W_OK | fs.constants.R_OK`).\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "mode", - "summary": "mode/permissions to check", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "appendFile", - "summary": "Asynchronously append `data` to a file, creating the file if it does not yet exist. `data` can be a `string` or a .\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath or file descriptor", - "type": [ - "String", - "buffer.Buffer", - "Number" - ] - }, - { - "name": "data", - "summary": "data to append", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": [ - "fs.appendFile.options", - "String" - ], - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "appendFileSync", - "summary": "Synchronously append `data` to a file, creating the file if it does not yet exist. `data` can be a `string` or a .\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath or file descriptor", - "type": [ - "String", - "buffer.Buffer", - "Number" - ] - }, - { - "name": "data", - "summary": "data to append", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": [ - "fs.appendFile.options", - "String" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "chmod", - "summary": "Asynchronously changes the permissions of a file. No arguments other than a possible exception are given to the completion callback.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "mode", - "summary": "new mode/permissions", - "type": [ - "String", - "Number" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "chmodSync", - "summary": "Synchronously changes the permissions of a file.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "mode", - "summary": "new mode/permissions", - "type": [ - "String", - "Number" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "chown", - "summary": "Asynchronously changes owner and group of a file. No arguments other than a possible exception are given to the completion callback.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "uid", - "summary": "new owner", - "type": "Number" - }, - { - "name": "gid", - "summary": "new group", - "type": "Number" - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "chownSync", - "summary": "Synchronously changes owner and group of a file.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "filepath", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "uid", - "summary": "new owner", - "type": "Number" - }, - { - "name": "gid", - "summary": "new group", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "close", - "summary": "Asynchronous `close`. No arguments other than a possible exception are given to the completion `callback`.\n\nCalling `fs.close()` on any file descriptor (`fd`) that is currently in use through any other fs operation may lead to undefined behavior.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "closeSync", - "summary": "Synchronous `close`.\n\nCalling `fs.close()` on any file descriptor (`fd`) that is currently in use through any other fs operation may lead to undefined behavior.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "copyFile", - "summary": "Asynchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. No arguments other than a possible exception are given to the callback function. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.\n\n`mode` is an optional integer that specifies the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).\n\n- `fs.constants.COPYFILE_EXCL`: The copy operation will fail if dest already exists.\n- `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then a fallback copy mechanism is used.\n- `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then the operation will fail.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "src", - "summary": "source filename to copy", - "type": "String" - }, - { - "name": "dest", - "summary": "destination filename of the copy operation", - "type": "String" - }, - { - "name": "mode", - "summary": "modifiers for copy operation.", - "type": "Number", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "copyFileSync", - "summary": "Synchronously copies `src` to `dest`. By default, `dest` is overwritten if it already exists. Node.js makes no guarantees about the atomicity of the copy operation. If an error occurs after the destination file has been opened for writing, Node.js will attempt to remove the destination.\n\n`mode` is an optional integer that specifies the behavior of the copy operation. It is possible to create a mask consisting of the bitwise OR of two or more values (e.g. `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).\n\n- `fs.constants.COPYFILE_EXCL`: The copy operation will fail if dest already exists.\n- `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then a fallback copy mechanism is used.\n- `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to create a copy-on-write reflink. If the platform does not support copy-on-write, then the operation will fail.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "src", - "summary": "source filename to copy", - "type": "String" - }, - { - "name": "dest", - "summary": "destination filename of the copy operation", - "type": "String" - }, - { - "name": "mode", - "summary": "modifiers for copy operation.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "exists", - "summary": "Test whether or not the given path exists by checking with the file system.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "callback", - "summary": "atypical async callback function that received the result as a single boolean arguments", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "existsSync(path)", - "summary": "Test whether or not the given path exists by checking with the file system.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "fchmod", - "summary": "Asynchronous `fchmod`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "mode", - "summary": "new mode/permissions", - "type": [ - "String", - "Number" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fchmodSync", - "summary": "Synchronous `fchmod`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "mode", - "summary": "new mode/permissions", - "type": [ - "String", - "Number" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fchown", - "summary": "Asynchronous `fchown`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "uid", - "summary": "new owner", - "type": "Number" - }, - { - "name": "gid", - "summary": "new group", - "type": "Number" - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fchownSync", - "summary": "Synchronous `fchown`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "uid", - "summary": "new owner", - "type": "Number" - }, - { - "name": "gid", - "summary": "new group", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fdatasync", - "summary": "Asynchronous `fdatasync`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fdatasyncSync", - "summary": "Synchronous `fdatasync`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fstat", - "summary": "Asynchronous `fstat`.\nThe `callback` gets two arguments `(err, stats)` where `stats` is an object.\n`fstat()` is identical to `stat()`, except that the file to be stat-ed is specified by the file descriptor `fd`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "options", - "summary": "options", - "type": "fs.stat.options", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fstatSync", - "summary": "Synchronous `fstat`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "options", - "summary": "options", - "type": "fs.stat.options", - "optional": true - } - ], - "returns": { - "type": "fs.Stats" - } - }, - { - "name": "lstat", - "summary": "Asynchronous `lstat`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.stat.options", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "lstatSync", - "summary": "Synchronous `lstat`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.stat.options", - "optional": true - } - ], - "returns": { - "type": "fs.Stats" - } - }, - { - "name": "mkdir", - "summary": "Asynchronously creates a directory.\n\nThe `callback` is given a possible exception and, if `recursive` is `true`, the first directory path created, `(err, [path])`.\n\nThe optional `options` argument can be an integer specifying `mode` (permission and sticky bits), or an object with a `mode` property and a `recursive` property indicating whether parent directories should be created.\nCalling `fs.mkdir()` when `path` is a directory that exists results in an error only when `recursive` is `false`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.mkdir.options", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function. The second argument is an optional path `string`.", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "mkdirSync", - "summary": "Synchronously creates a directory.\nReturns `undefined`, or if `recursive is `true`, the first directory path created. This is the synchronous version of `fs.mkdir()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.mkdir.options", - "optional": true - } - ], - "returns": { - "summary": "will return `undefined` if `recursive` option is not `true`", - "type": "String" - } - }, - { - "name": "mkdtemp", - "summary": "Creates a unique temporary directory.\n\nGenerates six random characters to be appended behind a required `prefix` to create a unique temporary directory. Due to platform inconsistencies, avoid trailing `X` characters in `prefix`. Some platforms, notably the BSDs, can return more than six random characters, and replace trailing `X` characters in `prefix` with random characters.\n\nThe created directory path is passed as a string to the `callback`'s second parameter.\n\nThe optional `options` argument can be a string specifying an encoding, or an object with an `encoding` property specifying the character encoding to use.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "prefix", - "summary": "file prefix", - "type": "String" - }, - { - "name": "options", - "summary": "encoding if `string`", - "type": [ - "String", - "fs.mkdtemp.options" - ], - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function. The second argument is the generated path `string`.", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "mkdtempSync", - "summary": "For detailed information, see the documentation of the asynchronous version of this API: .\n\nThe optional `options` argument can be a string specifying an encoding, or an object with an `encoding` property specifying the character encoding to use.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "prefix", - "summary": "file prefix", - "type": "String" - }, - { - "name": "options", - "summary": "encoding if `string`", - "type": [ - "String", - "fs.mkdtemp.options" - ], - "optional": true - } - ], - "returns": { - "summary": "Returns the created directory path.", - "type": "String" - } - }, - { - "name": "open", - "summary": "Asynchronous file open. See open(2).\n\n`mode` sets the file mode (permission and sticky bits), but only if the file was created. On Windows, only the write permission can be manipulated; see fs.chmod().\n\nThe `callback` gets two arguments `(err, fd)`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "flags", - "summary": "file system flags", - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "mode", - "summary": "file permissions", - "type": [ - "Number", - "String" - ], - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function, the second argument is an integer representing a file descriptor", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openSync", - "summary": "For detailed information, see the documentation of the asynchronous version of this API: `fs.open()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "flags", - "summary": "file system flags", - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "mode", - "summary": "file permissions", - "type": [ - "Number", - "String" - ], - "optional": true - } - ], - "returns": { - "summary": "Returns an integer representing the file descriptor.", - "type": "Number" - } - }, - { - "name": "read", - "summary": "Read data from the file specified by fd.\n\n`buffer` is the buffer that the data (read from the fd) will be written to.\n\n`offset` is the offset in the buffer to start writing at.\n\n`length` is an integer specifying the number of bytes to read.\n\n`position` is an argument specifying where to begin reading from in the file. If position is `null`, data will be read from the current file position, and the file position will be updated. If position is an integer, the file position will remain unchanged.\n\nThe `callback` is given the three arguments, `(err, bytesRead, buffer)`.\n\nIf the file is not modified concurrently, the end-of-file is reached when the number of bytes read is zero.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "buffer", - "summary": "buffer to read", - "type": [ - "buffer.Buffer", - "Titanium.Buffer" - ] - }, - { - "name": "offset", - "summary": "the offset in the buffer to start writing at.", - "type": "Number" - }, - { - "name": "length", - "summary": "integer specifying the number of bytes to read.", - "type": "Number" - }, - { - "name": "position", - "summary": "where to begin reading from in the file. *Unused/unsupported in Titanium.*", - "type": "Number" - }, - { - "name": "callback", - "summary": "async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "readdir", - "summary": "Asynchronous `readdir`. Reads the contents of a directory. The `callback` gets two arguments `(err, files)` where `files` is an array of the names of the files in the directory excluding `'.'` and `'..'`.\n\nThe optional `options` argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the filenames passed to the callback. If the encoding is set to 'buffer', the filenames returned will be passed as Buffer objects.\n\nIf `options.withFileTypes` is set to `true`, the `files` array will contain `fs.Dirent` objects. **NOTE:** Titanium does not yet support this.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.readdir.options", - "optional": true - }, - { - "name": "callback", - "summary": "Typical async callback function. The second argument is an array of results which may be `String`s, s, or s\n", - "type": "Function>" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "readdirSync", - "summary": "Synchronous `readdir`.\n\nThe optional `options` argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the filenames returned. If the encoding is set to 'buffer', the filenames returned will be passed as Buffer objects.\n\nIf `options.withFileTypes` is set to `true`, the result will contain `fs.Dirent` objects. **Note:** Titanium does not yet support this.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.readdir.options", - "optional": true - } - ], - "returns": { - "summary": "an array of results which may be `String`s, s, or s", - "type": [ - "Array", - "Array", - "Array" - ] - } - }, - { - "name": "readFile", - "summary": "Asynchronously reads the entire contents of a file.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "encoding `string`, or an options object", - "type": [ - "fs.readFile.options", - "String" - ], - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function, the second argument is either a `string` or a ", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "readFileSync", - "summary": "Synchronously reads the entire contents of a file.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "encoding `string`, or an options object", - "type": [ - "fs.readFile.options", - "String" - ], - "optional": true - } - ], - "returns": { - "summary": "either a `string` or a , based upon `options.encoding`", - "type": [ - "String", - "buffer.Buffer" - ] - } - }, - { - "name": "readSync", - "summary": "For detailed information, see the documentation of the asynchronous version of this API: `fs.read()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "buffer", - "summary": "buffer to read", - "type": [ - "buffer.Buffer", - "Titanium.Buffer" - ] - }, - { - "name": "offset", - "summary": "the offset in the buffer to start writing at.", - "type": "Number" - }, - { - "name": "length", - "summary": "integer specifying the number of bytes to read.", - "type": "Number" - }, - { - "name": "position", - "summary": "where to begin reading from in the file. *Unused/unsupported in Titanium.*", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "Returns the number of bytesRead.", - "type": "Number" - } - }, - { - "name": "realpath", - "summary": "Asynchronously computes the canonical pathname by resolving `.`, `..` and symbolic links.\n\nA canonical pathname is not necessarily unique. Hard links and bind mounts can expose a file system entity through many pathnames.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "realpath.native", - "summary": "Asynchronous `realpath`.\n\nThe `callback` gets two arguments `(err, resolvedPath)`.\n\nOnly paths that can be converted to UTF8 strings are supported.\n\nThe optional `options` argument can be a string specifying an encoding, or an object with an encoding property specifying the character encoding to use for the path passed to the callback. If the encoding is set to 'buffer', the path returned will be passed as a Buffer object.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "realpathSync", - "summary": "Returns the resolved pathname.\n\nFor detailed information, see the documentation of the asynchronous version of this API: `fs.realpath()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "realpathSync.native", - "summary": "Synchronous `realpath`.\n\nOnly paths that can be converted to UTF8 strings are supported.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "rename", - "summary": "Asynchronously rename file at `oldPath` to the pathname provided as `newPath`.\nIn the case that `newPath` already exists, it will be overwritten.\nIf there is a directory at `newPath`, an error will be raised instead.\nNo arguments other than a possible exception are given to the completion `callback`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "oldPath", - "summary": "source file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "newPath", - "summary": "destination file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "renameSync", - "summary": "Synchronous `rename`. Returns `undefined`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "oldPath", - "summary": "source file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "newPath", - "summary": "destination file path", - "type": [ - "String", - "buffer.Buffer" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "rmdir", - "summary": "Asynchronous `rmdir`", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.rmDir.options", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "rmSync", - "summary": "Synchronously removes files and directories (modeled on the standard POSIX `rm` utility). Returns `undefined`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.rm.options", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stat", - "summary": "Asynchronous `stat`. The `callback` gets two arguments `(err, stats)` where `stats` is an object.\n\nIn case of an error, the `err.code` will be one of Common System Errors.\n\nUsing `fs.stat()` to check for the existence of a file before calling `fs.open()`, `fs.readFile()` or `fs.writeFile()` is not recommended. Instead, user code should open/read/write the file directly and handle the error raised if the file is not available.\n\nTo check if a file exists without manipulating it afterwards, `fs.access()` is recommended.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "fs.stat.options", - "type": "Object", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "statSync", - "summary": "Synchronous `stat`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "fs.stat.options", - "optional": true - } - ], - "returns": { - "type": "fs.Stats" - } - }, - { - "name": "symlink", - "summary": "Asynchronous `symlink` which creates the link called `path` pointing to `target`. No arguments other than a possible exception are given to the completion callback.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "target", - "summary": "target of the new symlink", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "path", - "summary": "the symlink path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "symlinkSync", - "summary": "Synchronous `symlink` which creates the link called `path` pointing to `target`. No arguments other than a possible exception are given to the completion callback.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "target", - "summary": "target of the new symlink", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "path", - "summary": "the symlink path", - "type": [ - "String", - "buffer.Buffer" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "truncate", - "summary": "Asynchronous `truncate`. Returns `undefined`.\nA file descriptor can also be passed as the first argument. In this case, `fs.ftruncateSync()` is called.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "len", - "summary": "target length to truncate to", - "type": "Number", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "truncateSync", - "summary": "Synchronous `truncate`. Returns `undefined`.\nA file descriptor can also be passed as the first argument. In this case, `fs.ftruncateSync()` is called.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "len", - "summary": "target length to truncate to", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unlink", - "summary": "Asynchronous `unlink`. Returns `undefined`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unlinkSync", - "summary": "Synchronous `unlink`. Returns `undefined`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unwatchFile", - "summary": "Stop watching for changes on `filename`. If `listener` is specified, only that particular `listener` is removed. Otherwise, all listeners are removed, effectively stopping watching of `filename`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "filename", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "listener", - "summary": "callback function when file changes", - "type": "Function", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "utimes", - "summary": "Change the file system timestamps of the object referenced by `path`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "atime", - "summary": "access time", - "type": [ - "Number", - "String", - "Date" - ] - }, - { - "name": "mtime", - "summary": "modification time", - "type": [ - "Number", - "String", - "Date" - ] - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "utimesSync", - "summary": "Change the file system timestamps of the object referenced by `path`.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "atime", - "summary": "access time", - "type": [ - "Number", - "String", - "Date" - ] - }, - { - "name": "mtime", - "summary": "modification time", - "type": [ - "Number", - "String", - "Date" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "watch", - "summary": "Watch for changes on `filename`, where `filename` is either a file or a directory.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "filename", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - }, - { - "name": "listener", - "summary": "callback function when file changes", - "type": "Function", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "watchFile", - "summary": "Watch for changes on `filename`. The callback `listener` will be called each time the file is accessed.\n\n**This is a no-op on Titanium.**\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "filename", - "summary": "file path", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "options", - "summary": "options", - "type": "Object", - "optional": true - }, - { - "name": "listener", - "summary": "callback function when file changes", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "write", - "summary": "For detailed information, see the documentation of the asynchronous version of this API.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "buffer", - "summary": "buffer contents to write", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "offset", - "summary": "from the beginning of the file where this data should be written", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "length in bytes of `Buffer`; or string character `encoding`", - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "position", - "summary": "offset from the beginning of the file where this data should be written (if data to be written is a `Buffer`)", - "type": "Number", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "writeFile", - "summary": "When `file` is a filename, asynchronously writes data to the file, replacing the file if it already exists. `data` can be a string or a buffer.\n\nWhen `file` is a file descriptor, the behavior is similar to calling `fs.write()` directly (which is recommended). See the notes below on using a file descriptor.\n\nThe `encoding` option is ignored if `data` is a buffer. If `data` is a normal object, it must have an own `toString` function property.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "file", - "summary": "filename or file descriptor", - "type": [ - "String", - "buffer.Buffer", - "Number" - ] - }, - { - "name": "data", - "summary": "data to write", - "type": [ - "String", - "buffer.Buffer", - "Object" - ] - }, - { - "name": "options", - "summary": "from the beginning of the file where this data should be written", - "type": "fs.writeFile.options", - "optional": true - }, - { - "name": "callback", - "summary": "typical async callback function", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "writeFileSync", - "summary": "For detailed information, see the documentation of the asynchronous version of this API: `fs.writeFile()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "file", - "summary": "filename or file descriptor", - "type": [ - "String", - "buffer.Buffer", - "Number" - ] - }, - { - "name": "data", - "summary": "data to write", - "type": [ - "String", - "buffer.Buffer", - "Object" - ] - }, - { - "name": "options", - "summary": "from the beginning of the file where this data should be written", - "type": "fs.writeFile.options", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "writeSync", - "summary": "For detailed information, see the documentation of the asynchronous version of this API.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fd", - "summary": "file descriptor", - "type": "Number" - }, - { - "name": "buffer", - "summary": "buffer contents to write", - "type": [ - "String", - "buffer.Buffer" - ] - }, - { - "name": "offset", - "summary": "from the beginning of the file where this data should be written", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "length in bytes of `Buffer`; or string character `encoding`", - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "position", - "summary": "offset from the beginning of the file where this data should be written (if data to be written is a `Buffer`)", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "bytes written", - "type": "Number" - } - } - ], - "properties": [ - { - "name": "constants", - "summary": "Returns an object containing commonly used constants for file system operations. The specific constants currently defined are described in [FS constants](fs.constants).", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "fs.constants" - }, - { - "name": "Stats", - "summary": "The class `fs.Stats`", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "fs.Stats" - }, - { - "name": "ReadStream", - "summary": "The class `fs.ReadStream`", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "fs.ReadStream" - }, - { - "name": "WriteStream", - "summary": "The class `fs.WriteStream`", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "fs.WriteStream" - } - ] - }, - "fs.constants": { - "name": "fs.constants", - "summary": "commonly used constants for file system operations", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "O_RDONLY", - "summary": "Flag indicating to open a file for read-only access.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "O_WRONLY", - "summary": "Flag indicating to open a file for write-only access.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1 - }, - { - "name": "O_RDWR", - "summary": "Flag indicating to open a file for read-write access.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 2 - }, - { - "name": "S_IFMT", - "summary": "Bit mask used to extract the file type code.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 61440 - }, - { - "name": "S_IFREG", - "summary": "File type constant for a regular file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 32768 - }, - { - "name": "S_IFDIR", - "summary": "File type constant for a directory.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 16384 - }, - { - "name": "S_IFCHR", - "summary": "File type constant for a character-oriented device file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 8192 - }, - { - "name": "S_IFBLK", - "summary": "File type constant for a block-oriented device file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 24576 - }, - { - "name": "S_IFIFO", - "summary": "File type constant for a FIFO/pipe.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4096 - }, - { - "name": "S_IFLNK", - "summary": "File type constant for a symbolic link.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 40960 - }, - { - "name": "S_IFSOCK", - "summary": "File type constant for a socket.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 49152 - }, - { - "name": "O_CREAT", - "summary": "Flag indicating to create the file if it does not already exist.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 512 - }, - { - "name": "O_EXCL", - "summary": "Flag indicating that opening a file should fail if the `O_CREAT` flag is set and the file already exists.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 2048 - }, - { - "name": "O_NOCTTY", - "summary": "Flag indicating that if path identifies a terminal device, opening the path shall not cause that terminal to become the controlling terminal for the process (if the process does not already have one).", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 131072 - }, - { - "name": "O_TRUNC", - "summary": "Flag indicating that if the file exists and is a regular file, and the file is opened successfully for write access, its length shall be truncated to zero.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1024 - }, - { - "name": "O_APPEND", - "summary": "Flag indicating that data will be appended to the end of the file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 8 - }, - { - "name": "O_DIRECTORY", - "summary": "Flag indicating that the open should fail if the path is not a directory.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1048576 - }, - { - "name": "O_NOFOLLOW", - "summary": "Flag indicating that the open should fail if the path is a symbolic link.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 256 - }, - { - "name": "O_SYNC", - "summary": "Flag indicating that the file is opened for synchronized I/O with write operations waiting for file integrity.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 128 - }, - { - "name": "O_DSYNC", - "summary": "Flag indicating that the file is opened for synchronized I/O with write operations waiting for data integrity.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4194304 - }, - { - "name": "O_SYMLINK", - "summary": "Flag indicating to open the symbolic link itself rather than the resource it is pointing to.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 2097152 - }, - { - "name": "O_NONBLOCK", - "summary": "Flag indicating to open the file in non-blocking mode when possible.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4 - }, - { - "name": "S_IRWXU", - "summary": "File mode indicating readable, writable, and executable by owner.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 448 - }, - { - "name": "S_IRUSR", - "summary": "File mode indicating readable by owner.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 256 - }, - { - "name": "S_IWUSR", - "summary": "File mode indicating writable by owner.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 128 - }, - { - "name": "S_IXUSR", - "summary": "File mode indicating executable by owner.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 64 - }, - { - "name": "S_IRWXG", - "summary": "File mode indicating readable, writable, and executable by group.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 56 - }, - { - "name": "S_IRGRP", - "summary": "File mode indicating readable by group.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 32 - }, - { - "name": "S_IWGRP", - "summary": "File mode indicating writable by group.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 16 - }, - { - "name": "S_IXGRP", - "summary": "File mode indicating executable by group.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 8 - }, - { - "name": "S_IRWXO", - "summary": "File mode indicating readable, writable, and executable by others.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 7 - }, - { - "name": "S_IROTH", - "summary": "File mode indicating readable by others.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4 - }, - { - "name": "S_IWOTH", - "summary": "File mode indicating writable by others.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 2 - }, - { - "name": "S_IXOTH", - "summary": "File mode indicating executable by others.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1 - }, - { - "name": "F_OK", - "summary": "Flag indicating that the file is visible to the calling process. This is useful for determining if a file exists, but says nothing about `rwx` permissions. Default if no mode is specified.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "R_OK", - "summary": "Flag indicating that the file can be read by the calling process.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4 - }, - { - "name": "W_OK", - "summary": "Flag indicating that the file can be written by the calling process.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 2 - }, - { - "name": "X_OK", - "summary": "Flag indicating that the file can be executed by the calling process. This has no effect on Windows (will behave like `fs.constants.F_OK`).", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1 - }, - { - "name": "UV_FS_COPYFILE_EXCL", - "summary": "alias for `COPYFILE_EXCL`?", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1 - }, - { - "name": "COPYFILE_EXCL", - "summary": "The copy operation will fail if dest already exists.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 1 - } - ] - }, - "fs.Stats": { - "name": "fs.Stats", - "summary": "A `fs.Stats` object provides information about a file.", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "methods": [ - { - "name": "isBlockDevice", - "summary": "Returns `true` if the `fs.Stats` object describes a block device.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isCharacterDevice", - "summary": "Returns `true` if the `fs.Stats` object describes a character device.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isDirectory", - "summary": "Returns `true` if the `fs.Stats` object describes a file system directory.\n\nIf the `fs.Stats` object was obtained from `fs.lstat()`, this method will always return `false`.\nThis is because `fs.lstat()` returns information about a symbolic link itself and not the path it resolves to.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFIFO", - "summary": "Returns `true` if the `fs.Stats` object describes a first-in-first-out (FIFO) pipe.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFile", - "summary": "Returns `true` if the `fs.Stats` object describes a regular file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSocket", - "summary": "Returns `true` if the `fs.Stats` object describes a socket.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSymbolicLink", - "summary": "Returns `true` if the `fs.Stats` object describes a symbolic link.\n\nThis method is only valid when using `fs.lstat()`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "dev", - "summary": "The numeric identifier of the device containing the file.\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "ino", - "summary": "The file system specific \"Inode\" number for the file.\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "mode", - "summary": "A bit-field describing the file type and mode.\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "nlink", - "summary": "The number of hard-links that exist for the file.\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "uid", - "summary": "The numeric user identifier of the user that owns the file (POSIX).\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "gid", - "summary": "The numeric group identifier of the group that owns the file (POSIX).\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "rdev", - "summary": "A numeric device identifier if the file represents a device.\n\nAlways returns `0` on Titanium.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "size", - "summary": "The size of the file in bytes.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "blksize", - "summary": "The file system block size for i/o operations.\n\nHard-coded to `4096` on Titanium right now.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 4096 - }, - { - "name": "blocks", - "summary": "The number of blocks allocated for this file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "atimeMs", - "summary": "The timestamp indicating the last time this file was accessed expressed in milliseconds since the POSIX Epoch.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "mtimeMs", - "summary": "The timestamp indicating the last time this file was modified expressed in milliseconds since the POSIX Epoch.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "ctimeMs", - "summary": "The timestamp indicating the last time the file status was changed expressed in milliseconds since the POSIX Epoch.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "birthtimeMs", - "summary": "The timestamp indicating the creation time of this file expressed in milliseconds since the POSIX Epoch.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "atime", - "summary": "The timestamp indicating the last time this file was accessed.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "mtime", - "summary": "The timestamp indicating the last time this file was modified.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "ctime", - "summary": "The timestamp indicating the last time the file status was changed.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "birthtime", - "summary": "The timestamp indicating the creation time of this file.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - } - ] - }, - "fs.Dirent": { - "name": "fs.Dirent", - "summary": "A representation of a directory entry, which can be a file or a subdirectory within the directory, as returned by reading from an .\nThe directory entry is a combination of the file name and file type pairs.\n\n**NOTE:** Titanium does not currently implement this type.\n", - "extends": "Object", - "platforms": [], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml" - }, - "fs.appendFile.options": { - "name": "fs.appendFile.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "encoding", - "summary": "character encoding", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "utf8", - "optional": true - }, - { - "name": "mode", - "summary": "file permissions/mode", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0o666" - }, - { - "name": "flag", - "summary": "See support of file system flags.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "a", - "optional": true - } - ] - }, - "fs.mkdir.options": { - "name": "fs.mkdir.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "recursive", - "summary": "Whether to recursively create the directories.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "mode", - "summary": "Not supported on Windows.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number" - ], - "default": "0o777", - "optional": true - } - ] - }, - "fs.mkdtemp.options": { - "name": "fs.mkdtemp.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "encoding", - "summary": "The character encoding to use.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "utf8", - "optional": true - } - ] - }, - "fs.readdir.options": { - "name": "fs.readdir.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "encoding", - "summary": "If the encoding is set to `'buffer'`, the filenames returned will be passed as objects.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "utf8", - "optional": true - }, - { - "name": "withFileTypes", - "summary": "If `true`, the results will be returned as s", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - } - ] - }, - "fs.readFile.options": { - "name": "fs.readFile.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "encoding", - "summary": "If no encoding is specified, then the raw buffer is returned.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": null, - "optional": true - }, - { - "name": "flag", - "summary": "See support of file system flags.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "r", - "optional": true - } - ] - }, - "fs.rm.options": { - "name": "fs.rm.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "force", - "summary": "When `true`, exceptions will be ignored if path does not exist.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "maxRetries", - "summary": "If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or `EPERM` error is encountered, Node.js will retry the operation with a linear backoff wait of `retryDelay` milliseconds longer on each try.\nThis option represents the number of retries.\nThis option is ignored if the `recursive` option is not `true`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "recursive", - "summary": "If `true`, perform a recursive removal. In recursive mode operations are retried on failure.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "retryDelay", - "summary": "The amount of time in milliseconds to wait between retries. This option is ignored if the `recursive` option is not `true`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 100, - "optional": true - } - ] - }, - "fs.rmDir.options": { - "name": "fs.rmDir.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "maxRetries", - "summary": "If an `EBUSY`, `EMFILE`, `ENFILE`, `ENOTEMPTY`, or `EPERM` error is encountered, Node.js will retry the operation with a linear backoff wait of `retryDelay` milliseconds longer on each try.\nThis option represents the number of retries.\nThis option is ignored if the `recursive` option is not `true`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "recursive", - "summary": "If `true`, perform a recursive removal. In recursive mode operations are retried on failure.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "retryDelay", - "summary": "The amount of time in milliseconds to wait between retries. This option is ignored if the `recursive` option is not `true`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 100, - "optional": true - } - ] - }, - "fs.stat.options": { - "name": "fs.stat.options", - "summary": "options for , , , , , and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "bigint", - "summary": "Whether the numeric values in the returned object should be `bigint`.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - } - ] - }, - "fs.writeFile.options": { - "name": "fs.writeFile.options", - "summary": "options for and methods", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml", - "properties": [ - { - "name": "encoding", - "summary": "character encoding", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "utf8", - "optional": true - }, - { - "name": "mode", - "summary": "file permissions/mode", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0o666" - }, - { - "name": "flag", - "summary": "See support of file system flags.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "w", - "optional": true - } - ] - }, - "fs.WriteStream": { - "name": "fs.WriteStream", - "summary": "Instances of `fs.WriteStream` are created and returned using the `fs.createWriteStream()` function.\n\n**NOTE:** Titanium defines an empty class for this type. No methods/properties are implemented!\n", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml" - }, - "fs.ReadStream": { - "name": "fs.ReadStream", - "summary": "Instances of `fs.ReadStream` are created and returned using the `fs.createReadStream()` function.\n\n**NOTE:** Titanium defines an empty class for this type. No methods/properties are implemented!\n", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/fs.yml" - }, - "os": { - "name": "os", - "summary": "A Node.js-compatible implementation of the core `os` module", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `os` core module.\n\nMore details on the Node.js API can be found in their [os module documentation](https://nodejs.org/api/os.html)\n", - "methods": [ - { - "name": "arch", - "summary": "Returns the operating system CPU architecture for which the binary was compiled. Possible values are return `'arm'`, `'arm64'`, `'ia32'`, `'x64'`, `'mips'`, and `'unknown'`.\n\nThe return value is equivalent to . Relates strongly to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "cpus", - "summary": "Returns an array of objects containing information about each logical CPU core.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "endianness", - "summary": "Returns a string identifying the endianness of the CPU for which the binary was compiled.\n\nPossible values are `'BE'` for big endian and `'LE'` for little endian.\n\nRelated to () on Titanium.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "freemem", - "summary": "Returns the amount of free system memory in bytes as an integer.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getPriority", - "summary": "Returns the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the priority of the current process is returned.\n\nTitanium's shim, will always return `0`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "pid", - "summary": "The process ID to retrieve scheduling priority for.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "homedir", - "summary": "Returns the string path of the current user's home directory.", - "description": "On Titanium, returns the same value as .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "hostname", - "summary": "Returns the host name of the operating system as a string. On Titanium, this will return the value of ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "loadavg", - "summary": "Returns an array containing the 1, 5, and 15 minute load averages.\n\nOn Titanium, the return value is always `[0, 0, 0]`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "networkInterfaces", - "summary": "Returns an object containing network interfaces that have been assigned a network address.\n\nEach key on the returned object identifies a network interface. The associated value is an array of objects that each describe an assigned network address.\n\nOn Titanium, an empty object (`{}`) is always returned.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "platform", - "summary": "Returns a string identifying the operating system platform. Possible values are `'android'`, `'iphone'`, `'ipad'`, `'windowsphone'`, and `'windowsstore'`.\n\nThe return value is equivalent to .\n\nOn Titanium, this is equivalent to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "release", - "summary": "Returns the operating system as a string.\n\nOn Titanium, this is equivalent to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "setPriority", - "summary": "Attempts to set the scheduling priority for the process specified by `pid`. If `pid` is not provided or is `0`, the process ID of the current process is used.\n\nOn Titanium, this method is a no-op.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "pid", - "summary": "The process ID to set scheduling priority for.", - "type": "Number", - "optional": true - }, - { - "name": "priority", - "summary": "The scheduling priority to assign to the process.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "tmpdir", - "summary": "Returns the operating system's default directory for temporary files as a string.\n\nOn Titanium, this is equivalent to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "totalmem", - "summary": "Returns the total amount of system memory in bytes as an integer.\n\nOn Titanium, this is equivalent to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "type", - "summary": "Returns the operating system as a string.\n\nOn Titanium, this returns `'Darwin'` for iOS, or `'Linux'` for Android. May return `'Unknown'` for others.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "uptime", - "summary": "Returns the system uptime in number of seconds.\n\nOn Titanium, this is equivalent to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "userInfo", - "summary": "Returns information about the currently effective user.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Simple object with `encoding` property. Ignored on Titanium.", - "type": "EncodingOptions", - "optional": true - } - ], - "returns": { - "type": "OSUserInfo" - } - } - ], - "properties": [ - { - "name": "EOL", - "summary": "The operating system-specific end-of-line marker.\n\n`\\n` on POSIX\n`\\r\\n` on Windows\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "constants", - "summary": "Contains commonly used operating system-specific constants for error codes, process signals, and so on.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "os.constants" - } - ] - }, - "os.constants": { - "name": "os.constants", - "summary": "Abstract type defined for .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "properties": [ - { - "name": "signals", - "summary": "Signal constants", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - }, - { - "name": "priority", - "summary": "Priority constants", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "os.constants.priority" - }, - { - "name": "errno", - "summary": "Error constants", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - } - ] - }, - "os.constants.priority": { - "name": "os.constants.priority", - "summary": "Abstract type defined for [os.constants.priority](os.constants.priority)", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "properties": [ - { - "name": "PRIORITY_LOW", - "summary": "The lowest process scheduling priority.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 19 - }, - { - "name": "PRIORITY_BELOW_NORMAL", - "summary": "The process scheduling priority above `PRIORITY_LOW` and below `PRIORITY_NORMAL`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 10 - }, - { - "name": "PRIORITY_NORMAL", - "summary": "The default process scheduling priority.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "PRIORITY_ABOVE_NORMAL", - "summary": "The process scheduling priority above `PRIORITY_NORMAL` and below `PRIORITY_HIGH`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": -7 - }, - { - "name": "PRIORITY_HIGH", - "summary": "The process scheduling priority above `PRIORITY_ABOVE_NORMAL` and below `PRIORITY_HIGHEST`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": -14 - }, - { - "name": "PRIORITY_HIGHEST", - "summary": "The highest process scheduling priority.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": -20 - } - ] - }, - "CPUInfo": { - "name": "CPUInfo", - "summary": "Abstract type defined for the return value `()`.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "description": "Note that by default this will return simple default values which are not useful on Android. On iOS, this will report\nback a static set of values based on the detected Simulator/Device model using a lookup table.\n`times` may be an empty object or simply report `0` values for all properties.\n", - "properties": [ - { - "name": "model", - "summary": "CPU model", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "speed", - "summary": "(in MHz)", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "times", - "summary": "CPU Timings", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "CPUInfoTimes" - } - ] - }, - "CPUInfoTimes": { - "name": "CPUInfoTimes", - "summary": "Abstract type defined for the return value of `()`.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "properties": [ - { - "name": "user", - "summary": "The number of milliseconds the CPU has spent in user mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "nice", - "summary": "The number of milliseconds the CPU has spent in nice mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "sys", - "summary": "The number of milliseconds the CPU has spent in sys mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "idle", - "summary": "The number of milliseconds the CPU has spent in idle mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "irq", - "summary": "The number of milliseconds the CPU has spent in irq mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "OSUserInfo": { - "name": "OSUserInfo", - "summary": "Abstract type returned by `()`.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "properties": [ - { - "name": "uid", - "summary": "user id. Always `-1` on Titanium.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "gid", - "summary": "group id. Always `-1` on Titanium.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "username", - "summary": "Always on Titanium.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "homedir", - "summary": "Always on Titanium.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "shell", - "summary": "command shell. Always `null` on Titanium", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "EncodingOptions": { - "name": "EncodingOptions", - "summary": "Abstract type defined for `()`. **NOTE** that these options are currently ignored by Titanium!", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/os.yml", - "properties": [ - { - "name": "encoding", - "summary": "Character encoding used to interpret resulting strings. If encoding is set to `'buffer'` the `username`, `shell`, and `homedir` values will be [Buffer](buffer.Buffer) instances.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "utf8", - "optional": true - } - ] - }, - "path": { - "name": "path", - "summary": "A Node.js-compatible implementation of the core `path` module", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/path.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `path` core module.\n\nMore details on the Node.js API can be found in their [path module documentation](https://nodejs.org/api/path.html)\n", - "methods": [ - { - "name": "basename", - "summary": "The `path.basename()` method returns the last portion of a `path`, similar to the Unix `basename` command. Trailing directory separators are ignored, see .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - }, - { - "name": "ext", - "summary": "An optional file extension", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "dirname", - "summary": "The `path.dirname()` method returns the directory name of a `path`, similar to the Unix `dirname` command. Trailing directory separators are ignored, see .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "extname", - "summary": "The `path.extname()` method returns the extension of the `path`, from the last occurrence of the `.` (period) character to end of string in the last portion of the path. If there is no `.` in the last portion of the path, or if there are no `.` characters other than the first character of the `basename` of `path` (see `()`) , an empty string is returned.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "format", - "summary": "The `path.format()` method returns a `path` string from an object. This is the opposite of `()`.\n\nWhen providing properties to the `pathObject` remember that there are combinations where one property has priority over another:\n\n`pathObject.root` is ignored if `pathObject.dir` is provided\n`pathObject.ext` and `pathObject.name` are ignored if `pathObject.base` exists\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "pathObject", - "summary": "The file path.", - "type": "PathObject" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "isAbsolute", - "summary": "The `path.isAbsolute()` method determines if `path` is an absolute path.\n\nIf the given `path` is a zero-length string, `false` will be returned.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "join", - "summary": "The `path.join()` method joins all given `path` segments together using the platform-specific separator as a delimiter, then normalizes the resulting path.\n\nZero-length `path` segments are ignored. If the joined path string is a zero-length string then `'.'` will be returned, representing the current working directory.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "paths", - "summary": "A sequence of path segments", - "type": "String", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "normalize", - "summary": "The `path.normalize()` method normalizes the given `path`, resolving `'..'` and `'.'` segments.\n", - "description": "When multiple, sequential path segment separation characters are found (e.g. `/` on POSIX and either `\\` or `/` on Windows), they are replaced by a single instance of the platform-specific path segment separator (`/` on POSIX and `\\` on Windows). Trailing separators are preserved.\n\nIf the `path` is a zero-length string, `'.'` is returned, representing the current working directory.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "parse", - "summary": "The `path.parse()` method returns an object whose properties represent significant elements of the `path`. Trailing directory separators are ignored, see .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "PathObject" - } - }, - { - "name": "relative", - "summary": "The `path.relative()` method returns the relative path from from to to based on the current working directory. If `from` and `to` each resolve to the same path (after calling `path.resolve()` on each), a zero-length string is returned.\n\nIf a zero-length string is passed as `from` or `to`, the current working directory will be used instead of the zero-length strings.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "from", - "summary": "The source file path.", - "type": "String" - }, - { - "name": "to", - "summary": "The destination file path.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "resolve", - "summary": "The `path.resolve()` method resolves a sequence of paths or path segments into an absolute path.\n", - "description": "The given sequence of paths is processed from right to left, with each subsequent `path` prepended until an absolute path is constructed. For instance, given the sequence of path segments: `/foo`, `/bar`, `baz`, calling `path.resolve('/foo', '/bar', 'baz')` would return `/bar/baz` because `'baz'` is not an absolute path but `'/bar' + '/' + 'baz'` is.\n\nIf, after processing all given `path` segments, an absolute path has not yet been generated, the current working directory is used.\n\nThe resulting path is normalized and trailing slashes are removed unless the path is resolved to the root directory.\n\nZero-length `path` segments are ignored.\n\nIf no `path` segments are passed, `path.resolve()` will return the absolute path of the current working directory.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "paths", - "summary": "A sequence of paths or path segments", - "type": "String", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "toNamespacedPath", - "summary": "On Windows systems only, returns an equivalent namespace-prefixed path for the given `path`. If `path` is not a string, `path` will be returned without modifications.\n\nThis method is meaningful only on Windows systems. On POSIX systems, the method is non-operational and always returns `path` without modifications.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "The file path.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - } - ], - "properties": [ - { - "name": "delimiter", - "summary": "Provides the platform-specific path delimiter:\n\n`;` for Windows\n`:` for POSIX\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "posix", - "summary": "The `path.posix` property provides access to POSIX specific implementations of the `path` methods.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "path" - }, - { - "name": "sep", - "summary": "Provides the platform-specific path segment separator:\n\n- `\\` on Windows\n- `/` on POSIX\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "win32", - "summary": "The `path.win32` property provides access to Windows-specific implementations of the `path` methods.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "path" - } - ] - }, - "PathObject": { - "name": "PathObject", - "summary": "Abstract type defined for and ", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/path.yml", - "properties": [ - { - "name": "dir", - "summary": "directory path", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "root", - "summary": "Root filesystem path, e.g. `'/'` or `'C:\\\\'`. Ignored if `pathObject.dir` is provided", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "base", - "summary": "file basename, e.g. `'file.txt'`", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "name", - "summary": "file basename without the extension, e.g. `'file'`. Ignored if `pathObject.base` exists", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "ext", - "summary": "file extension, e.g. `'.txt'`. Ignored if `pathObject.base` exists", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "process": { - "name": "process", - "summary": "A Node.js-compatible implementation of the core `process` module", - "extends": "EventEmitter", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/process.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `process` core module.\n\nMore details on the Node.js API can be found in their [process module documentation](https://nodejs.org/api/process.html)\n\nNote that this particular shim has many unimplemented, no-op, or unsupported APIs and events.\n\nThe `process` object is a global that provides information about, and control over, the current Node.js process. As a global, it is always available to Node.js applications without using `require()`. It can also be explicitly accessed using `require()`:\n\n``` javascript\nconst process = require('process');\n```\n", - "events": [ - { - "name": "newListener", - "summary": "The `'newListener'` event is emitted after the listener is added.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "properties": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event handler function", - "type": "Function" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "removeListener", - "summary": "The `'removeListener'` event is emitted after the listener is removed.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "properties": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event handler function", - "type": "Function" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "uncaughtException", - "summary": "The `'uncaughtException'` event is emitted when an uncaught JavaScript exception bubbles all the way back to the event loop.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "err", - "summary": "The uncaught exception.", - "type": "Error" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "warning", - "summary": "The `'warning'` event is emitted whenever Node.js emits a `process` warning.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "warning", - "summary": "The warning thrown.", - "type": "Error" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addListener", - "summary": "Alias for ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "emit", - "summary": "Synchronously calls each of the listeners registered for the event named eventName, in the order they were registered, passing the supplied arguments to each.\n\nReturns `true` if the event had listeners, `false` otherwise.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "args", - "summary": "Optional arguments to pass along to event listeners", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "eventNames", - "summary": "Returns an array listing the events for which the emitter has registered listeners.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "returns": { - "type": "Array" - } - }, - { - "name": "getMaxListeners", - "summary": "Returns the current max listener value for the `EventEmitter` which is either set by or defaults to .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "returns": { - "type": "Number" - } - }, - { - "name": "listenerCount", - "summary": "Returns the number of listeners listening to the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "listeners", - "summary": "Returns a copy of the array of listeners for the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "off", - "summary": "Alias for .", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "on", - "summary": "Adds the listener function to the end of the listeners array for the event named eventName.", - "description": "No checks are made to see if the listener has already been added.\n\nMultiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "once", - "summary": "Adds a **one-time** listener function for the event named `eventName`. The next time `eventName` is triggered, this listener is removed and then invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "prependListener", - "summary": "Adds the listener function to the *beginning* of the listeners array for the event named `eventName`.", - "description": "No checks are made to see if the listener has already been added.\nMultiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "prependOnceListener", - "summary": "Adds a **one-time** listener function for the event named `eventName` to the *beginning* of the listeners array. The next time `eventName` is triggered, this listener is removed, and then invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "rawListeners", - "summary": "Returns a copy of the array of listeners for the event named `eventName`, including any wrappers (such as those created by `.once()`).", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "removeAllListeners", - "summary": "Removes all listeners, or those of the specified `eventName`.", - "description": "It is bad practice to remove listeners added elsewhere in the code, particularly when the `EventEmitter` instance was created by some other component or module (e.g. sockets or file streams).\n\nReturns a reference to the `EventEmitter`, so that calls can be chained.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "removeListener", - "summary": "Removes the specified listener from the listener array for the event named `eventName`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "eventName", - "summary": "The event name", - "type": "String" - }, - { - "name": "listener", - "summary": "The event listener/callback function", - "type": "Function" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "setMaxListeners", - "summary": "By default `EventEmitter`s will print a warning if more than `10` listeners are added for a particular event.\nThis is a useful default that helps finding memory leaks.\nThe `emitter.setMaxListeners()` method allows the limit to be modified for this specific `EventEmitter` instance.\nThe value can be set to `Infinity` (or `0`) to indicate an unlimited number of listeners.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "EventEmitter", - "parameters": [ - { - "name": "n", - "summary": "new max listener count", - "type": "Number" - } - ], - "returns": { - "type": "EventEmitter" - } - }, - { - "name": "abort", - "summary": "No-op on Titanium", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "binding", - "summary": "This is not intended as user-facing API and will throw an `Error` if invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "chdir", - "summary": "This is unsupported on Titanium and will throw an `Error` if invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cpuUsage", - "summary": "Returns a dummy object with `0`-ed out values.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "cwd", - "summary": "Returns the value of `__dirname` on Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "disconnect", - "summary": "No-op on Titanium", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "dlopen", - "summary": "This is unsupported on Titanium and will throw an `Error` if invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "emitWarning", - "summary": "The `process.emitWarning()` method can be used to emit custom or application specific process warnings. These can be listened for by adding a handler to the `'warning'` event.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "warning", - "summary": "The warning to emit.", - "type": [ - "String", - "Error" - ] - }, - { - "name": "options", - "summary": "When `warning` is a `String`, `type` is the name to use for the type of warning being emitted.", - "type": [ - "String", - "EmitWarningOptions" - ], - "optional": true - }, - { - "name": "code", - "summary": "A unique identifier for the warning instance being emitted.", - "type": "String", - "optional": true - }, - { - "name": "ctor", - "summary": "When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace.", - "type": "Function", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "exit", - "summary": "This is unsupported on Titanium and will throw an `Error` if invoked.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "umask", - "summary": "No-op on Titanium. Will always return `0`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "uptime", - "summary": "The `process.uptime()` method returns the number of seconds the current Node.js process has been running.\n\nThe return value includes fractions of a second. Use `Math.floor()` to get whole seconds.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - } - ], - "properties": [ - { - "name": "arch", - "summary": "Returns the operating system CPU architecture for which the binary was compiled. Possible values are return `'arm'`, `'arm64'`, `'ia32'`, `'x64'`, `'mips'`, and `'unknown'`.\n\nThe return value is equivalent to . Relates strongly to .\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "argv", - "summary": "The `process.argv` property returns an array containing the command-line arguments passed when the Node.js process was launched.\nThe first element will be `process.execPath`. See if access to the original value of `argv[0]` is needed.\nThe second element will be the path to the JavaScript file being executed.\nThe remaining elements will be any additional command-line arguments.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "argv0", - "summary": "The `process.argv0` property stores a read-only copy of the original value of `argv[0]` passed when Node.js starts.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "" - }, - { - "name": "channel", - "summary": "Always `undefined` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object", - "value": "undefined" - }, - { - "name": "config", - "summary": "Always `{}` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - }, - { - "name": "connected", - "summary": "Always `false` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "value": false - }, - { - "name": "debugPort", - "summary": "The port used by the debugger when enabled.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "env", - "summary": "This is an object whose keys are environment variable names and whose values are the related environment variable values.\n\nIn Titanium, we will pass along environment variables from the system/CLI to the app for `'development'` builds,\n*but will not do so for `'production'` builds!*\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - }, - { - "name": "execArgv", - "summary": "Always `[]` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "execPath", - "summary": "Always `''` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "exitCode", - "summary": "Unused in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": "undefined" - }, - { - "name": "noDeprecation", - "summary": "The `process.noDeprecation` property indicates whether the `--no-deprecation` flag is set on the current Node.js process. See the documentation for the `'warning'` event and the `emitWarning()` method for more information about this flag's behavior.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "pid", - "summary": "The `process.pid` property returns the PID of the process. Always returns `0` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "platform", - "summary": "Equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "ppid", - "summary": "The `process.ppid` property returns the PID of the parent of the current process. Always returns `0` in Titanium.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "value": 0 - }, - { - "name": "stderr", - "summary": "The `process.stderr` property returns a stream connected to `stderr`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - }, - { - "name": "stdout", - "summary": "The `process.stdout` property returns a stream connected to `stdout`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - }, - { - "name": "title", - "summary": "Equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "throwDeprecation", - "summary": "The initial value of `process.throwDeprecation` indicates whether the `--throw-deprecation` flag is set on the current Node.js process. process.throwDeprecation is mutable, so whether or not deprecation warnings result in errors may be altered at runtime. See the documentation for the `'warning'` event and the `emitWarning()` method for more information.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "traceDeprecation", - "summary": "The `process.traceDeprecation` property indicates whether the `--trace-deprecation` flag is set on the current Node.js process. See the documentation for the `'warning'` event and the `emitWarning()` method for more information about this flag's behavior.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "version", - "summary": "Equivalent to ", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "versions", - "summary": "An object containing version information for included dependencies", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object" - } - ] - }, - "EmitWarningOptions": { - "name": "EmitWarningOptions", - "summary": "An abstract type for the options that may be passed to ().", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/process.yml", - "properties": [ - { - "name": "type", - "summary": "When `warning` is a `String`, `type` is the name to use for the type of warning being emitted.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "Warning", - "optional": true - }, - { - "name": "code", - "summary": "A unique identifier for the warning instance being emitted.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "ctor", - "summary": "When `warning` is a `String`, `ctor` is an optional function used to limit the generated stack trace.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Function", - "default": "`process.emitWarning`", - "optional": true - }, - { - "name": "detail", - "summary": "Additional text to include with the error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - } - ] - }, - "string_decoder": { - "name": "string_decoder", - "summary": "A Node.js-compatible implementation of the core `string_decoder` module", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/string_decoder.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `string_decoder` core module.\n\nMore details on the Node.js API can be found in their [string_decoder module documentation](https://nodejs.org/api/string_decoder.html)\n", - "properties": [ - { - "name": "StringDecoder", - "summary": "The class/constructor method for `StringDecoder` instances.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "StringDecoder" - } - ] - }, - "StringDecoder": { - "name": "StringDecoder", - "summary": "The primary class exported by the core module.", - "extends": "Object", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/string_decoder.yml", - "methods": [ - { - "name": "constructor", - "summary": "Creates a new `StringDecoder` instance.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "encoding", - "summary": "The character encoding the `StringDecoder` will use.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "StringDecoder" - } - }, - { - "name": "end", - "summary": "Returns any remaining input stored in the internal buffer as a string. Bytes representing incomplete UTF-8 and UTF-16 characters will be replaced with substitution characters appropriate for the character encoding.\n\nIf the `buffer` argument is provided, one final call to `stringDecoder.write()` is performed before returning the remaining input. After `end()` is called, the `stringDecoder` object can be reused for new input.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "buffer", - "summary": "A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ], - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "write", - "summary": "Returns a decoded string, ensuring that any incomplete multibyte characters at the end of the `Buffer`, or `TypedArray`, or `DataView` are omitted from the returned string and stored in an internal buffer for the next call to `stringDecoder.write()` or `stringDecoder.end()`.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "buffer", - "summary": "A `Buffer`, or `TypedArray`, or `DataView` containing the bytes to decode.", - "type": [ - "buffer.Buffer", - "Uint8Array" - ] - } - ], - "returns": { - "type": "String" - } - } - ] - }, - "util": { - "name": "util", - "summary": "A Node.js-compatible implementation of the core `util` module", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/util.yml", - "description": "Titanium provides a number of shims and ports of core Node.js module functionality.\n\nThis module is intended to provide a Node-compatible port of the `util` core module.\n\nMore details on the Node.js API can be found in their [util module documentation](https://nodejs.org/api/util.html)\n", - "methods": [ - { - "name": "callbackify", - "summary": "Takes an `async` function (or a function that returns a `Promise`) and returns a function following the error-first callback style, i.e. taking an `(err, value) => ... callback` as the last argument. In the callback, the first argument will be the rejection reason (or `null` if the `Promise` resolved), and the second argument will be the resolved value.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "original", - "summary": "An `async` function", - "type": "Function" - } - ], - "returns": { - "summary": "a callback style function", - "type": "Function" - } - }, - { - "name": "debug", - "summary": "Alias for `util.debuglog`. Usage allows for readability of that doesn't imply logging when only using `util.debuglog().enabled`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "section", - "summary": "A string identifying the portion of the application for which the `debuglog` function is being created.", - "type": "String" - }, - { - "name": "callback", - "summary": "A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.", - "type": "Function", - "optional": true - } - ], - "returns": { - "summary": "The logging function", - "type": "Function" - } - }, - { - "name": "debuglog", - "summary": "The `util.debuglog()` method is used to create a function that conditionally writes debug messages to `stderr` based on the existence of the `NODE_DEBUG` environment variable. If the section name appears within the value of that environment variable, then the returned function operates similar to `console.error()`. If not, then the returned function is a no-op.\n\n**NOTE:** Titanium currently returns a no-op regardless of the `NODE_DEBUG` environment variable.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "section", - "summary": "A string identifying the portion of the application for which the `debuglog` function is being created.", - "type": "String" - }, - { - "name": "callback", - "summary": "A callback invoked the first time the logging function is called with a function argument that is a more optimized logging function.", - "type": "Function", - "optional": true - } - ], - "returns": { - "summary": "The logging function", - "type": "Function" - } - }, - { - "name": "deprecate", - "summary": "The `util.deprecate()` method wraps fn (which may be a function or class) in such a way that it is marked as deprecated.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fn", - "summary": "The function that is being deprecated.", - "type": "Function" - }, - { - "name": "msg", - "summary": "A warning message to display when the deprecated function is invoked.", - "type": "String" - }, - { - "name": "code", - "summary": "A deprecation code. **NOTE:** Titanium currently ignores this argument.", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "The deprecated function wrapped to emit a warning.", - "type": "Function" - } - }, - { - "name": "format", - "summary": "The `util.format()` method returns a formatted string using the first argument as a printf-like format string which can contain zero or more format specifiers. Each specifier is replaced with the converted value from the corresponding argument.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "format", - "summary": "A `printf`-like format string.", - "type": "String" - }, - { - "name": "args", - "summary": "variable arguments to inject into the formatted string", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "formatWithOptions", - "summary": "This function is identical to `util.format()`, except in that it takes an `inspectOptions` argument which specifies options that are passed along to `util.inspect()`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "inspectOptions", - "summary": "Options passed along to `()`", - "type": "UtilInspectOptions" - }, - { - "name": "format", - "summary": "A `printf`-like format string.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "inherits", - "summary": "Usage of `util.inherits()` is discouraged. Please use the ES6 `class` and `extends` keywords to get language level inheritance support. Also note that the two styles are semantically incompatible.\n\nInherit the prototype methods from one constructor into another. The prototype of `constructor` will be set to a new object created from `superConstructor`.\n\nThis mainly adds some input validation on top of `Object.setPrototypeOf(constructor.prototype, superConstructor.prototype)`. As an additional convenience, `superConstructor` will be accessible through the `constructor.super_` property.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "constructor", - "summary": "constructor function for \"subclass\"", - "type": "Function" - }, - { - "name": "superConstructor", - "summary": "constructor function for \"super class\"", - "type": "Function" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "inspect", - "summary": "The `util.inspect()` method returns a string representation of `object` that is intended for debugging. The output of `util.inspect` may change at any time and should not be depended upon programmatically. Additional `options` may be passed that alter the result. `util.inspect()` will use the constructor's name and/or `@@toStringTag` to make an identifiable tag for an inspected `value`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "Any JavaScript primitive or Object.", - "type": "any" - }, - { - "name": "options", - "summary": "Additional options to modify the output of the inspect function", - "type": "UtilInspectOptions", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "isArray", - "summary": "Alias for `Array.isArray()`.\n\nReturns `true` if the given `object` is an `Array`. Otherwise, returns `false`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBoolean", - "summary": "Returns `true` if the given `object` is a `Boolean`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBuffer", - "summary": "Returns `true` if the given `object` is a `Buffer`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isDate", - "summary": "Returns `true` if the given `object` is a `Date`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isError", - "summary": "Returns `true` if the given `object` is an `Error`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFunction", - "summary": "Returns `true` if the given `object` is a `Function`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isNull", - "summary": "Returns `true` if the given `object` is strictly `null`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isNullOrUndefined", - "summary": "Returns `true` if the given `object` is `null` or `undefined`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isNumber", - "summary": "Returns `true` if the given `object` is a `Number`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isObject", - "summary": "Returns `true` if the given `object` is strictly an `Object` **and** not a `Function` (even though functions are objects in JavaScript). Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPrimitive", - "summary": "Returns `true` if the given `object` is a primitive type. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isRegExp", - "summary": "Returns `true` if the given `object` is a `RegExp`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isString", - "summary": "Returns `true` if the given `object` is a `string`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSymbol", - "summary": "Returns `true` if the given `object` is a `Symbol`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isUndefined", - "summary": "Returns `true` if the given `object` is `undefined`. Otherwise, returns `false`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "object", - "summary": "any value", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "log", - "summary": "The `util.log()` method prints the given `string` to `stdout` with an included timestamp.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "string", - "summary": "string to print", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "promisify", - "summary": "Takes a function following the common error-first callback style, i.e. taking an `(err, value) => ... callback` as the last argument, and returns a version that returns promises.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "original", - "summary": "A typical Node.js style callback function", - "type": "Function" - } - ], - "returns": { - "summary": "a function that returns a `Promise`", - "type": "Function" - } - } - ], - "properties": [ - { - "name": "types", - "summary": "`util.types` provides type checks for different kinds of built-in objects. Unlike `instanceof` or `Object.prototype.toString.call(value)`, these checks do not inspect properties of the object that are accessible from JavaScript (like their prototype), and usually have the overhead of calling into C++.\n\nThe result generally does not make any guarantees about what kinds of properties or behavior a value exposes in JavaScript. They are primarily useful for addon developers who prefer to do type checking in JavaScript.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "util.types" - } - ] - }, - "UtilInspectOptions": { - "name": "UtilInspectOptions", - "summary": "Abstract type for the options object passed to ", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/util.yml", - "properties": [ - { - "name": "showHidden", - "summary": "If `true`, object's non-enumerable symbols and properties are included in the formatted result. `WeakMap` and `WeakSet` entries are also included as well as user defined prototype properties (excluding method properties).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "depth", - "summary": "Specifies the number of times to recurse while formatting object. This is useful for inspecting large objects. To recurse up to the maximum call stack size pass `Infinity` or `null`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 2, - "optional": true - }, - { - "name": "colors", - "summary": "If `true`, the output is styled with ANSI color codes. Colors are customizable.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "customInspect", - "summary": "If `false`, `[util.inspect.custom](depth, opts)` functions are not invoked.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true, - "optional": true - }, - { - "name": "showProxy", - "summary": "If `true`, `Proxy` inspection includes the target and handler objects.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "maxArrayLength", - "summary": "Specifies the maximum number of `Array`, `TypedArray`, `WeakMap` and `WeakSet` elements to include when formatting. Set to `null` or `Infinity` to show all elements. Set to `0` or negative to show no elements.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 100, - "optional": true - }, - { - "name": "maxStringLength", - "summary": "Specifies the maximum number of characters to include when formatting. Set to `null` or `Infinity` to show all elements. Set to `0` or negative to show no characters.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 10000, - "optional": true - }, - { - "name": "breakLength", - "summary": "The length at which input values are split across multiple lines. Set to `Infinity` to format the input as a single line (in combination with `compact` set to `true` or any number >= `1`).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 80, - "optional": true - }, - { - "name": "compact", - "summary": "Setting this to `false` causes each object key to be displayed on a new line. It will also add new lines to text that is longer than `breakLength`. If set to a number, the most n inner elements are united on a single line as long as all properties fit into `breakLength`. Short array elements are also grouped together. No text will be reduced below 16 characters, no matter the `breakLength` size. For more information, see the example below.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Boolean", - "Number" - ], - "default": 3, - "optional": true - }, - { - "name": "sorted", - "summary": "If set to `true` or a function, all properties of an object, and `Set` and `Map` entries are sorted in the resulting string. If set to `true` the default sort is used. If set to a function, it is used as a compare function.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Boolean", - "Function" - ], - "optional": true - }, - { - "name": "getters", - "summary": "If set to `true`, getters are inspected. If set to `'get'`, only getters without a corresponding setter are inspected. If set to `'set'`, only getters with a corresponding setter are inspected. This might cause side effects depending on the getter function.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Boolean", - "String" - ], - "default": false, - "optional": true - } - ] - }, - "util.types": { - "name": "util.types", - "summary": "`util.types` provides type checks for different kinds of built-in objects. Unlike `instanceof` or `Object.prototype.toString.call(value)`, these checks do not inspect properties of the object that are accessible from JavaScript (like their prototype), and usually have the overhead of calling into C++.\n\nThe result generally does not make any guarantees about what kinds of properties or behavior a value exposes in JavaScript. They are primarily useful for addon developers who prefer to do type checking in JavaScript.\n", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/NodeJS/util.yml", - "methods": [ - { - "name": "isAnyArrayBuffer", - "summary": "Returns `true` if the `value` is a built-in `ArrayBuffer` or `SharedArrayBuffer` instance.\n\nSee also `util.types.isArrayBuffer()` and `util.types.isSharedArrayBuffer()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isArgumentsObject", - "summary": "Returns `true` if the `value` is an `arguments` object.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isArrayBuffer", - "summary": "Returns `true` if the `value` is a built-in `ArrayBuffer` instance. This does not include `SharedArrayBuffer` instances. Usually, it is desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isArrayBufferView", - "summary": "Returns `true` if the `value` is an instance of one of the `ArrayBuffer` views, such as typed array objects or `DataView`. Equivalent to `ArrayBuffer.isView()`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isAsyncFunction", - "summary": "Returns `true` if the `value` is an `async` function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBigInt64Array", - "summary": "Returns `true` if the `value` is a `Bigint64Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBigUint64Array", - "summary": "Returns `true` if the `value` is a `BigUint64Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBooleanObject", - "summary": "Returns `true` if the `value` is a boolean object, e.g. created by `new Boolean()`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isBoxedPrimitive", - "summary": "Returns `true` if the `value` is any boxed primitive object, e.g. created by `new Boolean()`, `new String()` or `Object(Symbol())`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isDataView", - "summary": "Returns `true` if the `value` is a built-in `DataView` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isDate", - "summary": "Returns `true` if the `value` is a built-in `Date` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFloat32Array", - "summary": "Returns `true` if the `value` is a built-in `Float32Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFloat64Array", - "summary": "Returns `true` if the `value` is a built-in `Float64Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isGeneratorFunction", - "summary": "Returns `true` if the `value` is a generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isGeneratorObject", - "summary": "Returns `true` if the `value` is a generator object as returned from a built-in generator function. This only reports back what the JavaScript engine is seeing; in particular, the return value may not match the original source code if a transpilation tool was used.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isInt8Array", - "summary": "Returns `true` if the `value` is a built-in `Int8Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isInt16Array", - "summary": "Returns `true` if the `value` is a built-in `Int16Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isInt32Array", - "summary": "Returns `true` if the `value` is a built-in `Int32Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isMap", - "summary": "Returns `true` if the `value` is a built-in `Map` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isMapIterator", - "summary": "Returns `true` if the `value` is an iterator returned for a built-in `Map` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isNativeError", - "summary": "Returns `true` if the `value` is an instance of a built-in `Error` type.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isNumberObject", - "summary": "Returns `true` if the `value` is a number object, e.g. created by `new Number()`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPromise", - "summary": "Returns `true` if the `value` is a built-in `Promise`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isRegExp", - "summary": "Returns `true` if the `value` is a regular expression object.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSet", - "summary": "Returns `true` if the `value` is a built-in `Set` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSetIterator", - "summary": "Returns `true` if the `value` is an iterator returned for a built-in `Set` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSharedArrayBuffer", - "summary": "Returns `true` if the `value` is a built-in `SharedArrayBuffer` instance. This does not include `ArrayBuffer` instances. Usually, it is desirable to test for both; See `util.types.isAnyArrayBuffer()` for that.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isStringObject", - "summary": "Returns `true` if the `value` is a string object, e.g. created by new `String()`.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSymbolObject", - "summary": "Returns `true` if the `value` is a symbol object, created by calling `Object()` on a `Symbol` primitive.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isTypedArray", - "summary": "Returns `true` if the `value` is a built-in `TypedArray` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isUint8Array", - "summary": "Returns `true` if the `value` is a built-in `Uint8Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isUint8ClampedArray", - "summary": "Returns `true` if the `value` is a built-in `Uint8ClampedArray` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isUint16Array", - "summary": "Returns `true` if the `value` is a built-in `Uint16Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isUint32Array", - "summary": "Returns `true` if the `value` is a built-in `Uint32Array` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isWeakMap", - "summary": "Returns `true` if the `value` is a built-in `WeakMap` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isWeakSet", - "summary": "Returns `true` if the `value` is a built-in `WeakSet` instance.", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "value to check", - "type": "any" - } - ], - "returns": { - "type": "Boolean" - } - } - ] - }, - "Titanium.API": { - "name": "Titanium.API", - "summary": "The top-level API module, containing methods to output messages to the system log.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/API/API.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "debug", - "summary": "Logs messages with a `debug` severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "error", - "summary": "Logs messages with an `error` severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "info", - "summary": "Logs messages with an `info` severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "log", - "summary": "Logs messages with the specified severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "level", - "summary": "Log level. One of `info`, `warn`, `error`, `debug` and `trace`. If the value is not \nrecognized, an info-level message prefixed with the value is logged.\n", - "type": "String" - }, - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "timestamp", - "summary": "Logs messages with a `timestamp` severity-level, prefixed with a timestamp float number \nrepresenting the number of seconds since January 1st, 2001.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "trace", - "summary": "Logs messages with a `trace` severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "warn", - "summary": "Logs messages with a `warn` severity-level.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "message", - "summary": "Message to log. Accepts an array on iOS only.", - "type": [ - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ] - }, - "Titanium.Accelerometer": { - "name": "Titanium.Accelerometer", - "summary": "The top-level Accelerometer module, used to determine the device's physical position.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Accelerometer/Accelerometer.yml", - "description": "An accelerometer is a hardware unit integrated into a mobile device, that detects when the \ndevice has moved, and returns its new orientation in a three-dimensional space. With its \nsingle `update` event, this module provides an interface to access the output positional data.\n\nAn accelerometer needs to be switched on in order for it to report to the operating system, \nwhich consumes a lot of power that will deplete the battery over time. This is why it is \nrecommended that the accelerometer is switched off when not in use.\n\nThe accelerometer may be switched on and off by simply adding and removing the `update` \nevent listener function. See the example for a demonstration.\n", - "events": [ - { - "name": "update", - "summary": "Fired when the accelerometer changes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "timestamp", - "summary": "Reference timestamp since the previous change. This is not a valid timestamp and should \nsimply be used to determine the number of milliseconds between events.\n", - "type": "Number" - }, - { - "name": "y", - "summary": "Current `y` axis of the device.", - "type": "Number" - }, - { - "name": "x", - "summary": "Current `x` axis of the device.", - "type": "Number" - }, - { - "name": "z", - "summary": "Current `z` axis of the device.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Basic Accelerometer Event", - "code": "Adds an accelerometer update event listener, and displays the x, y and z axis in the \nwindow when the device is moved. On Android, the accelerometer is switched off and on when \nthe application is paused and resumed.\n\n``` js\nvar win = Ti.UI.createWindow({\n backgroundColor: 'white',\n exitOnClose:true,\n layout: 'vertical'\n});\n\nopts = {\n color:'black',\n font:{fontSize:20},\n text:'-',\n top:20, left:10,\n width:300\n};\nvar labelTimestamp = Ti.UI.createLabel(opts);\nwin.add(labelTimestamp);\nvar labelx = Ti.UI.createLabel(opts);\nwin.add(labelx);\nvar labely = Ti.UI.createLabel(opts);\nwin.add(labely);\nvar labelz = Ti.UI.createLabel(opts);\nwin.add(labelz);\nwin.open();\n\nvar accelerometerCallback = function(e) {\n labelTimestamp.text = 'timestamp: ' + e.timestamp;\n labelx.text = 'x: ' + e.x;\n labely.text = 'y: ' + e.y;\n labelz.text = 'z: ' + e.z;\n};\n\nif (Ti.Platform.model === 'Simulator' || Ti.Platform.model.indexOf('sdk') !== -1 ) {\n alert('Accelerometer does not work on a virtual device');\n} else {\n Ti.Accelerometer.addEventListener('update', accelerometerCallback);\n if (Ti.Platform.name === 'android') {\n win.addEventListener(\"open\", function(e) {\n win.activity.addEventListener(\"pause\", function() {\n Ti.API.info(\"removing accelerometer callback on pause\");\n Ti.Accelerometer.removeEventListener('update', accelerometerCallback);\n });\n win.activity.addEventListener(\"resume\", function() {\n Ti.API.info(\"adding accelerometer callback on resume\");\n Ti.Accelerometer.addEventListener('update', accelerometerCallback);\n });\n });\n }\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ] - }, - "Titanium.Android.ActionBar": { - "name": "Titanium.Android.ActionBar", - "summary": "An action bar is a window feature that identifies the application and user location,\nand provides user actions and navigation modes.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/ActionBar.yml", - "description": "You can add action items to the action bar by defining an Android menu and setting the\nmenu items to display as action items. See [Menu](Titanium.Android.Menu) and\n[MenuItem](Titanium.Android.MenuItem) for details.\n\nYou cannot change the action bar's settings until the window's [activity](Titanium.UI.Window.activity)\nor tab group's [activity](Titanium.UI.TabGroup.activity) has been created.\nYou can detect this by assigning a callback to the activity's [onCreate](Titanium.Android.Activity.onCreate)\nproperty.\n\nNote that setting the [Window.navBarHidden](Titanium.UI.Window.navBarHidden) property\nto true disables the Action Bar since it is part of the navigation title bar.\n\nFor more examples on using the Action Bar, refer to the\n[Android Action Bar guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/Android_Action_Bar.html).\n\n#### Application Notes for Alloy\n\nStarting with Alloy 1.5.0, you can add ActionBar attributes to the `ActionBar` element.\nTo use the action bar, add the `` tag as a child of either a\na `` or ``, then set ActionBar attributes in either the XML or TSS file.\n\nStarting with Alloy 1.4.0, you can also add ActionBar attributes to the `Menu` element.\nDo not define ActionBar attributes in both the `ActionBar` and `Menu` elements. Only define the\nattributes in one element.\n\nTo add action items to the action bar, add the `` tag as a child of either\na `` or ``, then add `` tags as children of the `` tag.\nSet MenuItem attributes in either the XML or TSS file.\n\nFor an example of using the Action Bar with Alloy, see \"Action Bar using Alloy XML Markup\" below.\n", - "examples": [ - { - "description": "Action Bar using Alloy XML Markup", - "code": "Adds action items and sets several properties on a window's action bar in the XML and TSS files.\n\n`app/views/index.xml`:\n``` xml\n\n \n \n \n \n \n \n \n \n\n```\n\n\n`app/controllers/index.js`:\n```\nfunction doMenuClick() {}\nfunction openSettings() {}\nfunction doSearch() {}\n$.index.open();\n```\n\n`app/styles/index.tss`:\n```\n\"MenuItem\": {\n showAsAction: Ti.Android.SHOW_AS_ACTION_ALWAYS\n},\n\"#item1\": {\n icon: Ti.Android.R.drawable.ic_menu_preferences\n},\n\"#item2\": {\n icon: Ti.Android.R.drawable.ic_menu_search\n},\n\"#actionbar\": {\n icon: \"/actionicon.png\",\n displayHomeAsUp: true,\n backgroundImage: \"/actionbackground.png\"\n}\n```\n" - }, - { - "description": "Action Bar Example", - "code": "The following example sets several properties on a window's action bar.\n\n``` js\nconst win = Ti.UI.createWindow({\n title: \"Old Title\",\n navBarHidden: false\n});\nif (OS_ANDROID) {\n win.activity.onCreate = () => {\n const actionBar = win.activity.actionBar;\n if (actionBar) {\n actionBar.backgroundImage = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'bg.png').nativePath;\n actionBar.title = \"New Title\";\n actionBar.onHomeIconItemSelected = () => {\n Ti.API.info(\"Home icon clicked!\");\n };\n }\n };\n}\nwin.open();\n```\n\nThe above can be done for a tab group via its [activity](Titanium.UI.TabGroup.activity) property.\nNote that individual tab windows do not have an activity. Only the root tab group (which hosts the tabs)\nprovides an activity property.\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides the action bar if it is currently showing.", - "description": "See also:\n[hide](https://developer.android.com/reference/android/app/ActionBar.html#hide())\nin the Android API Reference.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setDisplayShowHomeEnabled", - "summary": "Shows or hides the action bar home icon", - "description": "See also:\n[setDisplayShowHomeEnabled](https://developer.android.com/reference/android/app/ActionBar.html#setDisplayShowHomeEnabled(boolean))\nin the Android API Reference.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "show", - "summary": "Boolean to show or hide action bar home icon", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setDisplayShowTitleEnabled", - "summary": "Shows or hides the action bar title/subtitle", - "description": "See also:\n[setDisplayShowTitleEnabled](https://developer.android.com/reference/android/app/ActionBar.html#setDisplayShowTitleEnabled(boolean))\nin the Android API Reference.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "show", - "summary": "Boolean to show or hide action bar title/subtitle", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Shows the action bar if it is currently hidden.", - "description": "See also:\n[show](https://developer.android.com/reference/android/app/ActionBar.html#show())\nin the Android API Reference.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "backgroundImage", - "summary": "The background image for the action bar, specified as a local file path or URL.", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "String", - "permission": "write-only" - }, - { - "name": "displayHomeAsUp", - "summary": "Displays an \"up\" affordance on the \"home\" area of the action bar.", - "description": "See also: [setDisplayHomeAsUpEnabled](https://developer.android.com/reference/android/app/ActionBar.html#setDisplayHomeAsUpEnabled(boolean))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "Boolean", - "permission": "write-only" - }, - { - "name": "homeAsUpIndicator", - "summary": "Sets a custom icon for the \"home\" button in the corner of the action bar.", - "description": "Can be set to a `String` file path or URL to an image, to an image blob, or to a resource ID\nfrom `Ti.App.Android.R.drawable.*` or `Ti.Android.R.drawable.*`. It's highly recommended to set this\nto a vector drawable resource ID.\n", - "platforms": [ - { - "since": "11.0.0", - "name": "android" - } - ], - "type": [ - "String", - "Number", - "Titanium.Blob" - ], - "permission": "write-only" - }, - { - "name": "homeButtonEnabled", - "summary": "Enable or disable the \"home\" button in the corner of the action bar.", - "description": "See also: [setHomeButtonEnabled](https://developer.android.com/reference/android/app/ActionBar.html#setHomeButtonEnabled(boolean))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "Boolean", - "permission": "write-only" - }, - { - "name": "icon", - "summary": "Sets the application icon displayed in the \"home\" area of the action bar.", - "description": "Before Titanium 11.0.0, this property only supports a `String` and it must be assigned a local file path\nor URL to an image.\n\nAs of Titanium 11.0.0, this property can also be assigned an image blob or a native drawable resource ID\nfrom `Ti.App.Android.R.drawable.*` or `Ti.Android.R.drawable.*`.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": [ - "String", - "Number", - "Titanium.Blob" - ], - "permission": "write-only" - }, - { - "name": "logo", - "summary": "Sets the application logo displayed in the \"home\" area of the action bar.", - "description": "Before Titanium 11.0.0, this property only supports a `String` and it must be assigned a local file path\nor URL to an image.\n\nAs of Titanium 11.0.0, this property can also be assigned an image blob or a native drawable resource ID\nfrom `Ti.App.Android.R.drawable.*` or `Ti.Android.R.drawable.*`.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": [ - "String", - "Number", - "Titanium.Blob" - ], - "permission": "write-only" - }, - { - "name": "navigationMode", - "summary": "Controls the navigation mode.", - "description": "The navigation mode can be [NAVIGATION_MODE_STANDARD](Titanium.Android.NAVIGATION_MODE_STANDARD), or [NAVIGATION_MODE_TABS](Titanium.Android.NAVIGATION_MODE_TABS).\nA TabGroup is initialized by Titanium Mobile with `NAVIGATION_MODE_TABS`, and can be hidden by setting to `NAVIGATION_MODE_STANDARD`. `NAVIGATION_MODE_LIST` is not yet supported.\nSee also: [setNavigationMode](https://developer.android.com/reference/android/app/ActionBar.html#setNavigationMode(int))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "onHomeIconItemSelected", - "summary": "Callback function called when the home icon is clicked.", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "Callback", - "permission": "write-only" - }, - { - "name": "subtitle", - "summary": "Sets the subtitle of the action bar.", - "platforms": [ - { - "since": "3.2.3", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "title", - "summary": "Sets the title of the action bar.", - "platforms": [ - { - "since": "3.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "customView", - "summary": "Sets a view to be used for a custom navigation mode.", - "description": "Inserts a custom view for navigation in the space\nbetween the application's home button and menu actions.\nThe custom view is trimmed to fit the space available.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "visible", - "summary": "Gets or sets the action bar visibility state.", - "description": "Setting this property to `true` or `false` is the equivalent of calling the\n[show()](Titanium.Android.ActionBar.show) or [hide()](Titanium.Android.ActionBar.hide) methods.\n", - "platforms": [ - { - "since": "11.0.0", - "name": "android" - } - ], - "type": "Boolean" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.Activity": { - "name": "Titanium.Android.Activity", - "summary": "The Titanium binding of an Android Activity.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml", - "description": "According to the Android API Reference, an activity is \"a single, focused thing that a\nuser can do.\"\n\nIn almost all cases, an activity is associated with a window. Activities are central\nto the Android **Back** button navigation -- the **Back** button closes the current\nactivity and returns to whatever activity was open previously.\n\nIn Titanium, the Android Activity is not created until a window or tab group is opened.\nAfter a Window or TabGroup object is created but before it is opened, its `activity` property\nrefers to an empty JavaScript object. You can use it to set properties on the activity, such as\nthe `onCreateOptionsMenu` property, but you cannot invoke any Activity methods.\n\nAfter the window or tab group opens, a real Activity object is created and the properties from\nthe JavaScript object are copied over. The `activity` property now refers to this real Activity object,\nwhich you can use to call the various Activity methods. For example, to use the\n`invalidateOptionsMenu` method, you need to get the activity after the window or tab group opens.\n\nSee also [android.app.Activity](https://developer.android.com/reference/android/app/Activity.html)\nin the Android API Reference.\n\n#### Activity Lifecycle\n\nIn Android, activities are created, started, resumed, paused, stopped, destroyed and restarted.\nTitanium generates lifecycle events for activities but does not generate application-level events.\nTo be notified when an activity's lifecycle event is triggered, assign callbacks to the following activity\nproperties:\n\n * [onCreate](Titanium.Android.Activity.onCreate)\n * [onStart](Titanium.Android.Activity.onStart)\n * [onResume](Titanium.Android.Activity.onResume)\n * [onPause](Titanium.Android.Activity.onPause)\n * [onStop](Titanium.Android.Activity.onStop)\n * [onDestroy](Titanium.Android.Activity.onDestroy)\n * [onRestart](Titanium.Android.Activity.onRestart)\n\nSee also the \"Understand the Lifecycle Callbacks\" section in\n[Android Developers: Activity Lifecycle](https://developer.android.com/training/basics/activity-lifecycle/starting.html).\n\n#### Don't keep activities option\n\nAndroid 4.0 and greater devices have an option called **Don't keep activities** under the **Developer\nOptions** menu. When this option is enabled, the Android OS will destroy an activity as soon as it\nis stopped. It is intended to help developers debug their apps. For example, it can simulate the\ncase that Android will kill an activity in the background due to memory pressure. In\nnormal use, it is not recommended to turn this option on because this may lead to unexpected issues\non the apps, such as freezes, force closes and reboots.\n\nWhen the **Don't keep activities** option is enabled, the lifecycle of the activity is different\nfrom the normal case. Whenever the user leaves an activity, such as backgrounding the app using the\nHOME button, this activity is destroyed by Android, which calls `onDestroy`. In the normal case, `onStop`\nwould be called and the activity would not be destroyed. Later, when the user goes back to that activity, this\nactivity will be recreated, which calls `onCreate`. In the normal case, since the activity is not destroyed,\n`onRestart` would be called instead. Therefore, some events, such as the open and close events on the Window\nor TabGroup, will be fired differently from the normal case, and the root window of the app must set\n[exitOnClose](Titanium.UI.Window.exitOnClose) to true; otherwise, the app will be unable to back out, that is,\nhitting the BACK button in the root window will not allow the application to exit.\n\n#### Deprecated Behavior\n\nPrior to Release 8.0.0, you would set the below \"tiapp.xml\" property to `true` to handle the case\nwhere the Android OS would automatically close all child activity windows after the app has been backgrounded\nfor about 30 minutes, bringing the app back to the root splash screen activity window. The below property\nwould restart your app's UI in this case. This is no longer needed in 8.0.0 since Titanium now sets the\n\"AndroidManifest.xml\" setting\n[android:alwaysRetainTaskState](https://developer.android.com/guide/topics/manifest/activity-element#always)\nto the root activity instead\n\n``` xml\ntrue\n```\n\nPrior to Release 3.4.0, to monitor lifecycle events, use the activity's events, `create`, `destroy`,\n`pause`, `resume`, `start` and `stop`, to be notified when an activity is created, destroyed, paused,\nresumed, started and stopped, respectively.\n\nYou can only set Activity properties from a TabGroup object after the tab group opens.\n\nPrior to Release 3.2.0, you can create either a \"lightweight\" or \"heavyweight\" window, as\ndescribed on the reference page. A *heavyweight* window creates a\nnew `Activity`. A *lightweight* window runs inside the same activity as the code that\ncreated it. If you try to reference the activity of lightweight window, it returns undefined.\n", - "events": [ - { - "name": "newintent", - "summary": "Fired when the activity is already running and an intent different than the one that launched it was received.\n", - "description": "This event will only be fired by [Ti.Android.rootActivity](Titanium.Android.rootActivity), which is\nthe splash screen activity. This event will never be fired by any of the child activities. The root\nactivity' [intent](Titanium.Android.Intent) property will be updated when to the new intent when fired.\n\nSee also:\n[onNewIntent](https://developer.android.com/reference/android/app/Activity.html#onNewIntent(android.content.Intent))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "properties": [ - { - "name": "intent", - "summary": "The `Intent` passed to the native `onNewIntent` method.", - "type": "Titanium.Android.Intent" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "onIntent", - "summary": "Fired when the activity is launched.", - "platforms": [ - { - "since": "6.0.0", - "name": "android" - } - ], - "properties": [ - { - "name": "intent", - "summary": "The `Intent` used to launch the Activity.", - "type": "Titanium.Android.Intent" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "userleavehint", - "summary": "Fired when the activity is about to go into the background as a result of user choice.", - "description": "See also:\n[onUserLeaveHint](https://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint())\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ] - }, - { - "name": "userinteraction", - "summary": "Called whenever a key, touch, or trackball event is dispatched to the activity.", - "description": "Implement this method if you wish to know that the user has interacted with the device in some\nway while your activity is running. This event and `userleavehint` are intended to help activities\nmanage status bar notifications intelligently; specifically, for helping activities determine the\nproper time to cancel a notfication.\n\nAll calls to your activity's \"userleavehint\" event will be accompanied by calls to \"userinteraction\".\nThis ensures that your activity will be told of relevant user activity such as pulling down the\nnotification pane and touching an item there.\n\nNote that this callback will be invoked for the touch down action that begins a touch gesture,\nbut may not be invoked for the touch-moved and touch-up actions that follow.\n\nSee also:\n[onUserInteraction](https://developer.android.com/reference/android/app/Activity.html#onUserInteraction())\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ] - } - ], - "examples": [ - { - "description": "Callback Example", - "code": "The following example shows how to start an activity and retrieve a result code\nand optional data intent when the activity ends.\n\n``` js\nactivity.startActivityForResult(intent, function(e) {\n // The request code used to start this Activity\n var requestCode = e.requestCode;\n // The result code returned from the activity\n // (https://developer.android.com/reference/android/app/Activity.html#StartingActivities)\n var resultCode = e.resultCode;\n // A Titanium.Android.Intent filled with data returned from the Activity\n var intent = e.intent;\n // The Activity the received the result\n var source = e.source;\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "finish", - "summary": "Closes this activity.", - "description": "See also:\n[finish](https://developer.android.com/reference/android/app/Activity.html#finish())\nin the Android API Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getString", - "summary": "Gets an Android or Application string using the specified Resource ID and optional format arguments.", - "description": "If the optional format arguments are supplied, these are substituted for the\ncorresponding format specifiers in the string. For example, given the following\nstring resource:\n\n``` xml\n\"Hello %1$s, this is %2$s.\"\n```\n\nYou could call `getString` like this:\n\n``` js\nTi.Android.currentActivity.getString(Ti.App.Android.R.string.greeting, \"Bob\", \"Doug\" );\n```\n\nThe resulting string is:\n\n```\n\"Hello Bob, this is Doug.\"\n```\n\nSee also:\n* [getString](https://developer.android.com/reference/android/content/Context.html#getString(int))\n in the Android Developer Reference\n* [Formatter](https://developer.android.com/reference/java/util/Formatter.html)\n in the Android Developer Reference\n* [String Resources](https://developer.android.com/guide/topics/resources/string-resource.html#String)\n in the Android Developer Guide\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "resourceId", - "summary": "Resource ID from the Application or Android.", - "type": "Number" - }, - { - "name": "format", - "summary": "Optional format arguments for the String resource. May be repeated.", - "type": "any", - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "invalidateOptionsMenu", - "summary": "Declares that the option menu has changed and should be recreated.", - "description": "This method needs to be used in Android 3.0 and above when changing menus at runtime. See\n[changingTheMenu](https://developer.android.com/guide/topics/ui/menus.html#ChangingTheMenu) in\nthe Android API Reference for more details.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setRequestedOrientation", - "deprecated": { - "notes": "Use the property instead", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the requested Activity orientation.", - "description": "See also:\n[setRequestedOrientation](https://developer.android.com/reference/android/app/Activity.html#setRequestedOrientation(int))\nin the Android API Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "orientation", - "summary": "Orientation mode for the activity.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setResult", - "summary": "Sets the result of this activity using an `Intent`.", - "description": "This method should only be used by [Ti.Android.rootActivity](Titanium.Android.rootActivity) when launched\nby another app via [startActivityForResult](Titanium.Android.Activity.startActivityForResult). After calling\n`setResult()`, you are expected to call the root activity's [finish](Titanium.Android.Activity.finish)\nmethod afterwards to return the result to the calling app.\n\nSee Android's documentation for\n[setResult](https://developer.android.com/reference/android/app/Activity.html#setResult(int)).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "resultCode", - "summary": "Result code for this activity.", - "type": "Number" - }, - { - "name": "intent", - "summary": "An optional `Intent` with extra result data.", - "type": "Titanium.Android.Intent", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setSupportActionBar", - "summary": "Sets a toolbar instance to be used as an ActionBar.", - "description": "This method is used if you want to add a Toolbar as an ActionBar after the Activity has been created.\nIf you want to set it up before that [supportToolbar](Titanium.Android.Activity.supportToolbar) must be used.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "toolbar", - "summary": "Instance of a toolbar to be used as an ActionBar", - "type": "Titanium.UI.Toolbar" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "startActivity", - "summary": "Starts a new activity, using the passed in `Intent` as the description.", - "description": "See also: [startActivity](https://developer.android.com/reference/android/app/Activity.html#startActivity(android.content.Intent))\n in the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "Description of the activity to start.", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "startActivityForResult", - "summary": "The same as `startActivity`, but also accepts a callback function for handling the result of the started Activity.", - "description": "See also:\n[startActivityForResult](https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "Description of the activity to start.", - "type": "Titanium.Android.Intent" - }, - { - "name": "callback", - "summary": "Callback function to be executed when the activity sets result. See\nexamples.\n", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openOptionsMenu", - "summary": "Programmatically opens the options menu.", - "description": "See also: [onMenuOpened](https://developer.android.com/reference/android/app/Activity.html#onMenuOpened(int, android.view.Menu))\nin the Android API Reference.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "sendBroadcast", - "summary": "Broadcast the passed in `Intent` to all `BroadcastReceiver`s.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "Description of the broadcast.", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "sendBroadcastWithPermission", - "summary": "Broadcast the passed in `Intent` to all `BroadcastReceiver`s with an optional permission.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "Description of the broadcast.", - "type": "Titanium.Android.Intent" - }, - { - "name": "receiverPermission", - "summary": "Name of the permission that the receiver should hold in order to receive the broadcast.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "actionBar", - "summary": "The action bar for this activity.", - "description": "See also: [Action Bar](https://developer.android.com/guide/topics/ui/actionbar.html) in\nthe Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.ActionBar", - "permission": "read-only" - }, - { - "name": "intent", - "summary": "The last `Intent` received by this activity.", - "description": "Will initially be set to the intent that created/launched the activity. If this is the app's root activity,\nthen this intent will change when a \"newintent\" event has been fired.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.Intent", - "permission": "read-only" - }, - { - "name": "onCreate", - "summary": "Callback function called when the Android activity is created.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onCreateOptionsMenu", - "summary": "Callback function called to initially create an Android options menu\nfor this Activity when the user presses the **Menu** button.\n", - "description": "See the menu examples in .\n\nSee also:\n[Creating an Options Menu](https://developer.android.com/guide/topics/ui/menus.html#options-menu)\nin the Android Developer's Guide.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onDestroy", - "summary": "Callback function called when the Android activity is destroyed.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onPause", - "summary": "Callback function called when the Android activity is paused.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onPrepareOptionsMenu", - "summary": "Callback function called to prepare an options menu for display when the user presses\nthe **Menu** button.\n", - "description": "See the menu examples in .\n\nSee also:\n[Creating an Options Menu](https://developer.android.com/guide/topics/ui/menus.html#options-menu)\nin the Android Developer's Guide.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onRestart", - "summary": "Callback function called when the Android activity is restarted.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onResume", - "summary": "Callback function called when the Android activity is resumed.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onStart", - "summary": "Callback function called when the Android activity is started.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "onStop", - "summary": "Callback function called when the Android activity is stopped.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "requestedOrientation", - "summary": "Specifies a specific orientation for this activity.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "write-only", - "constants": [ - "Titanium.Android.SCREEN_ORIENTATION_BEHIND", - "Titanium.Android.SCREEN_ORIENTATION_LANDSCAPE", - "Titanium.Android.SCREEN_ORIENTATION_NOSENSOR", - "Titanium.Android.SCREEN_ORIENTATION_PORTRAIT", - "Titanium.Android.SCREEN_ORIENTATION_SENSOR", - "Titanium.Android.SCREEN_ORIENTATION_UNSPECIFIED", - "Titanium.Android.SCREEN_ORIENTATION_USER" - ] - }, - { - "name": "supportToolbar", - "summary": "Toolbar instance that serves as ActionBar", - "description": "This property is used to set a toolbar as an ActionBar prior to the actual activity creation.\nAfter the activity is created that must be done through the [setSupportActionBar()](Titanium.Android.Activity.setSupportActionBar) method.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Titanium.UI.Toolbar" - } - ], - "subtype": "proxy" - }, - "ActivityResult": { - "name": "ActivityResult", - "summary": "Simple object passed to the\n[startActivityForResult](Titanium.Android.Activity.startActivityForResult) callback.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml", - "properties": [ - { - "name": "requestCode", - "summary": "Unique, automatically generated integer request code.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "resultCode", - "summary": "Integer result code that the started activity passed to\n[setResult](Titanium.Android.Activity.setResult).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "intent", - "summary": "Intent that can contain data returned to the caller. Data can be attached to\nthe intent as \"extras\").\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Android.Intent" - } - ] - }, - "ActivityLifecycleCallbackObject": { - "name": "ActivityLifecycleCallbackObject", - "summary": "Simple object passed to the callbacks for\nonCreate, onDestroy, onPause, onResume, onStart, onStop, onRestart.\n\nAdditional properties may be set on the Object.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml", - "properties": [ - { - "name": "source", - "summary": "The Activity firing the callback.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Android.Activity" - } - ] - }, - "OptionsMenuCallbackObject": { - "name": "OptionsMenuCallbackObject", - "summary": "Simple object passed to the callbacks for\nonPrepareOptionsMenu and onCreateOptionsMenu.\n\nAdditional properties may be set on the Object.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Activity.yml", - "properties": [ - { - "name": "menu", - "summary": "The relevant Menu.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Android.Menu" - } - ] - }, - "Titanium.Android": { - "name": "Titanium.Android", - "summary": "The top-level Android module.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml", - "description": "The Android module allows the application to manage various Android components.\n\n#### Action Bar\n\nAn action bar is a UI feature that identifies the application and user location, and\nprovides user actions and navigation modes.\n\nThe Titanium SDK lets you customize the look of the action bar and add action items.\nAction items are added using the API.\n\nFor more information about the action bar, see the\n[Titanium.Android.ActionBar API reference](Titanium.Android.ActionBar).\n\n#### Activities\n\nAn Android application is made up of one or more activities. Each activity represents a single screen\nwith a user interface.\n\nIn Titanium, each `Window` or `TabGroup` has its own activity. The application\ncan access the activity of a `Window` and `TabGroup` object and monitor its lifecycle events.\nTitanium also lets you launch new activities by creating intents to launch them.\nSee the \"Intents\" section below.\n\nFor more information about activities, see the\n[Titanium.Android.Activity API reference](Titanium.Android.Activity).\n\n#### Broadcast Intents and Receivers\n\nBroadcast Intents allow your application to send out a message to any application that sets up\na Broadcast Receiver to listen to it. Your application can also register Broadcast Receivers\nto listen to system events sent by the Android OS, such as low battery warnings or airplane\nmode changes.\n\nFor more information about broadcasts, see the\n[Android Broadcast Intents and Receivers guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Broadcast_Intents_and_Receivers.html)\nand [Titanium.Android.BroadcastReceiver API reference](Titanium.Android.BroadcastReceiver).\n\n#### Intents\n\nIntents are message objects that specify actions to perform which can start either activities,\nbroadcasts or services.\n\nFor more information about intents, see the\n[Titanium.Android.Intent API reference](Titanium.Android.Intent).\n\n#### Intent Filters\n\nIntent Filters advertise to the Android OS that your application handles certain actions and\ndata types. For example, when another application wants to share an image or text, your application\ncan define intent filters to let Android know your application can handle those data types.\n\nFor more information about intent filters, see the\n[Android Intent Filters guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intent_Filters.html).\n\n#### Notifications\n\nNotifications alert the user that something is happening to your application while it is\nin the background. Notifications appear in the notification drawer until the user\nclears them and on the lock screen for devices running Android 5.0 or greater.\nNote that the user can filter or turn notifications on and off from **Settings**.\nFor more information about notifications, see the\n[Titanium.Android.Notification API reference](Titanium.Android.Notification).\n\nFor Android toast notifications (pop-up notifications sent while the application is in the\nforeground), see .\n\n#### Options Menu\n\nThe options menu is a feature of older Android devices (prior to Android 3.0 (API 11)), and has been\nreplaced by the action bar. The options menu is accessed by pressing the **Menu** and presents\na pop-up menu of options the user can execute.\n\nThe `Titanium.Android.Menu` API is used to construct both the options menu and action items for\nthe action bar.\n\nFor more information about the options menu, see the\n[Titanium.Android.Menu API reference](Titanium.Android.Menu).\n\n#### Services\n\nA service is a component started by an application that runs in the background. The service\ndoes not have any application UI associated with it, so the user does not directly interact\nwith it, only your application.\n\nThe Titanium SDK gives you the ability to write your own Android Services using JavaScript.\nThe service executes your JavaScript code at intervals you specify. Note that the service\nwill stop running when you back out of the app. So, if you want the service to continue running,\nthen it's recommended that you set the root window's [exitOnClose](Titanium.UI.Window.exitOnClose)\nproperty to `false` so that the window will persist in the background like iOS.\n\nFor more information about services, see the\n[Titanium.Android.Service API reference](Titanium.Android.Service).\n\n#### Permissions\n\nStarting from Android 6.0 (API level 23), users need to grant certain permissions to apps while the\napp is running. You can read it more [here](https://developer.android.com/training/permissions/requesting.html).\nStarting with Android 13 you have to use more granular media permissions. Check the [official documentation](https://developer.android.com/about/versions/13/behavior-changes-13#granular-media-permissions).\nMake sure to add e.g. `` to your tiapp.xml too.\n\nIn Titanium SDK, to support this, we have the method. It is used to\nrequest any permission you may need. An example of using it is shown below:\n\n``` js\nvar permissions = [ 'android.permission.CAMERA', 'android.permission.READ_EXTERNAL_STORAGE', 'android.permission.WRITE_EXTERNAL_STORAGE' ];\nif (Ti.Platform.versionMajor >= 13) {\n // example for camera and image permission on Android 13\n permissions = [ 'android.permission.CAMERA', 'android.permission.READ_MEDIA_IMAGES' ]\n}\nTi.Android.requestPermissions(permissions, function (e) {\n if (e.success) {\n Ti.API.info('SUCCESS');\n } else {\n Ti.API.info('ERROR: ' + e.error);\n }\n});\n```\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createIntentChooser", - "summary": "Creates an activity chooser intent, used to allow the user to select a target activity\nfor an intent.\n", - "description": "Use this method when the user wants to take an action that could use any one of a\nnumber of applications. For example, when sending a plain text message, the user\nmay choose to send a text message, send an email, or post to a social network.\n\nYou pass in an [Intent](Titanium.Android.Intent) representing the action being taken,\nand a title for the chooser.\n\nThe method returns another intent, representing the chooser, which can be used to\nstart an activity. See the code example for details on how to display the chooser.\n\nFor more information, see the official Android documentation for\n[Intent.ACTION_CHOOSER](https://developer.android.com/reference/android/content/Intent.html#ACTION_CHOOSER)\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "examples": [ - { - "description": "Using a Chooser", - "code": "The following example uses an activity chooser to send a plain text message.\n\n``` js\nvar intent = Ti.Android.createIntent( {\n action: Ti.Android.ACTION_SEND,\n type: 'text/plain'\n});\nintent.putExtra(Ti.Android.EXTRA_SUBJECT, 'This is the subject.');\nintent.putExtra(Ti.Android.EXTRA_TEXT, 'This is some text to send.')\n\nvar chooser = Ti.Android.createIntentChooser(intent, 'Send Message');\nvar activity = Ti.Android.currentActivity.startActivity(chooser);\n```\n" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "The intent to display a chooser for.", - "type": "Titanium.Android.Intent" - }, - { - "name": "title", - "summary": "Title to display on the chooser.", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Android.Intent" - } - }, - { - "name": "createPendingIntent", - "summary": "Creates a [PendingIntent](Titanium.Android.PendingIntent) to be used inside a\n[Notification](Titanium.Android.Notification).\n", - "description": "If `FLAG_NO_CREATE` is specified and no matching pending intent exists, returns\n`null`.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on the new object, including any defined by\n, except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.PendingIntent" - } - }, - { - "name": "createService", - "summary": "Create a so you can start/stop it and listen for events from it.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "An `Intent` created with [createServiceIntent](Titanium.Android.createServiceIntent),\nwhich specifies the service to be instantiated.\n", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "Titanium.Android.Service" - } - }, - { - "name": "createServiceIntent", - "summary": "Create an `Intent` to be used to start a service.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Options for the Service.", - "type": "ServiceIntentOptions" - } - ], - "returns": { - "type": "Titanium.Android.Intent" - } - }, - { - "name": "hasPermission", - "summary": "Returns `true` if the app has permission access.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "permission", - "summary": "The permission to check for access. This can be any of the constants listed here\nwith dangerous protection level [here](https://developer.android.com/reference/android/Manifest.permission.html).\nFor example, `android.permission.WRITE_CONTACTS`.\n\nSince Titanium 6.1.0, the method will also accept `Array`\n", - "type": [ - "String", - "Array" - ] - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestPermissions", - "summary": "Request for permission access.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "permissions", - "summary": "The permission(s) to request for access. This can be any of the constants listed here\nwith dangerous protection level [here](https://developer.android.com/reference/android/Manifest.permission.html).\nNormal protection permissions are automatically enabled if they are included in the manifest. An example of a\ndangerous protection permission would be `android.permission.WRITE_CONTACTS`.\nThe requested permission(s) MUST also be included in the Android Manifest.\n\nBesides this, there are also requestPermission methods that are ready for commonly used situations. These methods are\n, ,\n, and .\n\nSince Titanium 6.1.0, the method will also accept a String. Any requests where permissions are already granted will yield a successful callback.\n", - "type": [ - "String", - "Array" - ] - }, - { - "name": "callback", - "summary": "Function to call upon user decision to grant access.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "isServiceRunning", - "summary": "Check on state of Service.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "An `Intent` created with [createServiceIntent](Titanium.Android.createServiceIntent),\nwhich specifies the service to check.\n", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "registerBroadcastReceiver", - "summary": "Registers broadcast receiver for the given actions.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "broadcastReceiver", - "summary": "The broadcast receiver to register and handle the broadcast.\n", - "type": "Titanium.Android.BroadcastReceiver" - }, - { - "name": "actions", - "summary": "The actions that the broadcast receiver will handle\n", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unregisterBroadcastReceiver", - "summary": "Unregisters a broadcast receiver.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "broadcastReceiver", - "summary": "The broadcast receiver to unregister.\n", - "type": "Titanium.Android.BroadcastReceiver" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "startService", - "summary": "Starts a simple service.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "An `Intent` created with [createServiceIntent](Titanium.Android.createServiceIntent),\nwhich specifies the service to start.\n", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopService", - "summary": "Stop a simple service that was started with `startService`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "An `Intent` created with [createServiceIntent](Titanium.Android.createServiceIntent),\nwhich specifies the service to stop.\n", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createBroadcastIntent", - "summary": "Create an `Intent` to be used in a broadcast.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on the new object, including any defined by\n, except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.Intent" - } - }, - { - "name": "createBigPictureStyle", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.BigPictureStyle" - } - }, - { - "name": "createBigTextStyle", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.BigTextStyle" - } - }, - { - "name": "createBroadcastReceiver", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.BroadcastReceiver" - } - }, - { - "name": "createIntent", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.Intent" - } - }, - { - "name": "createNotification", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.Notification" - } - }, - { - "name": "createNotificationChannel", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.NotificationChannel" - } - }, - { - "name": "createQuickSettingsService", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.QuickSettingsService" - } - }, - { - "name": "createRemoteViews", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Android.RemoteViews" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "ACTION_AIRPLANE_MODE_CHANGED", - "summary": "User switched airplane mode on or off.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_AIRPLANE_MODE_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_AIRPLANE_MODE_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_ALL_APPS", - "summary": "List all applications.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_ALL_APPS in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_ALL_APPS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_ANSWER", - "summary": "Handle an incoming phone call.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_ANSWER in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_ANSWER).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_ATTACH_DATA", - "summary": "Used to indicate that the data is an attachment.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_ATTACH_DATA in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_ATTACH_DATA).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_BATTERY_CHANGED", - "summary": "Listen to battery state change status.", - "description": "Pass to the method to listen to the system broadcast.\n\nNote that Titanium exposes battery monitoring using the API.\n\nSee [Intent.ACTION_BATTERY_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_BATTERY_LOW", - "summary": "Indicates low battery condition on the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nNote that Titanium exposes battery monitoring using the API.\n\nSee [Intent.ACTION_BATTERY_LOW in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_LOW).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_BATTERY_OKAY", - "summary": "Indicates the battery is now okay after being low.", - "description": "Pass to the method to listen to the system broadcast.\n\nNote that Titanium exposes battery monitoring using the API.\n\nSee [Intent.ACTION_BATTERY_OKAY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_OKAY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_BOOT_COMPLETED", - "summary": "Indicates the system has finished booting.", - "description": "Pass to the method to listen to the system broadcast.\n\nThe application needs to also set the `android.permission.RECEIVE_BOOT_COMPLETED` permission\nin the Android manifest section of the `tiapp.xml` file.\n\n``` xml\n\n \n \n \n \n \n\n```\n\nSee [Intent.ACTION_BOOT_COMPLETED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_BUG_REPORT", - "summary": "Show activity for reporting a bug.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_BUG_REPORT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_BUG_REPORT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CALL", - "summary": "Perform a call to someone specified by the `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_CALL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CALL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CALL_BUTTON", - "summary": "User pressed the call button.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_CALL_BUTTON in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CALL_BUTTON).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CAMERA_BUTTON", - "summary": "The camera button was pressed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_CAMERA_BUTTON in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CAMERA_BUTTON).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CHOOSER", - "summary": "Display an activity chooser.", - "description": "Use with the property to create an Activity Chooser.\n\nYou can also create an activity chooser using the method.\n\nSee [Intent.ACTION_CHOOSER in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CHOOSER).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CLOSE_SYSTEM_DIALOGS", - "summary": "User dismissed a temporary system dialog, such as the notification drawer or recent-app drawer.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_CLOSE_SYSTEM_DIALOGS in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CLOSE_SYSTEM_DIALOGS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CONFIGURATION_CHANGED", - "summary": "The device's configuration changed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_CONFIGURATION_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CONFIGURATION_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_CREATE_SHORTCUT", - "summary": "Create a shortcut.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_CREATE_SHORTCUT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_CREATE_SHORTCUT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_DATE_CHANGED", - "summary": "Date changed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_DATE_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_DATE_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_DEFAULT", - "summary": "Default action, which is `Titanium.Android.ACTION_VIEW`", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_DEFAULT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_DEFAULT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_DELETE", - "summary": "Delete the data specified by the Intent's `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_DELETE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_DELETE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_DEVICE_STORAGE_LOW", - "summary": "Indicates a low memory condition on the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_DEVICE_STORAGE_LOW in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_DEVICE_STORAGE_LOW).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_DIAL", - "summary": "Dial a number specified by the Intent's `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_DIAL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_DIAL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_EDIT", - "summary": "Provide editable access to the data specified by the Intent's `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_EDIT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_EDIT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_GET_CONTENT", - "summary": "Allow the user to select a particular kind of data specified by the Intent's `type` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_GET_CONTENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_GET_CONTENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_GTALK_SERVICE_CONNECTED", - "summary": "GTalk connection has been established.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_GTALK_SERVICE_CONNECTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_GTALK_SERVICE_CONNECTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_GTALK_SERVICE_DISCONNECTED", - "summary": "GTalk connection has been disconnected.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_GTALK_SERVICE_DISCONNECTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_GTALK_SERVICE_DISCONNECTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_HEADSET_PLUG", - "summary": "A wired headset has been plugged in or unplugged.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_HEADSET_PLUG in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_HEADSET_PLUG).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_INPUT_METHOD_CHANGED", - "summary": "An input method has been changed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_INPUT_METHOD_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_INPUT_METHOD_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_INSERT", - "summary": "Insert an empty item into the given container.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_INSERT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_INSERT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_INSERT_OR_EDIT", - "summary": "Pick an existing item or insert an empty item, then edit it.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_INSERT_OR_EDIT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_INSERT_OR_EDIT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MAIN", - "summary": "Start as the main entry point.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_MAIN in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MAIN).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MANAGE_PACKAGE_STORAGE", - "summary": "Indicates low memory condition notification acknowledged by user and package management should be started.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MANAGE_PACKAGE_STORAGE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MANAGE_PACKAGE_STORAGE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_BAD_REMOVAL", - "summary": "External media was removed from SD card slot, but mount point was not unmounted.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_BAD_REMOVAL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BAD_REMOVAL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_BUTTON", - "summary": "The media button was pressed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_BUTTON in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_BUTTON).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_CHECKING", - "summary": "External media is present and being disk-checked.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_CHECKING in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_CHECKING).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_EJECT", - "summary": "User has expressed the desire to remove the external storage media.", - "description": "Pass to the method to listen to the system broadcast.\n\nApplications should close all files they have open within the mount point when they receive this intent.\n\nSee [Intent.ACTION_MEDIA_EJECT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_EJECT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_MOUNTED", - "summary": "External media is present and mounted at its mount point.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_MOUNTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_MOUNTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_NOFS", - "summary": "External media is present, but is using an incompatible filesystem or is blank.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_NOFS in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_NOFS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_REMOVED", - "summary": "External media has been removed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_REMOVED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_REMOVED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_SCANNER_FINISHED", - "summary": "The media scanner has finished scanning a directory.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_SCANNER_FINISHED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_FINISHED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_SCANNER_SCAN_FILE", - "summary": "Request the media scanner to scan a file and add it to the media database.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_SCANNER_SCAN_FILE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_SCAN_FILE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_SCANNER_STARTED", - "summary": "The media scanner has started scanning a directory.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_SCANNER_STARTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SCANNER_STARTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_SHARED", - "summary": "External media is unmounted because it is being shared via USB mass storage.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_SHARED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_SHARED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_UNMOUNTABLE", - "summary": "Corresponds to the Android `Intent.ACTION_MEDIA_UNMOUNTABLE` constant.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_UNMOUNTABLE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_UNMOUNTABLE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_MEDIA_UNMOUNTED", - "summary": "External media is present, but not mounted at its mount point.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_MEDIA_UNMOUNTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_MEDIA_UNMOUNTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_NEW_OUTGOING_CALL", - "summary": "An outgoing call is about to be placed.", - "description": "Pass to the method to listen to the system broadcast.\n\nThe application needs to also set the `android.permission.NEW_OUTGOING_CALL` permission\nin the Android manifest section of the `tiapp.xml` file.\n\n``` xml\n\n \n \n \n \n \n\n```\n\nSee [Intent.ACTION_NEW_OUTGOING_CALL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_NEW_OUTGOING_CALL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_ADDED", - "summary": "A new application package has been installed on the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_ADDED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_CHANGED", - "summary": "An existing application package has been changed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_DATA_CLEARED", - "summary": "The user has cleared the data of a package.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_DATA_CLEARED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_DATA_CLEARED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_REMOVED", - "summary": "An existing application package has been removed from the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_REMOVED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REMOVED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_REPLACED", - "summary": "A new version of an application package has been installed, replacing an existing version that was previously installed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_REPLACED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_REPLACED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PACKAGE_RESTARTED", - "summary": "The user has restarted a package, and all of its processes have been killed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PACKAGE_RESTARTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PACKAGE_RESTARTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PICK", - "summary": "Pick an item from the directory indicated by the Intent's `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_PICK in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PICK).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PICK_ACTIVITY", - "summary": "Pick an activity given an intent.", - "description": "Use with the property to create an **Activity Intent**.\n\nAdd the activity intent using the intent's `putExtra()` method. Pass the method\n`Titanium.Android.EXTRA_INTENT` as the `name` parameter and the activity intent\nas the `data` parameter.\n\nSee [Intent.ACTION_PICK_ACTIVITY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PICK_ACTIVITY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_POWER_CONNECTED", - "summary": "External power has been connected to the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_POWER_CONNECTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_CONNECTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_POWER_DISCONNECTED", - "summary": "External power has been disconnected from the device.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_POWER_DISCONNECTED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_DISCONNECTED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_POWER_USAGE_SUMMARY", - "summary": "Show power usage information to the user.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_POWER_USAGE_SUMMARY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_POWER_USAGE_SUMMARY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_PROVIDER_CHANGED", - "summary": "Content provider published new events or items.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_PROVIDER_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_PROVIDER_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_REBOOT", - "summary": "Device rebooted.", - "description": "**Only used by the system.**\n\nSee [Intent.ACTION_REBOOT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_REBOOT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_RUN", - "summary": "Run the data.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_RUN in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_RUN).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SCREEN_OFF", - "summary": "Sent when the device goes to sleep and becomes non-interactive.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_SCREEN_OFF in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SCREEN_OFF).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SCREEN_ON", - "summary": "Sent when the device wakes up and becomes interactive.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_SCREEN_ON in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SCREEN_ON).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SEARCH", - "summary": "Perform a search.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SEARCH in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEARCH).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SEARCH_LONG_PRESS", - "summary": "Start action associated with long pressing on the search key.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SEARCH_LONG_PRESS in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEARCH_LONG_PRESS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SEND", - "summary": "Deliver data to another activity.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SEND in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SENDTO", - "summary": "Deliver data to the recipient specified by the Intent's `data` property.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SENDTO in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SENDTO).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SEND_MULTIPLE", - "summary": "Deliver multiple data to another activity.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SEND_MULTIPLE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SEND_MULTIPLE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SET_WALLPAPER", - "summary": "Show settings for choosing the system wallpaper.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SET_WALLPAPER in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SET_WALLPAPER).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SHUTDOWN", - "summary": "Device is shutting down.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_SHUTDOWN in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SHUTDOWN).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SYNC", - "summary": "Perform data synchronization.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SYNC in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SYNC).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_SYSTEM_TUTORIAL", - "summary": "Start the platform-defined tutorial.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_SYSTEM_TUTORIAL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_SYSTEM_TUTORIAL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_TIME_CHANGED", - "summary": "The time was set.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_TIME_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_TIME_TICK", - "summary": "The current time changed. Sent every minute.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_TIME_TICK in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_UID_REMOVED", - "summary": "A user ID was removed from the system.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_UID_REMOVED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_UID_REMOVED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_USER_PRESENT", - "summary": "Sent when the user is present after device wakes up.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_USER_PRESENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_USER_PRESENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_VIEW", - "summary": "Display data to the user.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_VIEW in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_VIEW).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_VOICE_COMMAND", - "summary": "Start voice command.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_VOICE_COMMAND in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_VOICE_COMMAND).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_WALLPAPER_CHANGED", - "summary": "The current system wallpaper has changed.", - "description": "Pass to the method to listen to the system broadcast.\n\nSee [Intent.ACTION_WALLPAPER_CHANGED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_WALLPAPER_CHANGED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTION_WEB_SEARCH", - "summary": "Perform a web search.", - "description": "Use with the property to create an **Activity Intent**.\n\nSee [Intent.ACTION_WEB_SEARCH in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#ACTION_WEB_SEARCH).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_ALTERNATIVE", - "summary": "Set if the activity should be considered as an alternative action to the data the user is currently viewing.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_ALTERNATIVE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_ALTERNATIVE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_BROWSABLE", - "summary": "Activity can browse the Internet.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nThe `Titanium.Android.ACTION_MAIN` constant must also be set in the intent's `action` property.\n\nSee [Intent.CATEGORY_BROWSABLE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_BROWSABLE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_DEFAULT", - "summary": "Activity should be used as the default action to perform on a piece of data.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_DEFAULT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEFAULT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_DEVELOPMENT_PREFERENCE", - "summary": "Activity is in the development preference panel.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_DEVELOPMENT_PREFERENCE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_DEVELOPMENT_PREFERENCE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_EMBED", - "summary": "Activity can run inside a parent activity.", - "description": "See [Intent.CATEGORY_EMBED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_EMBED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST", - "summary": "To be used as test code for framework instrumentation tests.", - "description": "See [Intent.CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_HOME", - "summary": "Home activity, the first activity that is displayed when the device boots.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_HOME in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_HOME).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_INFO", - "summary": "Provides information about the package it is in.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_INFO in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_INFO).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_LAUNCHER", - "summary": "Activity is in the device's launcher.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_LAUNCHER in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_LAUNCHER).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_MONKEY", - "summary": "This activity may be exercised by the monkey or other automated test tools.", - "description": "See [Intent.CATEGORY_MONKEY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_MONKEY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_OPENABLE", - "summary": "Activity can open raw `file://` or `scheme://` URIs.", - "description": "See [Intent.CATEGORY_OPENABLE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_OPENABLE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_PREFERENCE", - "summary": "This activity is a preference panel.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_PREFERENCE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_PREFERENCE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_SAMPLE_CODE", - "summary": "To be used as a sample code example (not part of the normal user experience).", - "description": "See [Intent.CATEGORY_SAMPLE_CODE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_SAMPLE_CODE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_SELECTED_ALTERNATIVE", - "summary": "Activity should be considered as an alternative selection action to the data the user\nhas currently selected.\n", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_SELECTED_ALTERNATIVE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_SELECTED_ALTERNATIVE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_TAB", - "summary": "Activity to be used in a tab activity.", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_TAB in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_TAB).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_TEST", - "summary": "To be used as a test (not part of the normal user experience).", - "description": "Pass to the Intent's [addCategory()](Titanium.Android.Intent.addCategory) method to set a category.\n\nSee [Intent.CATEGORY_TEST in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_TEST).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_UNIT_TEST", - "summary": "To be used as a unit test (run through the Test Harness).", - "description": "See [Intent.CATEGORY_UNIT_TEST in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#CATEGORY_UNIT_TEST).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_ALARM_COUNT", - "summary": "Integer indicating how many pending alarms are being delivered with the intent.", - "description": "See [Intent.EXTRA_ALARM_COUNT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_ALARM_COUNT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_BCC", - "summary": "String array containing e-mail addresses for blind carbon copying.", - "description": "See [Intent.EXTRA_BCC in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_BCC).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_CC", - "summary": "String array containing e-mail addresses for carbon copying.", - "description": "See [Intent.EXTRA_CC in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_CC).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_DATA_REMOVED", - "summary": "Boolean indicating full uninstall (true) or partial uninstall (false).", - "description": "Sent with the `Titanium.Android.ACTION_PACKAGE_REMOVED` broadcast.\n\nSee [Intent.EXTRA_DATA_REMOVED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_DATA_REMOVED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_DONT_KILL_APP", - "summary": "Boolean indicating to restart the application or not.", - "description": "Sent with the `Titanium.Android.ACTION_PACKAGE_REMOVED` and\n`Titanium.Android.ACTION_PACKAGE_CHANGED` broadcasts.\n\nSee [Intent.EXTRA_DONT_KILL_APP in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_DONT_KILL_APP).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_EMAIL", - "summary": "String array containing e-mail addresses.", - "description": "See [Intent.EXTRA_EMAIL in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_EMAIL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_INTENT", - "summary": "An Intent describing the choices you would like shown.", - "description": "Set if the Intent's action is `Titanium.Android.ACTION_PICK_ACTIVITY`.\n\nSee [Intent.EXTRA_INTENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_INTENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_KEY_EVENT", - "summary": "A KeyEvent object containing the event that triggered the creation of the Intent it is in.", - "description": "See [Intent.EXTRA_KEY_EVENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_KEY_EVENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_PHONE_NUMBER", - "summary": "String holding the phone number to call or number that was called.", - "description": "Sent with the `Titanium.Android.ACTION_NEW_OUTGOING_CALL` broadcast.\n\nSet if the Intent's action is `Titanium.Android.ACTION_CALL`.\n\nSee [Intent.EXTRA_PHONE_NUMBER in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_PHONE_NUMBER).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_REPLACING", - "summary": "Boolean indicating if the package is being replaced.", - "description": "Sent with the `Titanium.Android.ACTION_PACKAGE_REMOVED` broadcast.\n\nSee [Intent.EXTRA_REPLACING in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_REPLACING).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_SHORTCUT_ICON", - "summary": "Bitmap icon.", - "description": "Return value of an intent with a `Titanium.Android.ACTION_CREATE_SHORTCUT` action.\n\nSee [Intent.EXTRA_SHORTCUT_ICON in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_ICON).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_SHORTCUT_ICON_RESOURCE", - "summary": "Resource of the shortcut.", - "description": "Return value of an intent with a `Titanium.Android.ACTION_CREATE_SHORTCUT` action.\n\nSee [Intent.EXTRA_SHORTCUT_ICON_RESOURCE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_ICON_RESOURCE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_SHORTCUT_INTENT", - "summary": "Intent of a shortcut.", - "description": "Return value of an intent with a `Titanium.Android.ACTION_CREATE_SHORTCUT` action.\n\nSee [Intent.EXTRA_SHORTCUT_INTENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_INTENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_SHORTCUT_NAME", - "summary": "Name of the shortcut.", - "description": "Return value of an intent with a `Titanium.Android.ACTION_CREATE_SHORTCUT` action.\n\nSee [Intent.EXTRA_SHORTCUT_NAME in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SHORTCUT_NAME).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_STREAM", - "summary": "URI containing the stream data.", - "description": "Use if the Intent's action is `Titanium.Android.ACTION_SEND`.\n\nSee [Intent.EXTRA_STREAM in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_STREAM).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_SUBJECT", - "summary": "Subject line of a message.", - "description": "See [Intent.EXTRA_SUBJECT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_SUBJECT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_TEMPLATE", - "summary": "Initial data to place in a newly created record.", - "description": "Use if the Intent's action is `Titanium.Android.ACTION_INSERT`.\n\nSee [Intent.EXTRA_TEMPLATE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEMPLATE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_TEXT", - "summary": "Corresponds to the Android `Intent.EXTRA_TEXT` constant.", - "description": "See [Intent.EXTRA_TEXT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TEXT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_TITLE", - "summary": "Corresponds to the Android `Intent.EXTRA_TITLE` constant.", - "description": "Set if the Intent's action is `Titanium.Android.ACTION_CHOOSER`.\n\nSee [Intent.EXTRA_TITLE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_TITLE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EXTRA_UID", - "summary": "UID of the assigned packaged.", - "description": "Sent with the `Titanium.Android.ACTION_UID_REMOVED` broadcast, and may be sent with the\n`Titanium.Android.ACTION_PACKAGE_CHANGED` and `Titanium.Android.ACTION_PACKAGE_REMOVED` broadcasts.\n\nSee [Intent.EXTRA_UID in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#EXTRA_UID).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "FILL_IN_ACTION", - "summary": "Not used.", - "description": "See [Intent.FILL_IN_ACTION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FILL_IN_ACTION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FILL_IN_CATEGORIES", - "summary": "Not used.", - "description": "See [Intent.FILL_IN_CATEGORIES in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FILL_IN_CATEGORIES).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FILL_IN_COMPONENT", - "summary": "Not used.", - "description": "See [Intent.FILL_IN_COMPONENT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FILL_IN_COMPONENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FILL_IN_DATA", - "summary": "Not used.", - "description": "See [Intent.FILL_IN_DATA in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FILL_IN_DATA).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FILL_IN_PACKAGE", - "summary": "Not used.", - "description": "See [Intent.FILL_IN_PACKAGE in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FILL_IN_PACKAGE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_BROUGHT_TO_FRONT", - "summary": "If activity is already running, bring it to the foreground.", - "description": "Set by the system when launching a task.\n\nSee [Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_BROUGHT_TO_FRONT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_CLEAR_TOP", - "summary": "If the activity is present, removes any activities on top of it to make it the foreground activity.\n", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_CLEAR_TOP in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_TOP).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET", - "summary": "Corresponds to the Android `Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET` constant.", - "description": "See [Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS", - "summary": "Exclude the activity from recently launched activities.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_FORWARD_RESULT", - "summary": "Return result to the original calling activity.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_FORWARD_RESULT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_FORWARD_RESULT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY", - "summary": "Activity was launched from history.", - "description": "Set by the system when launching a task.\n\nSee [Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_MULTIPLE_TASK", - "summary": "Start the activity as a new task even if it exists.", - "description": "Must be used with the `Titanium.Android.FLAG_ACTIVITY_NEW_TASK`.\n\nBitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_MULTIPLE_TASK in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_MULTIPLE_TASK).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_NEW_TASK", - "summary": "Activity will be the start of a new task (collection of activities).", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_NEW_TASK in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NEW_TASK).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_NO_ANIMATION", - "summary": "Prevent transition animation.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_NO_ANIMATION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_ANIMATION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_NO_HISTORY", - "summary": "Do not keep the activity in the history stack.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_NO_HISTORY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_HISTORY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_NO_USER_ACTION", - "summary": "Disables the [onUserLeaveHint()](https://developer.android.com/reference/android/app/Activity.html#onUserLeaveHint()) callback.\n", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_NO_USER_ACTION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_NO_USER_ACTION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_PREVIOUS_IS_TOP", - "summary": "Corresponds to the Android `Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP` constant.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_PREVIOUS_IS_TOP in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_PREVIOUS_IS_TOP).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_REORDER_TO_FRONT", - "summary": "If the activity already exists, place it at the top of the history stack.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_REORDER_TO_FRONT in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_REORDER_TO_FRONT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_RESET_TASK_IF_NEEDED", - "summary": "If the task already exists, resets the task to its initial state.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_RESET_TASK_IF_NEEDED).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ACTIVITY_SINGLE_TOP", - "summary": "Do not launch the activity if it is already running.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_ACTIVITY_SINGLE_TOP in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_ACTIVITY_SINGLE_TOP).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_DEBUG_LOG_RESOLUTION", - "summary": "Enable a log message to print out the resolution of the intent.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_DEBUG_LOG_RESOLUTION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_DEBUG_LOG_RESOLUTION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_FROM_BACKGROUND", - "summary": "Indicates the intent is coming from a background operation.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_FROM_BACKGROUND in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_FROM_BACKGROUND).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_GRANT_READ_URI_PERMISSION", - "summary": "Grant read permission on the URI in the Intent's data or clipboard.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_GRANT_READ_URI_PERMISSION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_READ_URI_PERMISSION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_GRANT_WRITE_URI_PERMISSION", - "summary": "Grants write permission on the URI in the Intent's data or clipboard.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_GRANT_WRITE_URI_PERMISSION in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_GRANT_WRITE_URI_PERMISSION).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_RECEIVER_REGISTERED_ONLY", - "summary": "When sending a broadcast, only registered receivers will be called.", - "description": "Bitwise-OR the constant with the Intent's `flags` property.\n\nSee [Intent.FLAG_RECEIVER_REGISTERED_ONLY in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#FLAG_RECEIVER_REGISTERED_ONLY).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_CANCEL_CURRENT", - "summary": "Cancel the current pending intent before creating a new one.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_CANCEL_CURRENT in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_CANCEL_CURRENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_IMMUTABLE", - "summary": "Pending intent should be immutable.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_IMMUTABLE in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_IMMUTABLE).\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_MUTABLE", - "summary": "Pending intent should be mutable.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_MUTABLE in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_MUTABLE).\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_NO_CREATE", - "summary": "If the current intent does not exist, do not create it.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_NO_CREATE in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_NO_CREATE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ONE_SHOT", - "summary": "The pending intent can only be used once.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_ONE_SHOT in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_ONE_SHOT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_UPDATE_CURRENT", - "summary": "If the current pending intent already exists, only update the current intent's extra data.", - "description": "Use with the property.\n\nSee [PendingIntent.FLAG_UPDATE_CURRENT in the Android API\nReference](https://developer.android.com/reference/android/app/PendingIntent.html#FLAG_UPDATE_CURRENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CATEGORY_ALARM", - "summary": "Notification category indicating an alarm or timer.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_ALARM in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_ALARM).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_CALL", - "summary": "Notification category indicating an incoming call (voice or video) or similar synchronous\ncommunication request.\n", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_CALL in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_CALL).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_EMAIL", - "summary": "Notification category indicating an asynchronous bulk message (email).", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_EMAIL in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_EMAIL).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_ERROR", - "summary": "Notification category indicating an error in background operation or authentication status.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_ERROR in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_ERROR).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_EVENT", - "summary": "Notification category indicating a calendar event.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_EVENT in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_EVENT).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_MESSAGE", - "summary": "Notification category indicating an incoming direct message (SMS, instant message, etc.).", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_MESSAGE in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_MESSAGE).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_PROGRESS", - "summary": "Notification category indicating the progress of a long-running background operation.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_PROGRESS in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_PROGRESS).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_PROMO", - "summary": "Notification category indicating a promotion or advertisement.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_PROMO in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_PROMO).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_RECOMMENDATION", - "summary": "Notification category indicating a specific, timely recommendation for a single thing.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_RECOMMENDATION in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_RECOMMENDATION).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_SERVICE", - "summary": "Notification category for a running background service.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_SERVICE in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_SERVICE).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_SOCIAL", - "summary": "Notification category for a social network or sharing update.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_SOCIAL in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_SOCIAL).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_STATUS", - "summary": "Notification category indicating ongoing information about device or contextual status.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_STATUS in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_STATUS).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "CATEGORY_TRANSPORT", - "summary": "Notification category indicating media transport control for playback.", - "description": "Use with the property.\n\nSee [Notification.CATEGORY_TRANSPORT in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#CATEGORY_TRANSPORT).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "DEFAULT_ALL", - "summary": "Use all default settings for a notification; see\n[Notification.defaults](Titanium.Android.Notification.defaults).\n", - "description": "See [Notification.DEFAULT_ALL in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#DEFAULT_ALL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_LIGHTS", - "summary": "Use the default light settings for a notification; see\n[Notification.defaults](Titanium.Android.Notification.defaults).\n", - "description": "See [Notification.DEFAULT_LIGHTS in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#DEFAULT_LIGHTS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_SOUND", - "summary": "Use the default sound settings for a notification; see\n[Notification.defaults](Titanium.Android.Notification.defaults).\n", - "description": "See [Notification.DEFAULT_SOUND in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#DEFAULT_SOUND).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_VIBRATE", - "summary": "Use the default vibration settings for a notification; see\n[Notification.defaults](Titanium.Android.Notification.defaults).\n", - "description": "See [Notification.DEFAULT_VIBRATE in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#DEFAULT_VIBRATE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_MANIFEST", - "summary": "A special value indicates to use all types set in manifest file.\n", - "description": "This constant is passed to the method.\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_MANIFEST](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_MANIFEST)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_NONE", - "summary": "The default foreground service type.", - "description": "This constant is passed to the method.\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_NONE](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_NONE)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK", - "summary": "Allows music, video, news or other media playback while the app is in the background.\n", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"mediaPlayback\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_PHONE_CALL", - "summary": "Allows ongoing phone call or video conferencing access while the app is in the background.\n", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"phoneCall\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_PHONE_CALL)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_LOCATION", - "summary": "Allows accessing location from the GPS, map, etc. while the app is in the background.\n", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"location\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_LOCATION)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE", - "summary": "Allows connecting to Android Auto, bluetooth, TV or other devices while app is in the background.\n", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"connectedDevice\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_CONNECTED_DEVICE)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION", - "summary": "Allows managing a media projection session for screen recording or taking screenshots\nwhile app is in the background.\n", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"mediaProjection\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_MICROPHONE", - "summary": "Allows the microphone to be used while the app is in the background.", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"microphone\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_MICROPHONE)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FOREGROUND_SERVICE_TYPE_CAMERA", - "summary": "Allows the camera to be used while the app is in the background.", - "description": "This constant is passed to the method.\n\nTo use this constant, you must also set your `` element to the\n`foregroundServiceType` attribute value as shown below.\n\n``` xml\n\n \n \n \" android:foregroundServiceType=\"camera\"/>\n \n \n\n```\n\nSee Google's [ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA](https://developer.android.com/reference/android/content/pm/ServiceInfo.html#FOREGROUND_SERVICE_TYPE_CAMERA)\ndocumentation for more details.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_AUTO_CANCEL", - "summary": "Cancel the notification when it is clicked by the user.", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_AUTO_CANCEL in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_AUTO_CANCEL).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_INSISTENT", - "summary": "Repeat audio until the notification is cancelled or the notification window\nis opened.\n", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_INSISTENT in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_INSISTENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_NO_CLEAR", - "summary": "Do not cancel the notification when the user clicks the Clear All button.", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_NO_CLEAR in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_NO_CLEAR).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ONGOING_EVENT", - "summary": "Specifies that a notification is in reference to something that is ongoing, like a phone call.", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_ONGOING_EVENT in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_ONGOING_EVENT).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ONLY_ALERT_ONCE", - "summary": "Play an alert (sound, lights, and/or vibration) once each time the notification is sent, even if it has not been canceled before that.", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_ONLY_ALERT_ONCE in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_ONLY_ALERT_ONCE).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_SHOW_LIGHTS", - "summary": "Use LED lights to alert the user to the notification.", - "description": "Use with [Notification.flags](Titanium.Android.Notification.flags).\n\nSee also: [Notification.FLAG_SHOW_LIGHTS in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#FLAG_SHOW_LIGHTS).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PRIORITY_MAX", - "summary": "Use for urgent or time-critical notifications, for example, turn-by-turn directions or\nemergency alerts.\n", - "description": "Use with the property.\n\nSee also: [Notification.PRIORITY_MAX in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#PRIORITY_MAX).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PRIORITY_HIGH", - "summary": "Use for high priority notifications like real-time chat messages.", - "description": "Use with the property.\n\nSee also: [Notification.PRIORITY_HIGH in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#PRIORITY_HIGH).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PRIORITY_DEFAULT", - "summary": "Default priority if it does not fit into another priority category.", - "description": "Use with the property.\n\nSee also: [Notification.PRIORITY_DEFAULT in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#PRIORITY_DEFAULT).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PRIORITY_LOW", - "summary": "Use for low priority notifications like software updates.", - "description": "Use with the property.\n\nSee also: [Notification.PRIORITY_LOW in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#PRIORITY_LOW).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PRIORITY_MIN", - "summary": "Use for expired events.", - "description": "Use with the property.\n\nNote that the user will not be alerted to the notification (sound, vibration, etc.),\nbut the notification will appear in the drawer.\n\nSee also: [Notification.PRIORITY_MIN in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#PRIORITY_MIN).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_PRIVATE", - "summary": "Shows basic information about the notification.", - "description": "Use with the property.\n\nOnly the application name and icon appear in the lock screen with the message: \"Contents hidden\".\n\nSee also: [Notification.VISIBILITY_PRIVATE in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#VISIBILITY_PRIVATE).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_PUBLIC", - "summary": "Shows the notification's full content on the lock screen. This is the system default if visibility is left unspecified.", - "description": "Use with the property.\n\nSee also: [Notification.VISIBILITY_PUBLIC in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#VISIBILITY_PUBLIC).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_SECRET", - "summary": "Shows the most minimal information of the notification on the lock screen.", - "description": "Use with the property.\n\nSee also: [Notification.VISIBILITY_SECRET in the Android API Reference](https://developer.android.com/reference/android/app/Notification.html#VISIBILITY_SECRET).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TILE_STATE_UNAVAILABLE", - "summary": "QuickSettings tile is unavailable.", - "description": "For some reason the Tile is not available to the user and will have no click action.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TILE_STATE_INACTIVE", - "summary": "QuickSettings tile is inactive.", - "description": "The Tile is in disabled state, but the user can interact with it.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TILE_STATE_ACTIVE", - "summary": "QuickSettings tile is active.", - "description": "The Tile is in enabled state and the user can interact with it.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_PARTIAL", - "summary": "Ensures that the CPU is running; the screen and keyboard backlight will be allowed to go off.", - "description": "Use with the property.\n\nSee also: [PowerManager.PARTIAL_WAKE_LOCK in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#PARTIAL_WAKE_LOCK).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_FULL", - "summary": "Ensures that the screen and keyboard backlight are on at full brightness.", - "description": "Use with the property.\n\nSee also: [PowerManager.FULL_WAKE_LOCK in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#FULL_WAKE_LOCK).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_SCREEN_DIM", - "summary": "Ensures that the screen is on (but may be dimmed); the keyboard backlight will be allowed to go off.", - "description": "Use with the property.\n\nSee also: [PowerManager.SCREEN_DIM_WAKE_LOCK in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#SCREEN_DIM_WAKE_LOCK).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_SCREEN_BRIGHT", - "summary": "Ensures that the screen is on at full brightness; the keyboard backlight will be allowed to go off.", - "description": "Use with the property.\n\nSee also: [PowerManager.SCREEN_BRIGHT_WAKE_LOCK in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#SCREEN_BRIGHT_WAKE_LOCK).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_ACQUIRE_CAUSES_WAKEUP", - "summary": "Turn the screen on when the wake lock is acquired.", - "description": "Use with the property.\n\nSee also: [PowerManager.ACQUIRE_CAUSES_WAKEUP in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#ACQUIRE_CAUSES_WAKEUP).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WAKE_LOCK_ON_AFTER_RELEASE", - "summary": "When this wake lock is released, poke the user activity timer so the screen stays on for a little longer.", - "description": "Use with the property.\n\nSee also: [PowerManager.ON_AFTER_RELEASE in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#ON_AFTER_RELEASE).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PENDING_INTENT_FOR_ACTIVITY", - "deprecated": { - "notes": "", - "since": "2.0.0", - "removed": "10.0.0" - }, - "summary": "Not used.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PENDING_INTENT_FOR_BROADCAST", - "deprecated": { - "notes": "", - "since": "2.0.0", - "removed": "10.0.0" - }, - "summary": "Not used.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PENDING_INTENT_FOR_SERVICE", - "deprecated": { - "notes": "", - "since": "2.0.0", - "removed": "10.0.0" - }, - "summary": "Not used.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PENDING_INTENT_MAX_VALUE", - "deprecated": { - "notes": "", - "since": "2.0.0", - "removed": "10.0.0" - }, - "summary": "Not used.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "R", - "summary": "Accessor for Android system resources.", - "description": "To access your application's resources, use .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.R", - "permission": "read-only" - }, - { - "name": "RESULT_CANCELED", - "summary": "Used with [setResult](Titanium.Android.Activity.setResult) to specify that\nan activity was canceled.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RESULT_FIRST_USER", - "summary": "Used with [setResult](Titanium.Android.Activity.setResult) to specify a\nuser-defined result.\n", - "description": "User-defined result constants values start at `RESULT_FIRST_USER`.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RESULT_OK", - "summary": "Used with [setResult](Titanium.Android.Activity.setResult) to specify that\nan activity succeeded.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_BEHIND", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify the activity should run in the same orientation as the activity behind it\nin the activity stack.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_LANDSCAPE", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify a landscape screen orientation.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_NOSENSOR", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify that the sensor should be ignored and the display should not rotate.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_PORTRAIT", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify a portrait screen orientation.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_SENSOR", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify that orientation should be determined by the orientation sensor.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_UNSPECIFIED", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify that the system should use its default rules for determining the best\norientation.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCREEN_ORIENTATION_USER", - "summary": "Use with [requestedOrientation](Titanium.Android.Activity.requestedOrientation) to\nspecify that the system should use the user's preferred orientation.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SHOW_AS_ACTION_ALWAYS", - "summary": "Always show this item as an action button in the action bar.", - "description": "Use with the MenuItem's property.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW", - "summary": "The action view can collapse to a normal menu item.", - "description": "Use with the MenuItem's property.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SHOW_AS_ACTION_IF_ROOM", - "summary": "Show this item as an action button if the system decides there is room for it.\n", - "description": "Use with the MenuItem's property.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SHOW_AS_ACTION_NEVER", - "summary": "Never display this item as an action button in the action bar.", - "description": "Use with the MenuItem's property.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SHOW_AS_ACTION_WITH_TEXT", - "summary": "When this item is in the action bar, always show it with a text label.", - "description": "Use with the MenuItem's property.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NAVIGATION_MODE_STANDARD", - "summary": "Standard Action Bar navigation mode.", - "description": "Use with the property. Note: NAVIGATION_MODE_STANDARD has been deprecated in API level 21 and up.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NAVIGATION_MODE_TABS", - "summary": "Action Bar tab navigation mode.", - "description": "Use with the property. Note: NAVIGATION_MODE_TABS has been deprecated in API level 21 and up.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "START_NOT_STICKY", - "summary": "A Service start mode indicating that if the host application is stopped by Android, the service should not be restarted automatically.\n", - "description": "Use as a `startMode` value in the options object passed to\n[createServiceIntent](Titanium.Android.createServiceIntent).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "START_REDELIVER_INTENT", - "summary": "A Service start mode indicating that if the host application is stopped by Android, the service should be restarted automatically and the original Intent re-sent.", - "description": "Use as a `startMode` value in the options object passed to\n[createServiceIntent](Titanium.Android.createServiceIntent).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_ALARM", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to\nrequest that the alarm stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_DEFAULT", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to request that the\ndefault stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_MUSIC", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to\nrequest that the music stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_NOTIFICATION", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to request that the\nnotification stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_RING", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to request that the\nring stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_SYSTEM", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to request that the\nsystem stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_VOICE_CALL", - "summary": "Use with [audioStreamType](Titanium.Android.Notification.audioStreamType) to request that the\nvoice call stream type for notifications be used.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "URI_INTENT_SCHEME", - "summary": "The URI scheme used for intent URIs.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_DEFAULT", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_HIGH", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_LOW", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_MAX", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_MIN", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_NONE", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMPORTANCE_UNSPECIFIED", - "summary": "Used with [NotificationChannel](Titanium.Android.NotificationChannel) to specify an importance level.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "currentActivity", - "summary": "References the top-most window's activity.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.Activity", - "permission": "read-only" - }, - { - "name": "currentService", - "summary": "Service in the active context.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.Service", - "permission": "read-only" - }, - { - "name": "rootActivity", - "summary": "The first activity launched by the application.", - "description": "This is the main launcher activity defined in the \"AndroidManifest.xml\" which shows the splash screen.\nAll windows opened are child activities below this root activity.\n\nClosing this root activity via its [finish()](Titanium.Android.Activity.finish) method will close\nall of its child activity windows as well and exit out of the app.\n\nWhen resuming the app via a data intent such as a URL, notification, shortcut, etc. the root activity\nwill fire a \"newintent\" event and update its [intent](Titanium.Android.Activity.intent) property with\nthe newly received intent.\n", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - } - ], - "type": "Titanium.Android.Activity", - "permission": "read-only" - } - ] - }, - "ServiceIntentOptions": { - "name": "ServiceIntentOptions", - "summary": "Options passed to .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml", - "properties": [ - { - "name": "url", - "summary": "URL for the service's JavaScript.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "startMode", - "summary": "One of the `START_*` constants from to specify the \"stickiness\" of the Service when Android shuts down the host application.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Titanium.Android.START_REDELIVER_INTENT", - "optional": true, - "constants": [ - "Titanium.Android.START_NOT_STICKY", - "Titanium.Android.START_REDELIVER_INTENT" - ] - } - ] - }, - "RequestPermissionAccessResult": { - "name": "RequestPermissionAccessResult", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Android.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "Titanium.Android.BigPictureStyle": { - "name": "Titanium.Android.BigPictureStyle", - "summary": "Helper object for generating large-format notifications that include a large image attachment.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BigPictureStyle.yml", - "description": "If the platform does not provide large-format notifications, this style helper has no effect.\nThe user will always see the normal notification view.\n\nThis style object attaches to a object and modifies its behavior.\n", - "examples": [ - { - "description": "Big picture style Example", - "code": "This example will be use image that placed in one of the density-specific folder\nunder `Resources/android/images`\n\n``` js\nvar bigPictureStyle = Titanium.Android.createBigPictureStyle({\n bigPicture: \"/images/bigPicture.png\",\n bigContentTitle: \"Title for big picture\",\n summaryText: \"Summary for big picture\"\n});\n```\n\nCreate big image style notification\n\n``` js\nvar notification = Titanium.Android.createNotification({\n contentTitle: 'Something Happened',\n contentText : 'Click to return to the application.',\n style: bigPictureStyle,\n time: Date.now()\n});\n```\n\nSend the notification.\n\n``` js\nTitanium.Android.NotificationManager.notify(1, notification);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "bigLargeIcon", - "summary": "Override the when the big notification is shown.", - "description": "If specified as a URL, the icon must be placed in one of the density-specific\nfolders under `Resources/android/images`. For example, if your icon is called\n`my_big_large_icon.png`, you would create high- and medium-density versions of the icons\nwith the following paths:\n\n```\nResources/android/images/res-hdpi/my_big_large_icon.png\nResources/android/images/res-mdpi/my_big_large_icon.png\n```\n\nTo access this icon, you'd use the URL '/images/my_big_large_icon.png'.\n\nTo access the same icon using an Android resource ID, place the icon in:\n\n```\nplatform/android/res/drawable/my_big_large_icon.png\n```\n\nThis icon's resource ID can be referenced through the \nobject:\n\n``` js\nicon: Ti.App.Android.R.drawable.my_big_large_icon,\n```\n\nSee for more information on accessing\nAndroid resources by ID.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "bigPicture", - "summary": "Provide the bitmap to be used as the payload for the BigPicture notification.", - "description": "Image to display, defined using a local filesystem path, a `File` object, a remote URL,\nor a `Blob` object containing image data.\n\nIf there is a redirect and change in protocol, it will not follow. For example,\nfrom http to https and vice versa. See [Java Bug Database](https://bugs.java.com/bugdatabase/view_bug.do?bug_id=4620571)\nfor more information.\n\nIf specified as a local URL, the bigPicture must be placed in one of the density-specific\nfolders under `Resources/android/images`. For example, if your bigPicture is called\n`my_big_picture.png`, you would create high- and medium-density versions of the bigPicture\nwith the following paths:\n\n```\nResources/android/images/res-hdpi/my_big_picture.png\nResources/android/images/res-mdpi/my_big_picture.png\n```\n\nTo access this bigPicture, you'd use the URL '/images/my_big_picture.png'.\n\nTo access the same bigPicture using an Android resource ID, place the bigPicture in:\n\n```\nplatform/android/res/drawable/my_big_picture.png\n```\n\nThis bigPicture's resource ID can be referenced through the \nobject:\n\n``` js\nbigPicture: Ti.App.Android.R.drawable.my_big_picture,\n```\n\nSee for more information on accessing\nAndroid resources by ID.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": [ - "Number", - "String", - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - }, - { - "name": "bigContentTitle", - "summary": "Overrides in the big form of the notification. This defaults to the value passed to .", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "String", - "default": "" - }, - { - "name": "decodeRetries", - "summary": "Number of times to retry decoding the bitmap at bigPicture URL.", - "description": "Defaults to 2 on Titanium 10.1.0 and higher. Defaults to 5 on older SDK versions.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "default": 2 - }, - { - "name": "summaryText", - "summary": "Set the first line of text after the detail section in the big form of the notification.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.BigTextStyle": { - "name": "Titanium.Android.BigTextStyle", - "summary": "Helper object for generating large-format notifications that include a lot of text.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BigTextStyle.yml", - "description": "If the platform does not provide large-format notifications, this style helper has no effect.\nThe user will always see the normal notification view.\n\nThis style object attaches to a object and modifies its behavior.\n", - "examples": [ - { - "description": "Big text style Example", - "code": "``` js\nvar bigTextStyle = Titanium.Android.createBigTextStyle({\n bigText: \"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\",\n bigContentTitle: \"Title for big text\",\n summaryText: \"Summary for big text\"\n});\n\n// Create big text style notification\nvar notification = Titanium.Android.createNotification({\n contentTitle: 'Something Happened',\n contentText : 'Click to return to the application.',\n style: bigTextStyle,\n time: Date.now()\n});\n\n// Send the notification.\nTitanium.Android.NotificationManager.notify(1, notification);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "bigText", - "summary": "Sets the longer text to be displayed in the big form of the notification in place of the content text.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "bigContentTitle", - "summary": "Overrides in the big form of the notification. This defaults to the value passed to .", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "String", - "default": "" - }, - { - "name": "summaryText", - "summary": "Set the first line of text after the detail section in the big form of the notification.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.BroadcastReceiver": { - "name": "Titanium.Android.BroadcastReceiver", - "summary": "Monitor and handle Android system broadcasts.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/BroadcastReceiver.yml", - "description": "The application can use broadcast receivers to monitor system events from the Android OS\nas well as custom broadcasts sent by other applications. The application will need to know the\nname of the broadcast actions in order to monitor them. Note that Titanium only supports\nprogrammatically creating and registering broadcast receivers. Titanium does not support\ndeclaring a receiver in the Android manifest.\n\nTo create a Broadcast Receiver, use the method.\nSpecify either a callback to handle the broadcast with the `onReceived` property or a\nJavaScript file with the `url` property. Do not specify both. If both properties are\nused, the `url` property takes precedence.\n\nTo start listening to a broadcast, pass the `BroadcastReceiver` object and an array of\nbroadcast actions to listen for to the method.\n\nTitanium exposes some of the system-level broadcasts as the `Titanium.Android.ACTION_*`\nconstants. Note that some of these constants are not broadcast messages.\n\nYou can also define a custom broadcast action. Use a reverse domain name scheme in order to\navoid potential conflicts with other applications.\n\nTo stop listening to a broadcast, pass the `BroadcastReceiver` object to the\n method.\n\nTo monitor a broadcast that requires a special permission, declare the **``**\nelement in the Android manifest section of the `tiapp.xml` file for each broadcast that uses\na special permission. For example, to monitor the `NEW_OUTGOING_CALL` broadcast, the\napplication needs to add the following permission:\n\n``` xml\n\n \n \n \n \n \n\n```\n\nFurther Reading:\n\n * [Android Broadcast Intents and Receivers guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Broadcast_Intents_and_Receivers.html#create-a-broadcast-intent)\n * [Android Developers: Broadcast Receivers](https://developer.android.com/reference/android/content/BroadcastReceiver.html).\n", - "examples": [ - { - "description": "Create and register a broadcast receiver", - "code": "This example creates a broadcast receiver and registers it to handle the airplane mode broadcast.\n\n``` js\nvar bc = Ti.Android.createBroadcastReceiver({\n onReceived: function() {\n Ti.API.info('Handling broadcast.');\n }\n});\n\nTi.Android.registerBroadcastReceiver(bc, [Ti.Android.ACTION_AIRPLANE_MODE_CHANGED]);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "onReceived", - "summary": "The function called when a broadcast is received.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "url", - "summary": "URL of the JavaScript file to handle the broadcast.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.Intent": { - "name": "Titanium.Android.Intent", - "summary": "Message objects passed between Android application components.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Intent.yml", - "description": "In Android, applications and application components cannot directly communicate with each other.\nIn order to communicate with another application, use an intent. An intent is a message sent\nto the Android OS. Android directs the message to an application or application component based\non the intent's settings.\n\nTo receive an intent, an application needs to declare an Intent Filter. An intent filter\nindicates to the Android OS that your application can handle certain data types or URIs.\nFor details on using Intent Filters, see the\n[Android Intent Filters guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intent_Filters.html).\n\nIntents can be used to start an activity, start a service or start a broadcast.\n\n * To create an intent to start an **Activity**, use the method.\n * To create an intent to start a **Broadcast**, use the method.\n * To create an intent to start a **Service**, use the method.\n\nYou can create either an implicit intent or an explicit intent.\n\nAn *explicit intent* specifies the application or application component to launch. To create an\nexplicit intent, specify the Intent's `className` and `packageName` properties to specify the\napplication component to launch or the `url` property to specify a JavaScript file to handle\nthe data.\n\nAn *implicit intent* does not specify a particular application. Android will present the options\nto the user of which applications to launch if a default application was not selected to handle\na particular data type or content URI. To create an implicit intent, do not specify the\n`className`, `packageName` or `url` properties.\n\nNote that the parameters to create a Service Intent are different than the ones used to\ncreate an Activity or Broadcast. The properties and methods listed below\nare used for Activity and Broadcast Intents. See the method\nfor the parameters to create a Service Intent.\n\n#### Action\n\nThe `action` property specifies the action you want the activity to perform, or in the case of\nbroadcasts, the action that just completed you want to report.\n\nTitanium exposes some of the Android Intent actions as the `Titanium.Android.ACTION_*` constants.\nNote that some of these actions are for system-level broadcasts that only Android can send.\nIf Titanium has not exposed a particular constant, you can pass the string value listed in the\nAndroid API reference guide instead.\n\nYou can also define your own custom action names. Use a reverse domain scheme to name the\naction to avoid potential conflicts, for example, `com.appcelerator.action.LINT`.\nCustom actions are only useful to communicate between your applications and application\nactivities using intents.\n\n#### Data\n\nThe [data](Titanium.Android.Intent.data) property specifies a content URI you want the activity to handle.\n\nThe [type](Titanium.Android.Intent.type) property specifies a MIME type the activity can handle.\n\nFor Broadcast Intents, do not use the `data` or `type` properties. Use extras to pass data.\nSee the *Extras* section below.\n\n#### Category\n\nAdd a category to your Intent by invoking the [addCategory()](Titanium.Android.Intent.addCategory)\nmethod on it. A category provides additional details about the purpose of the intent.\nNote that most categories are only useful for intent filters.\n\nTitanium exposes some of the Android Intent categories as the `Titanium.Android.CATEGORY_*` constants.\nNote that some of these categories are for Notifications. If Titanium has not exposed a\nparticular constant, you can pass the string value listed in the Android API reference instead.\n\nYou can also define your own custom category names. Use a reverse domain scheme to name the\ncategory to avoid potential conflicts, for example, `org.foo.category.SUPER`.\nCustom categories are only useful to communicate between your applications and application\nactivities using intents.\n\n#### Flags\n\nBitwise-OR flags with the Intent's [flags](Titanium.Android.Intent.flags) property\nor pass a flag to the [addFlags()](Titanium.Android.Intent.addFlags) method.\nFlags modify the behavior of the intent.\n\nTitanium exposes some of the Android Intent flags as the `Titanium.Android.FLAG_*` constants.\nIf Titanium has not exposed a particular constant, you can pass the constant value listed in\nthe Android API reference instead.\n\n#### Extras\n\nExtras are key-value pairs that are useful to pass on extra data with the Intent that can be\nused by another application component.\n\n * Use one of the `get*Extra()` methods to retrieve the data. Pass the method the extra key.\n * Use the [hasExtra()](Titanium.Android.Intent.hasExtra) method to check if the intent contains an extra.\n Pass the method the key of the extra.\n * Use the [putExtra()](Titanium.Android.Intent.putExtra) method to add data to the intent.\n Pass the method the extra key and data.\n\nTitanium exposes the Android-defined extra keys as the `Titanium.Android.EXTRA_*` constants.\nYou can also define your own custom extra keys to use between your applications and application\ncomponents.\n\n#### Further Reading\n\n * [Android Intents guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intent_Filters.html)\n * [Android Developer: Intent](https://developer.android.com/reference/android/content/Intent.html)\n", - "examples": [ - { - "description": "Create an Intent for Launching an Activity", - "code": "This example creates an intent and uses it to launch a new activity.\n\n``` js\nvar intent = Ti.Android.createIntent({\n action: Ti.Android.ACTION_MAIN,\n url: 'activity1.js'\n});\nintent.addCategory(Ti.Android.CATEGORY_LAUNCHER);\nTi.Android.currentActivity.startActivity(intent);\n```\n" - }, - { - "description": "Create an Intent to get a Contact URI", - "code": "This example creates an intent to retrieve contact information from the user's\ncontacts.\n\n``` js\nvar intent = Ti.Android.createIntent({\n action: Ti.Android.ACTION_GET_CONTENT,\n type: \"vnd.android.cursor.item/phone\"\n});\n```\n" - }, - { - "description": "Pick a Photo from the Photo Gallery", - "code": "This example creates an intent to pick an image from the photo gallery.\n\n``` js\nvar intent = Ti.Android.createIntent({\n action: Ti.Android.ACTION_PICK,\n type: \"image/*\"\n});\nintent.addCategory(Ti.Android.CATEGORY_DEFAULT);\n```\n" - }, - { - "description": "Create an ImageView from an Image Send Intent", - "code": "This example requires that an intent filter be set up in the project's `tiapp.xml` file.\nAfter copying the default root activity of your application from the `AndroidManifest.xml`\nfile to the Android manifest section of the `tiapp.xml` file, add an intent filter.\nFor detailed instructions, refer to the\n[Android Intent Filters guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Intent_Filters.html).\n\nYou can trigger this intent filter by long pressing on an image in the Android gallery\nand selecting \"share\".\n\n`tiapp.xml`:\n``` xml\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```\n\n`app.js`:\n``` js\nvar win = Ti.UI.createWindow({\n backgroundColor: '#fff',\n fullscreen: false,\n exitOnClose: true\n });\n win.addEventListener('open', function(e) {\n var intent = Ti.Android.currentActivity.getIntent();\n var iname = Ti.Android.EXTRA_STREAM;\n if (intent && intent.hasExtra(iname)) {\n // Create ImageView from TiBlob\n var blob = intent.getBlobExtra(iname);\n win.add(Ti.UI.createImageView({\n image: blob,\n height: 300,\n width: 300,\n left: 0,\n top: 0\n }));\n } else {\n Ti.API.info('No extra named \"' + iname + '\" found in Intent');\n }\n });\n win.open();\n ```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addCategory", - "summary": "Adds a category to this Intent.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "The category name.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addFlags", - "summary": "Adds to the existing flags on the `Intent`.", - "description": "The specified flag are combined with the existing flags using a bitwise OR.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "flags", - "summary": "Bitwise OR of the flags to add to the existing set.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getBlobExtra", - "summary": "Get a property from this `Intent`.", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "The extra to get, most commonly .", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "getBooleanExtra", - "summary": "Get a boolean property from this Intent.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property to get.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist or is of a different type.", - "type": "Boolean" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "getData", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Get the Data URI from this `Intent`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getDoubleExtra", - "summary": "Get a double property from this `Intent`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property to get.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist or is of a different type.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getIntExtra", - "summary": "Get an integer property from this `Intent`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property to get.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist or is of a different type.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getLongExtra", - "summary": "Get a long property from this `Intent`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property to get.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist or is of a different type.", - "type": "Number" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getStringExtra", - "summary": "Get a string property from this `Intent`.", - "description": "Can also be used to get the string representation of a property that's stored\nas an Android `Parcel`, such as a URI.\n\nTitanium does not support `getParcelableExtra` due to the inability to translate\nall of its possible return types to JavaScript.\n\nSee also:\n[getParcelableExtra](https://developer.android.com/reference/android/content/Intent.html#getParcelableExtra(java.lang.String)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property to get.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "hasExtra", - "summary": "Returns `true` if this `Intent` has the specified property.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property name to check for.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "putExtra", - "summary": "Puts an extra property on this `Intent`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the property to add.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value to set.", - "type": "any" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "putExtraUri", - "summary": "Put a URI property on this `Intent` (useful for ).", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "The property name.", - "type": "String" - }, - { - "name": "value", - "summary": "The URI, as a string or a string array.", - "type": [ - "String", - "Array" - ] - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "action", - "summary": "The action associated with this intent.", - "description": "Specify one of the `ACTION` constants from , or an application-specific custom action string.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "className", - "summary": "The Java class name of the activity associated with this intent\n([packageName](Titanium.Android.Intent.packageName) must also be set).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "data", - "summary": "The Intent's Data URI.", - "description": "The data URI can be set when the intent is created. It is read-only after the\nintent is created.\n\nFor more information on data URIs, see:\n[Intent.setData in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#setData(android.net.Uri))\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "flags", - "summary": "Intent flags.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.FLAG_ACTIVITY_BROUGHT_TO_FRONT", - "Titanium.Android.FLAG_ACTIVITY_CLEAR_TOP", - "Titanium.Android.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET", - "Titanium.Android.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS", - "Titanium.Android.FLAG_ACTIVITY_FORWARD_RESULT", - "Titanium.Android.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY", - "Titanium.Android.FLAG_ACTIVITY_MULTIPLE_TASK", - "Titanium.Android.FLAG_ACTIVITY_NEW_TASK", - "Titanium.Android.FLAG_ACTIVITY_NO_ANIMATION", - "Titanium.Android.FLAG_ACTIVITY_NO_HISTORY", - "Titanium.Android.FLAG_ACTIVITY_NO_USER_ACTION", - "Titanium.Android.FLAG_ACTIVITY_PREVIOUS_IS_TOP", - "Titanium.Android.FLAG_ACTIVITY_REORDER_TO_FRONT", - "Titanium.Android.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED", - "Titanium.Android.FLAG_ACTIVITY_SINGLE_TOP", - "Titanium.Android.FLAG_DEBUG_LOG_RESOLUTION", - "Titanium.Android.FLAG_FROM_BACKGROUND", - "Titanium.Android.FLAG_GRANT_READ_URI_PERMISSION", - "Titanium.Android.FLAG_GRANT_WRITE_URI_PERMISSION", - "Titanium.Android.FLAG_RECEIVER_REGISTERED_ONLY", - "Titanium.Android.FLAG_CANCEL_CURRENT", - "Titanium.Android.FLAG_IMMUTABLE", - "Titanium.Android.FLAG_MUTABLE", - "Titanium.Android.FLAG_NO_CREATE", - "Titanium.Android.FLAG_ONE_SHOT", - "Titanium.Android.FLAG_UPDATE_CURRENT", - "Titanium.Android.FLAG_AUTO_CANCEL", - "Titanium.Android.FLAG_INSISTENT", - "Titanium.Android.FLAG_NO_CLEAR", - "Titanium.Android.FLAG_ONGOING_EVENT", - "Titanium.Android.FLAG_ONLY_ALERT_ONCE", - "Titanium.Android.FLAG_SHOW_LIGHTS" - ] - }, - { - "name": "packageName", - "summary": "The fully-qualified Java package name of the activity.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "type", - "summary": "The MIME type for this Intent.", - "description": "The MIME type can be set when the intent is created. It is read-only after the\nintent is created.\n\nFor information on MIME types and intents, see:\n[Intent.setType in the Android API Reference](https://developer.android.com/reference/android/content/Intent.html#setType(java.lang.String)).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "url", - "summary": "The URL to a Titanium JavaScript Activity.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String", - "availability": "creation" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.Menu": { - "name": "Titanium.Android.Menu", - "summary": "The Titanium binding of an Android Options Menu.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Menu.yml", - "description": "The Menu and MenuItems APIs are used to create the action items\nfor the action bar. Action items can appear in either the action bar or the action bar's\noverflow menu.\n\nTo create action items with JavaScript, assign a callback function to the activity's\n[onCreateOptionsMenu](Titanium.Android.Activity.onCreateOptionsMenu) property.\nThe activity's menu object is passed in to the `onCreateOptionsMenu` function when the menu is created.\nUse the Menu's [add()](Titanium.Android.Menu.add) method to create new action items.\n\nIn Alloy you can use `` and `` elements to create an options menu.\n\n``` xml\n\n \n \n \n\n```\n\nTo switch menu items dynamically, call\n[invalidateOptionsMenu](Titanium.Android.Activity.invalidateOptionsMenu), which causes\nthe `onCreateOptionsMenu` callback to be called again.\n\n#### Menus on Tab Groups\n\nMenus must be added to tab groups using the tab group's\nactivity. These changes were required to support the Android 3.0 action bar.\n\nThe TabGroup activity is available using [TabGroup.activity](Titanium.UI.TabGroup.activity).\nHowever, unlike a window's activity it is not currently possible to set properties on\nthe tab group's activity before the tab group is opened. To add a menu to a tab group,\nset the `onCreateOptionsMenu` property to the tab group's `open` event listener, and\nthen call `invalidateOptionsMenu` to force the changes to take effect.\n\n``` js\ntabGroup.addEventListener(\"open\", function(e) {\n var activity = globals.tabs.getActivity();\n activity.onCreateOptionsMenu = function(e) {\n var menuItem = e.menu.add({\n title : \"Add Task\",\n showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS,\n icon : \"add_icon.png\"\n });\n menuItem.addEventListener(\"click\", function(e) {\n //\n });\n }\n activity.invalidateOptionsMenu();\n});\n```\n\n### Application Notes for Release 3.2.x and earlier\n\nIf you are using Release 3.2.x and earlier, the options menu is presented differently\nbased on the Android version and application settings.\n\nOn Android devices prior to Android 3.0 (API level 11), the menu is always presented\nas an options menu, which is displayed when the **Menu** button is pressed.\n\nOn Android 3.0 and later, menu items can be displayed as _action items_ in the action\nbar. To enable this, the application must be built with a theme that supports the\naction bar, such as the Holo theme. (See\n[Android Themes](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/Android_UI_Components_and_Conventions/Android_Themes.html) in\nthe Titanium Guides for information on setting your application's theme.)\n\nFor menu items displayed in the menu, the `onCreateOptionsMenu` function is called\nonce, and the [onPrepareOptionsMenu](Titanium.Android.Activity.onPrepareOptionsMenu) callback function is called each\ntime the menu is opened. The `onPrepareOptionsMenu` function can be used to switch menu items dynamically.\n\n#### Further Reading\n\nSee also:\n\n* [Menus](https://developer.android.com/guide/topics/ui/menus.html) in the\n Android Developer Guides.\n\n* [Action Bar](https://developer.android.com/guide/topics/ui/actionbar.html) in\n the Android Developer Guides.\n\n* [Menu](https://developer.android.com/reference/android/view/Menu.html)\n in the Android Developer Reference.\n", - "examples": [ - { - "description": "Creating a Simple Menu", - "code": "This sample creates an Android menu that displays a menu item named \"Item 1\",\nwhich logs a debug message when clicked.\n\nIf the action bar is in use, the menu item will be displayed as an action item if there is room in the action bar.\n\n``` js\nvar win = Ti.UI.createWindow({\n fullscreen: true\n});\n\nvar activity = win.activity;\n\nactivity.onCreateOptionsMenu = function(e){\n var menu = e.menu;\n var menuItem = menu.add({\n title: \"Item 1\",\n icon: \"item1.png\",\n showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM\n });\n menuItem.addEventListener(\"click\", function(e) {\n Ti.API.debug(\"I was clicked\");\n });\n};\n\nwin.open();\n```\n" - }, - { - "description": "Creating a Dynamic Menu", - "code": "This sample creates an Android menu that displays a menu item named\n\"Login\" or \"Logout\", depending on the value of a `loggedIn` Boolean variable.\nClick on the item to toggle the variable's value.\n\n``` js\nvar win = Ti.UI.createWindow({\n fullscreen: true\n});\nvar LOGIN = 1, LOGOUT = 2;\nvar loggedIn = false;\n\nvar activity = win.activity;\n\nactivity.onCreateOptionsMenu = function(e){\n var menu = e.menu;\n var login = menu.add({ title: \"Login\", itemId: LOGIN });\n login.icon = 'login.png';\n login.addEventListener(\"click\", function(e) {\n loggedIn = true;\n // In Android 3.0 and above we need to call invalidateOptionsMenu() for menu changes at runtime\n win.activity.invalidateOptionsMenu();\n });\n var logout = menu.add({ title: \"Logout\", itemId: LOGOUT });\n logout.icon = 'logout.png';\n logout.addEventListener(\"click\", function(e) {\n loggedIn = false;\n // In Android 3.0 and above we need to call invalidateOptionsMenu() for menu changes at runtime\n win.activity.invalidateOptionsMenu();\n });\n};\n\nactivity.onPrepareOptionsMenu = function(e) {\n var menu = e.menu;\n menu.findItem(LOGIN).visible = !loggedIn;\n menu.findItem(LOGOUT).visible = loggedIn;\n};\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous simple menu example as an Alloy view.\n\nDue to the way menus are created in Alloy, menus created using Alloy markup are not\ndisplayed until the options menu is invalidated. To force menus (or action items)\nto be displayed, call `invalidateOptionsMenu` from the `open` event listener of the window or tab group\nwhere the menu is defined.\n\nindex.xml:\n``` xml\n\n \n \n\n \n \n\n \n \n \n\n \n \n\n```\n\nindex.js:\n``` js\nfunction doClick(e) {\n Ti.API.info(\"Menu item clicked: \" + e.source.title);\n}\n\n// Ensure menu is displayed\nfunction doOpen(e) {\n $.win.activity.invalidateOptionsMenu();\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Creates a from the passed creation options.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Creation options. Supported options are\n[itemId](Titanium.Android.MenuItem.itemId),\n[groupId](Titanium.Android.MenuItem.groupId),\n[title](Titanium.Android.MenuItem.title),\n[order](Titanium.Android.MenuItem.order),\n[actionView](Titanium.Android.MenuItem.actionView),\n[checkable](Titanium.Android.MenuItem.checkable),\n[checked](Titanium.Android.MenuItem.checked),\n[enabled](Titanium.Android.MenuItem.enabled),\n[icon](Titanium.Android.MenuItem.icon),\n[showAsAction](Titanium.Android.MenuItem.showAsAction),\n[titleCondensed](Titanium.Android.MenuItem.titleCondensed), and\n[visible](Titanium.Android.MenuItem.visible).\n", - "type": "Object" - } - ], - "returns": { - "type": "Titanium.Android.MenuItem" - } - }, - { - "name": "clear", - "summary": "Clears all items from this menu.", - "description": "You should release all references you have retained to previously created.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "close", - "summary": "Closes the menu, if visible.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "findItem", - "summary": "Locates a [MenuItem](Titanium.Android.MenuItem) in this menu, by item ID or reference.", - "description": "Returns the identified menu item, or `null` if the menu item was not located.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "item", - "summary": "Integer [itemId](Titanium.Android.MenuItem.itemId) or a reference to a `MenuItem` object.", - "type": [ - "Number", - "Titanium.Android.MenuItem" - ] - } - ], - "returns": { - "type": "Titanium.Android.MenuItem" - } - }, - { - "name": "getItem", - "summary": "Returns the [MenuItem](Titanium.Android.MenuItem) at a specific index.", - "description": "Returns `null` if no menu item exists at the specified index.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "index", - "summary": "Index of the menu item to return.", - "type": "Number" - } - ], - "returns": { - "type": "Titanium.Android.MenuItem" - } - }, - { - "name": "hasVisibleItems", - "summary": "Returns `true` if this menu has visible items.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "removeGroup", - "summary": "Removes all menu items with the specified\n[groupId](Titanium.Android.MenuItem.groupId).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "groupId", - "summary": "Group ID of items to remove.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeItem", - "summary": "Removes a specific [MenuItem](Titanium.Android.MenuItem) identified by its\n[itemId](Titanium.Android.MenuItem.itemId).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "itemId", - "summary": "Item ID of item to remove.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setGroupEnabled", - "summary": "Enables or disables a group of menu items identified by a\n[groupId](Titanium.Android.MenuItem.groupId).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "groupId", - "summary": "ID of the group to enable or disable.", - "type": "Number" - }, - { - "name": "enabled", - "summary": "True to enable the specified group, false to disable it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setGroupVisible", - "summary": "Shows or hides a group of menu items identified by a\n[groupId](Titanium.Android.MenuItem.groupId).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "groupId", - "summary": "Group ID to enable or disable.", - "type": "Number" - }, - { - "name": "visible", - "summary": "True to show the group, false to hide it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "size", - "summary": "Number of items in this menu.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Number" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "items", - "summary": "Array of menu items in this menu.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Array", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.MenuItem": { - "name": "Titanium.Android.MenuItem", - "summary": "The Titanium binding of an Android menu item.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/MenuItem.yml", - "description": "As of Release 3.3.0, the Menu and MenuItem APIs are used to create action items for the action bar.\nPrior to Release 3.3.0, the APIs could also be used to customize the Options Menu.\n\nIn JavaScript, use the Menu's [add()](Titanium.Android.Menu.add) method to create\nnew action items.\n\nIn Alloy you can define **``** elements inside a `` element.\n\n``` xml\n\n \n \n\n```\n\nAction items can appear in either the action bar or the action bar's\noverflow menu. To determine how an action item is displayed, set\n[showAsAction](Titanium.Android.MenuItem.showAsAction).\n\nYou can optionally customize the look of action items using the\n[actionView](Titanium.Android.MenuItem.actionView) property.\n\nSee the reference page for additional code examples.\n\nFurther Reading:\n\n * [Android Developers: MenuItem](https://developer.android.com/reference/android/view/MenuItem.html)\n", - "events": [ - { - "name": "click", - "summary": "Fired when the user clicks the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ] - }, - { - "name": "expand", - "summary": "Fired when the action view has been expanded.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 4.0 (API level 14) and greater.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ] - }, - { - "name": "collapse", - "summary": "Fired when the action view has been collapsed.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 4.0 (API level 14) and greater.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "collapseActionView", - "summary": "Collapse the action view associated with this menu item.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 4.0 (API level 14) and greater.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "expandActionView", - "summary": "Expand the action view associated with this menu item.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 3.0 (API level 11) and greater.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isActionViewExpanded", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the [actionViewExpanded](Titanium.Android.MenuItem.actionViewExpanded) state of the menu item.\n", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 4.0 (API level 14) and greater.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isCheckable", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the [checkable](Titanium.Android.MenuItem.checkable) state of the menu item.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isChecked", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the [checked](Titanium.Android.MenuItem.checked) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isEnabled", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the [enabled](Titanium.Android.MenuItem.enabled) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isVisible", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the [visible](Titanium.Android.MenuItem.visible) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "setCheckable", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the [checkable](Titanium.Android.MenuItem.checkable) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "checkable", - "summary": "True enable checking and unchecking this item, false to disable it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setChecked", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the [checked](Titanium.Android.MenuItem.checked) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "enabled", - "summary": "True to check the item, false to uncheck it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setEnabled", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the [enabled](Titanium.Android.MenuItem.enabled) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "enabled", - "summary": "True to enable item, false to disable it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setVisible", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the [visible](Titanium.Android.MenuItem.visible) state of the menu item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "visible", - "summary": "True to show the item, false to hide it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "Value of this property is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [MenuItemCompat.setContentDescription](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat#setContentDescription(android.view.MenuItem,%20java.lang.CharSequence)) method.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "Value of this property is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [MenuItemCompat.setContentDescription](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat#setContentDescription(android.view.MenuItem,%20java.lang.CharSequence)) method.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "String", - "default": null - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "Value of this property is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [MenuItemCompat.setContentDescription](https://developer.android.com/reference/android/support/v4/view/MenuItemCompat#setContentDescription(android.view.MenuItem,%20java.lang.CharSequence)) method.\n", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - } - ], - "type": "String", - "default": null - }, - { - "name": "actionView", - "summary": "Custom view that replaces the default menu item button.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 3.0 (API level 11) and greater.\n\nIn order to display the custom view, set the item's\n[showAsAction](Titanium.Android.MenuItem.showAsAction) property to either\n`Titanium.Android.SHOW_AS_ACTION_ALWAYS` or\n`Titanium.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW`.\n\nSince Alloy 1.6.0, you can specify this property using the `` element as a child\nof the `` element, for example:\n\n``` xml\n\n \n \n \n \n \n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "actionViewExpanded", - "summary": "True if this menu item's action view has been expanded.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this API only works\non devices running Android 4.0 (API level 14) and greater.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "checkable", - "summary": "Determines if the item can be checked.", - "description": "Note that check marks are not supported in the icon menus (main\noptions menu shown when fewer than six options are included).\nCheck marks are discouraged in expanded menus (available when\nsix or more options menu items are defined).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "checked", - "summary": "Determines if the item is checked.", - "description": "Note that check marks are not supported in the icon menus (main\noptions menu shown when fewer than six options are included).\nCheck marks are discouraged in expanded menus (available when\nsix or more options menu items are defined).\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "enabled", - "summary": "Determines if the item is enabled.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "groupId", - "summary": "Group ID for this item.", - "description": "Items that share a group ID may be operated on as a group using\nthe menu's [setGroupEnabled](Titanium.Android.Menu.setGroupEnabled) and\n[setGroupVisible](Titanium.Android.Menu.setGroupVisible) methods.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "icon", - "summary": "Icon to display for the this menu item.", - "description": "Icons are not displayed in expanded menus.\n\nIcons can be specified as a local image URI or an Android resource ID.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": [ - "Number", - "String" - ], - "permission": "write-only" - }, - { - "name": "itemId", - "summary": "Item ID for this item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "order", - "summary": "Integer used for controlling the category and sort order for menu items.", - "description": "The lower bits of this value control the order of the menu item related to other\nmenu items within its category. A menu item with a given value will be displayed\nbefore any items with higher values.\n\nThe upper bits of the value control the category. These can be set to the values\ndefined by the `CATEGORY` constants in the Android `Menu` class,\nThese values are not exposed as constants in Titanium.\n\nSee also:\n\n* [getOrder](https://developer.android.com/reference/android/view/MenuItem.html#getOrder())\n in the Android Developer Reference.\n\n* [Menu](https://developer.android.com/reference/android/view/Menu.html) in the\n Android Developer Reference for definitions of the `CATEGORY` values.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "showAsAction", - "summary": "A set of flags that controls how this item appears in the action bar.", - "description": "This is an action-bar specific API. Prior to Release 3.3.0, this property only works\non devices running Android 3.0 (API level 11) and greater.\n\nYou may set one or more flags (by OR'ing them together) to control how\nthis menu item should be placed inside the action bar.\n\nTo control if your item should be displayed as an action button or\nplaced in the overflow menu set one of these flags:\n ,\n ,\n or .\n\nIf you only wish to display the text label even if the item\nhas an icon set the flag.\nNote that the `SHOW_AS_ACTION_WITH_TEXT` setting is only a hint to the system --\nthe text may or may not be shown depending on the width of the screen. For\nexample, text may not be shown on phones in portrait mode. In addition if the\napplication can be displayed in both portrait and landscape mode, whether or not\nthe text is displayed depends on the device's orientation _when the application\nlaunches_. (This is true of both Titanium applications and native Android\napplications.) For this reason, using `SHOW_AS_ACTION_WITH_TEXT` is not recommended\nfor applications that support both orientations.\n\nIf you want to guarantee that text and icon are always visible, you can create a\nbutton with the text and image, and specify it as the item's `actionView`.\n\nYou may specify if your action view is collapsible by setting this property to\n.\n\nFor a collapsible item, the item button (icon and/or text) is displayed when the item is\ncollapsed, and the action view is displayed when the item is expanded.\n\nIf `SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW` is **not** specified, any `actionView`\nspecified is displayed _instead of_ the item's icon and/or text.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "write-only", - "constants": [ - "Titanium.Android.SHOW_AS_ACTION_ALWAYS", - "Titanium.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW", - "Titanium.Android.SHOW_AS_ACTION_IF_ROOM", - "Titanium.Android.SHOW_AS_ACTION_NEVER", - "Titanium.Android.SHOW_AS_ACTION_WITH_TEXT" - ] - }, - { - "name": "title", - "summary": "Title of the item.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "titleCondensed", - "summary": "Shortened version of the item's title.", - "description": "If both `title` and `titleCondensed` are specified, `titleCondensed` is used in the\nicon menus, and the `title` is used in the extended menus.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "visible", - "summary": "Determines whether the menu item is visible.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Boolean", - "default": true - } - ], - "subtype": "proxy" - }, - "Titanium.Android.Notification": { - "name": "Titanium.Android.Notification", - "summary": "UI notifications that can be sent while the application is in the background.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Notification.yml", - "description": "Notifications alert the user that something is happening to your application while it is\nin the background. Notifications appear in the notification drawer until the user\nclears them and on the lock screen for devices running Android 5.0 or greater.\nNote that the user can filter or turn notifications on and off from **Settings**.\n\nFor Android toast notifications (pop-up notifications sent while the application is in the\nforeground), see .\n\nTo create a notification, use the method.\n\nPass the Notification object to the methods of the class\nto send or cancel notifications.\n\nFor examples of using Notifications, see [Android Notifications](#!/guide/Android_Notifications).\n\nFurther Reading:\n\n * [Android Developers: Notifications](https://developer.android.com/design/patterns/notifications.html)\n\n#### Android 5.0 Changes\n\nStarting with Android 5.0 (API 21), ticker text, defined with the `tickerText` property,\nno longer appears in the status bar when the notification is first sent but is used as an\naudible notification if accessibility services are enabled.\n\nNotifications now appear in the lock screen. The user can customize the visibility level of\nthese notifications from **Settings**. The visibility level is based on the `visibility`\nproperty set on the notification.\n", - "examples": [ - { - "description": "Simple Notification Example", - "code": "The following example shows how to create a notification that launches the\napplication when the user clicks on the notification.\n\nTo have the notification launch an application when the user clicks on it,\nassign the `contentIntent` property to an [Intent](Titanium.Android.Intent) object\nthat launches the main activity of the application by specifying the `packageName`\nand `className` properties of the intent.\n\nThe `packageName` is the project's application ID. For Titanium applications, you\ncan find this in the `tiapp.xml` file.\n\nThe `className` is the name of the main activity, prefixed with the `packageName`.\nFor Titanium applications, the name of the main activity is the application name with\nonly the first character capitalized suffixed with `Activity`. You can also find the name\nof the main activity in the `build/android/AndroidManifest.xml` file after you build your\napplication.\n\nFor example, if the application ID is `com.appcelerator.notificationsample` and the\napplication name is `NotificationSample`, the class name will be:\n\n```\ncom.appcelerator.notificationsample.NotificationsampleActivity\n```\n\nThe notification icon must be specified as an Android resource ID. In this case,\nthe icon, `my_icon.png` would be placed in `platforms/android/res/drawable/my_icon.png`.\nSee for more information.\n\nThis example does not include a custom alert sound. For information on adding a\ncustom alert sound, see [Notification.sound](Titanium.Android.Notification.sound).\n\n``` js\n// Intent object to launch the application\nvar intent = Ti.Android.createIntent({\n action: Ti.Android.ACTION_MAIN,\n // Substitute the correct class name for your application\n className: 'com.appcelerator.notificationsample.NotificationsampleActivity',\n // Substitute the correct package name for your application\n packageName: 'com.appcelerator.notificationsample'\n});\nintent.flags |= Ti.Android.FLAG_ACTIVITY_NEW_TASK;\nintent.addCategory(Ti.Android.CATEGORY_LAUNCHER);\n\n// Create a PendingIntent to tie together the Activity and Intent\nvar pending = Titanium.Android.createPendingIntent({\n intent: intent,\n flags: Titanium.Android.FLAG_UPDATE_CURRENT\n});\n\n// Create the notification\nvar notification = Titanium.Android.createNotification({\n // icon is passed as an Android resource ID -- see Ti.App.Android.R.\n icon: Ti.App.Android.R.drawable.my_icon,\n contentTitle: 'Something Happened',\n contentText : 'Click to return to the application.',\n contentIntent: pending\n});\n\n// Send the notification.\nTitanium.Android.NotificationManager.notify(1, notification);\n```\n" - }, - { - "description": "Bundled Notifications Example", - "code": "The following example shows how to create bundled notifications.\n\n``` js\nvar id = 100,\n groupKey = 'group_key';\n\nfor (var i = 3; i > 0; i--) {\n Ti.Android.NotificationManager.notify(id++,\n Ti.Android.createNotification({\n icon: Ti.Android.R.drawable.ic_dialog_info,\n contentTitle: 'NOTIFICATION #' + i,\n contentText : 'Lorem ipsum dolor sit amet, facer eruditi omittantur cu pri, nibh nonumy putant eam eu.'\n groupKey: groupKey\n })\n );\n}\nTi.Android.NotificationManager.notify(id++,\n Ti.Android.createNotification({\n icon: Ti.Android.R.drawable.ic_dialog_info,\n contentTitle: 'NOTIFICATIONS',\n contentText : 'You have 3 notifications.',\n groupKey: groupKey,\n groupSummary: true\n })\n);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setLatestEventInfo", - "summary": "Sets the latest event info using the built-in notification view for this notification.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "contentTitle", - "summary": "Title to display when the notification is expanded.", - "type": "String" - }, - { - "name": "contentText", - "summary": "Text to display when the notification is expanded.", - "type": "String" - }, - { - "name": "contentIntent", - "summary": "Intent to launch when the user clicks on the notification.", - "type": "Titanium.Android.PendingIntent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setProgress", - "summary": "Set the progress this notification represents.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "max", - "summary": "Defines the maximum value the progress can take.", - "type": "Number" - }, - { - "name": "progress", - "summary": "Defines the progress value, between 0 and max.", - "type": "Number" - }, - { - "name": "indeterminate", - "summary": "Allows to enable the indeterminate mode.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addAction", - "summary": "Add an action button to the notification", - "description": "Up to three actions buttons can be added, additional buttons will be ignored.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "icon", - "summary": "Icon of the action button as URL or resource ID", - "type": [ - "Number", - "String" - ] - }, - { - "name": "title", - "summary": "Title of the action button", - "type": "String" - }, - { - "name": "intent", - "summary": "Intent of the action button", - "type": "Titanium.Android.PendingIntent" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "audioStreamType", - "summary": "The audio stream type to use when playing the sound.", - "description": "Specify one of the `STREAM` constants from .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.STREAM_ALARM", - "Titanium.Android.STREAM_DEFAULT", - "Titanium.Android.STREAM_MUSIC", - "Titanium.Android.STREAM_NOTIFICATION", - "Titanium.Android.STREAM_RING", - "Titanium.Android.STREAM_SYSTEM", - "Titanium.Android.STREAM_VOICE_CALL" - ] - }, - { - "name": "category", - "summary": "Sets the notification's category.", - "description": "If your notification falls into one of the predefined categories, assign it accordingly.\nAspects of the system UI such as the notification shade may use this information\nto make ranking and filtering decisions. This property only works for devices running Android 5.0 (API 21)\nand greater.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "String", - "constants": [ - "Titanium.Android.CATEGORY_ALTERNATIVE", - "Titanium.Android.CATEGORY_BROWSABLE", - "Titanium.Android.CATEGORY_DEFAULT", - "Titanium.Android.CATEGORY_DEVELOPMENT_PREFERENCE", - "Titanium.Android.CATEGORY_EMBED", - "Titanium.Android.CATEGORY_FRAMEWORK_INSTRUMENTATION_TEST", - "Titanium.Android.CATEGORY_HOME", - "Titanium.Android.CATEGORY_INFO", - "Titanium.Android.CATEGORY_LAUNCHER", - "Titanium.Android.CATEGORY_MONKEY", - "Titanium.Android.CATEGORY_OPENABLE", - "Titanium.Android.CATEGORY_PREFERENCE", - "Titanium.Android.CATEGORY_SAMPLE_CODE", - "Titanium.Android.CATEGORY_SELECTED_ALTERNATIVE", - "Titanium.Android.CATEGORY_TAB", - "Titanium.Android.CATEGORY_TEST", - "Titanium.Android.CATEGORY_UNIT_TEST", - "Titanium.Android.CATEGORY_ALARM", - "Titanium.Android.CATEGORY_CALL", - "Titanium.Android.CATEGORY_EMAIL", - "Titanium.Android.CATEGORY_ERROR", - "Titanium.Android.CATEGORY_EVENT", - "Titanium.Android.CATEGORY_MESSAGE", - "Titanium.Android.CATEGORY_PROGRESS", - "Titanium.Android.CATEGORY_PROMO", - "Titanium.Android.CATEGORY_RECOMMENDATION", - "Titanium.Android.CATEGORY_SERVICE", - "Titanium.Android.CATEGORY_SOCIAL", - "Titanium.Android.CATEGORY_STATUS", - "Titanium.Android.CATEGORY_TRANSPORT" - ] - }, - { - "name": "channelId", - "summary": "The channel id specified for the notification.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "contentIntent", - "summary": "The `PendingIntent` to execute when the expanded status entry is clicked.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.PendingIntent" - }, - { - "name": "contentText", - "summary": "Description text of the notification.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "contentTitle", - "summary": "Title of the notification.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "contentView", - "summary": "Custom layout to display in the notification.", - "description": "Calling [setLatestEventInfo](Titanium.Android.Notification.setLatestEventInfo) or\nsetting the `contentText` or `contentTitle` properties causes the notification to use\nthe default notification layout, overriding any custom layout set through\n`contentView`.\n\nIf you use a custom layout, you can use the\n[RemoteViews](Titanium.Android.RemoteViews) methods to update the displayed\nnotification.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.RemoteViews", - "permission": "write-only" - }, - { - "name": "defaults", - "summary": "Specifies which values should be taken from the defaults.", - "description": "Specify the bitwise OR of the desired values:\n, , and\n. Use to specify\nthat all values should be taken from the defaults.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.DEFAULT_ALL", - "Titanium.Android.DEFAULT_LIGHTS", - "Titanium.Android.DEFAULT_SOUND", - "Titanium.Android.DEFAULT_VIBRATE" - ] - }, - { - "name": "deleteIntent", - "summary": "The `PendingIntent` to execute when the status entry is deleted by the user with the \"Clear All Notifications\" button.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.PendingIntent" - }, - { - "name": "flags", - "summary": "Set of flags for the notification.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Android.FLAG_AUTO_CANCEL", - "Titanium.Android.FLAG_INSISTENT", - "Titanium.Android.FLAG_NO_CLEAR", - "Titanium.Android.FLAG_ONGOING_EVENT", - "Titanium.Android.FLAG_ONLY_ALERT_ONCE", - "Titanium.Android.FLAG_SHOW_LIGHTS" - ] - }, - { - "name": "groupKey", - "summary": "The group key that the notification will belong to.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "groupSummary", - "summary": "Specifies if this is a group summary notification.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "icon", - "summary": "Notification icon, specified as an Android resource ID, or a local URL to a density-specific image.", - "description": "If specified as a URL, the icon must be placed in one of the density-specific\nfolders under `Resources/android/images`. For example, if your icon is called\n`my_icon.png`, you would create high- and medium-density versions of the icons\nwith the following paths:\n\n```\nResources/android/images/res-hdpi/my_icon.png\nResources/android/images/res-mdpi/my_icon.png\n```\n\nTo access this icon, you'd use the URL '/images/my_icon.png'.\n\nTo access the same icon using an Android resource ID, place the icon in:\n\n```\nplatform/android/res/drawable/my_icon.png\n```\n\nThis icon's resource ID can be referenced through the \nobject:\n\n``` js\nicon: Ti.App.Android.R.drawable.my_icon,\n```\n\nSee for more information on accessing\nAndroid resources by ID.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "largeIcon", - "summary": "Add a large icon to the notification (and the ticker on some devices) specified as an Android resource ID, or a local URL to a density-specific image.", - "description": "If specified as a URL, the icon must be placed in one of the density-specific\nfolders under `Resources/android/images`. For example, if your icon is called\n`my_large_icon.png`, you would create high- and medium-density versions of the icons\nwith the following paths:\n\n```\nResources/android/images/res-hdpi/my_large_icon.png\nResources/android/images/res-mdpi/my_large_icon.png\n```\n\nTo access this large icon, you'd use the URL '/images/my_large_icon.png'.\n\nTo access the same large icon using an Android resource ID, place the icon in:\n\n```\nplatform/android/res/drawable/my_large_icon.png\n```\n\nThis large icon's resource ID can be referenced through the \nobject:\n\n``` js\nicon: Ti.App.Android.R.drawable.my_large_icon,\n```\n\nSee for more information on accessing\nAndroid resources by ID.\n", - "platforms": [ - { - "since": "4.2.0", - "name": "android" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "color", - "summary": "Accent color used behind icon.", - "description": "Accent color of the circle used behind icon. The Icon will be stenciled in white on top of a\ncircle of the color set. For information about color values, see the \"Colors\" section of .\n\nSee Android Reference for the [color](https://developer.android.com/reference/android/app/Notification.html#color) property.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "ledARGB", - "summary": "The color for the LED to blink.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "ledOffMS", - "summary": "The number of milliseconds for the LED to be off while it's flashing.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "ledOnMS", - "summary": "The number of milliseconds for the LED to be on while it's flashing.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "number", - "summary": "The number of events that this notification represents.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "priority", - "summary": "Sets the priority of the notification.", - "description": "This property only works for devices running Android 4.1 (API 16) and greater.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "default": "undefined but behaves as Titanium.Android.PRIORITY_DEFAULT", - "constants": [ - "Titanium.Android.PRIORITY_MAX", - "Titanium.Android.PRIORITY_HIGH", - "Titanium.Android.PRIORITY_DEFAULT", - "Titanium.Android.PRIORITY_LOW", - "Titanium.Android.PRIORITY_MIN" - ] - }, - { - "name": "sound", - "summary": "A URL to the sound to play.", - "description": "The URL cannot refer to a file in the Resources directory, but it can refer to\na file in the raw resources directory\n([Filesystem.resRawDirectory](Titanium.Filesystem.resRawDirectory)) or the\nexternal storage directory\n([Filesystem.externalStorageDirectory](Titanium.Filesystem.externalStorageDirectory)).\n\nNote that this sound property is ignored on Android 8.0 and above. On these OS versions,\nyou must use the [NotificationChannel.sound](Titanium.Android.NotificationChannel.sound)\nproperty and that sound will play for any notification posted under that channel. Also, you will\nstill need to set this notification's sound property for OS versions older than Android 8.0 too,\nmeaning that the sound URL needs to be set in both places.\n\nTo play a raw resource file, place the audio file in the `platform/android/res/raw`\nfolder and reference it as:\n\n``` js\nnotification.sound = Ti.Filesystem.resRawDirectory + audioFileName;\n```\n\nTo play a file from the Resources directory, first copy it to external storage. For example, you\ncould define the following function:\n\n``` js\n// Copy resource file to SD card, and return a native path.\n// Return undefined if we can't copy the file.\nfunction getOrCopyAudioFile(resourceFilename) {\n var outFile = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'sound', 'cricket.wav');\n var outPath = outFile.nativePath;\n\n if (! outFile.exists()) {\n var outDir = Ti.Filesystem.getFile(Ti.Filesystem.externalStorageDirectory, 'sound');\n if (! outDir.isDirectory()) {\n if (! outDir.createDirectory()) {\n Ti.API.debug(\"Failed to create directory.\");\n outDir = null;\n return undefined;\n }\n }\n outDir = null;\n\n var inFile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, 'cricket.wav');\n try {\n inFile.copy(outPath);\n } catch (ex) {\n Ti.API.debug(\"Failed to copy file.\");\n inFile = null;\n return undefined;\n }\n inFile = null;\n }\n outFile = null;\n return outPath;\n}\n```\n\nThen when creating a notification, specify the sound like this:\n\n``` js\nvar sound = getOrCopyAudioFile();\nif (sound) {\n notification.sound = sound;\n}\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "style", - "summary": "Style object that can apply a rich notification style.", - "description": "Notifications in the notification drawer appear in two main visual styles, normal view and big view.\nThe big view of a notification only appears when the notification is expanded.\nThis happens when the notification is at the top of the drawer, or the user clicks the notification.\nOn platform versions that don't offer expanded notifications, styles that depend on expanded notifications have no effect.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": [ - "Titanium.Android.BigTextStyle", - "Titanium.Android.BigPictureStyle" - ] - }, - { - "name": "tickerText", - "summary": "Text to scroll across the screen when this item is added to the status bar.", - "description": "For devices running Android 5.0 (API 21) and greater, the ticket text is no longer displayed\nin the status bar. However, this property is used as an audible notification if accessibility\nservices are enabled.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "visibility", - "summary": "Allows user to conceal private information of the notification on the lock screen.", - "description": "This property only works on devices running Android 5.0 (API 21) and greater.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "default": "undefined but behaves as Titanium.Android.VISIBILITY_PUBLIC", - "constants": [ - "Titanium.Android.VISIBILITY_PRIVATE", - "Titanium.Android.VISIBILITY_PUBLIC", - "Titanium.Android.VISIBILITY_SECRET" - ] - }, - { - "name": "wakeLock", - "summary": "Will wake up the device for the given time (in milliseconds) when the notification is shown.\nThe application needs to also set the `android.permission.WAKE_LOCK` permission\nin the Android manifest section of the `tiapp.xml` file.\n\n``` xml\n\n \n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "wakeLockOptions", - "default": 0 - }, - { - "name": "when", - "summary": "The timestamp for the notification (defaults to the current time).", - "description": "If the timestamp is set to 0, no time is displayed in the notification\nwindow for this notification.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": [ - "Date", - "Number" - ] - } - ], - "subtype": "proxy" - }, - "wakeLockOptions": { - "name": "wakeLockOptions", - "summary": "Parameter for wakeLock", - "extends": "Object", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Notification.yml", - "properties": [ - { - "name": "time", - "summary": "Minimum time the device will be switched on (plus device switch-off time)", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 3000 - }, - { - "name": "flags", - "summary": "Wake lock level and flag. See [PowerManager.newWakeLock in the Android API Reference](https://developer.android.com/reference/android/os/PowerManager.html#newWakeLock(int,%20java.lang.String))", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Titanium.Android.WAKE_LOCK_FULL | Titanium.Android.WAKE_LOCK_ACQUIRE_CAUSES_WAKEUP | Titanium.Android.WAKE_LOCK_ON_AFTER_RELEASE", - "constants": [ - "Titanium.Android.WAKE_LOCK_PARTIAL", - "Titanium.Android.WAKE_LOCK_FULL", - "Titanium.Android.WAKE_LOCK_SCREEN_DIM", - "Titanium.Android.WAKE_LOCK_SCREEN_BRIGHT", - "Titanium.Android.WAKE_LOCK_ACQUIRE_CAUSES_WAKEUP", - "Titanium.Android.WAKE_LOCK_ON_AFTER_RELEASE" - ] - } - ] - }, - "Titanium.Android.NotificationChannel": { - "name": "Titanium.Android.NotificationChannel", - "summary": "Module for notification channels.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/NotificationChannel.yml", - "description": "You can create a notification channel for each distinct type of notification you need to send.\n\nTo create a notification channel, use the method.\n\nFurther Reading:\n\n * [Android Developers: Notification Channel](https://developer.android.com/reference/android/app/NotificationChannel.html)\n", - "examples": [ - { - "description": "Notification Channel Example", - "code": "The following example shows how to create a notification with a channel.\n\n``` js\nvar channel = Ti.Android.NotificationManager.createNotificationChannel({\n id: 'my_channel',\n name: 'TEST CHANNEL',\n importance: Ti.Android.IMPORTANCE_DEFAULT\n }),\n notification = Ti.Android.createNotification({\n icon: Ti.Android.R.drawable.ic_dialog_info,\n contentTitle: 'TITLE',\n contentText : 'This is a test',\n channelId: channel.id\n });\n\nTi.Android.NotificationManager.notify(100, notification);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "bypassDnd", - "summary": "Whether or not notifications posted to this channel can interrupt the user.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "description", - "summary": "User visible description of this channel.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "enableLights", - "summary": "Whether notifications posted to this channel should display notification lights", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "enableVibration", - "summary": "Whether notification posted to this channel should vibrate.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "groupId", - "summary": "Group id this channel belongs to.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "importance", - "summary": "The audio stream type to use when playing the sound.", - "description": "Specify one of the `IMPORTANCE` constants from .", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.IMPORTANCE_DEFAULT", - "Titanium.Android.IMPORTANCE_HIGH", - "Titanium.Android.IMPORTANCE_LOW", - "Titanium.Android.IMPORTANCE_MAX", - "Titanium.Android.IMPORTANCE_MIN", - "Titanium.Android.IMPORTANCE_NONE", - "Titanium.Android.IMPORTANCE_UNSPECIFIED" - ] - }, - { - "name": "id", - "summary": "The channel id specified for the notification channel.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "lightColor", - "summary": "The notification light color for notifications posted to this channel.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "lockscreenVisibility", - "summary": "Whether or not notifications posted to this channel are shown on the lock screen in full or redacted form.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.VISIBILITY_PRIVATE", - "Titanium.Android.VISIBILITY_PUBLIC", - "Titanium.Android.VISIBILITY_SECRET" - ] - }, - { - "name": "name", - "summary": "The visible name of this channel.\nThe recommended maximum length is 40 characters; the value may be truncated if it is too long.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "showBadge", - "summary": "Whether notifications posted to this channel can appear as application icon badges in a Launcher.", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "sound", - "summary": "A URL to the sound to play.", - "description": "The URL cannot refer to a file in the Resources directory, but it can refer to\na file in the raw resources directory\n([Filesystem.resRawDirectory](Titanium.Filesystem.resRawDirectory)).\n\nTo create a raw resource, place the audio file in the `platform/android/res/raw`\nfolder and reference it as:\n\n``` js\nnotificationChannel.sound = Ti.Filesystem.resRawDirectory + 'my_sound.wav';\n```\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "vibratePattern", - "summary": "The vibration pattern for notifications posted to this channel.", - "description": "Specify the pattern in milliseconds as an array. (e.g [100, 100, 100, 400, 400, 100, 100, 100])", - "platforms": [ - { - "since": "7.0.0", - "name": "android" - } - ], - "type": "Array" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.NotificationManager": { - "name": "Titanium.Android.NotificationManager", - "summary": "Module for managing notifications.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/NotificationManager/NotificationManager.yml", - "description": "This module provides methods for sending and canceling notifications,\nwhich are represented by the object.\n\nFurther Reading:\n\n * [Android Notifications guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/Android_Notifications.html)\n * [Android Developer: Notifications](https://developer.android.com/guide/topics/ui/notifiers/notifications.html)\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cancel", - "summary": "Cancels a previously displayed notification.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "id", - "summary": "The ID passed to [notify](Titanium.Android.NotificationManager.notify).", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cancelAll", - "summary": "Cancels all previously displayed notifications.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "notify", - "summary": "Adds a persistent notification to the status bar.", - "description": "The new notification *replaces* any previous notification with the same `id`.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "id", - "summary": "An ID that may be used to cancel a shown notification.", - "type": "Number" - }, - { - "name": "notification", - "summary": "Notification to display.", - "type": "Titanium.Android.Notification" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createNotificationChannel", - "summary": "Create a notification channel.", - "description": "This will return `null` when used on Android versions lower than 8.0.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.Android.NotificationChannel" - } - }, - { - "name": "deleteNotificationChannel", - "summary": "Deletes a notification channel.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "id", - "summary": "The id of the channel", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "areNotificationsEnabled", - "summary": "Returns whether showing notifications is enabled for the application.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "DEFAULT_ALL", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_LIGHTS", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_SOUND", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEFAULT_VIBRATE", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_AUTO_CANCEL", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_INSISTENT", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_NO_CLEAR", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ONGOING_EVENT", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_ONLY_ALERT_ONCE", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_SHOW_LIGHTS", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STREAM_DEFAULT", - "summary": "Use instead.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "notificationChannels", - "summary": "Returns an object with the ID and name of the notification channels", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Dictionary" - } - ] - }, - "NotificationChannels": { - "name": "NotificationChannels", - "summary": "The parameter passed to the `error` callback of .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/NotificationManager/NotificationManager.yml", - "properties": [ - { - "name": "name", - "summary": "Name of the channel", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "id", - "summary": "ID of the channel", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "Titanium.Android.PendingIntent": { - "name": "Titanium.Android.PendingIntent", - "summary": "The Titanium binding of an Android `PendingIntent`.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/PendingIntent.yml", - "description": "Use the method to create a pending intent.\n\nThe type of `Intent` you pass to `createPendingIntent` determines what kind of \n`PendingIntent` is created. Each type corresponds directly with a get method on \nAndroid's PendingIntent:\n\n* To create a `PendingIntent` that starts an activity, pass in an activity intent, \n created with [createIntent](Titanium.Android.createIntent). This is equivalent to\n calling the native Android `PendingIntent.getActivity` method. See\n [PendingIntent.getActivity in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#getActivity(android.content.Context, int, android.content.Intent, int))\n\n* To create a `PendingIntent` that starts a service, pass in a service intent,\n created with [createServiceIntent](Titanium.Android.createServiceIntent). This is \n equivalent to calling the native Android `PendingIntent.getService` method. See \n [PendingIntent.getService in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html#getService(android.content.Context, int, android.content.Intent, int)).\n\nThe `PendingIntent` is always associated with the activity that was the current activity\nwhen the intent was created.\n\nNote that this `PendingIntent` is designed primarily to be used with the \n[Notification](Titanium.Android.Notification) object. It does not support all features \nof the native Android `PendingIntent` -- in particular, \nbroadcast pending intents are not supported.\n\nSee also: \n\n* [PendingIntent in the Android API Reference](https://developer.android.com/reference/android/app/PendingIntent.html)\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "flags", - "summary": "Flags used for creating the Pending Intent.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "constants": [ - "Titanium.Android.FLAG_CANCEL_CURRENT", - "Titanium.Android.FLAG_NO_CREATE", - "Titanium.Android.FLAG_ONE_SHOT", - "Titanium.Android.FLAG_UPDATE_CURRENT" - ] - }, - { - "name": "intent", - "summary": "The intent data to pass to the [Activity](Titanium.Android.Activity) launched by this `PendingIntent`.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.Intent", - "availability": "creation" - }, - { - "name": "updateCurrentIntent", - "summary": "If this property is true, flag will be\nappended to `flags` automatically. Default value is true.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.QuickSettingsService": { - "name": "Titanium.Android.QuickSettingsService", - "summary": "Android service for creating custom quick settings tiles and handling user's interaction with them.", - "extends": "Titanium.Android.Service", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/QuickSettingsService.yml", - "description": "A special kind of service providing access to a tile in the quick settings menu. Used for customization\nand event handling of the tile. Usage is similar to default but with the\naddition of some specific attributes and methods. This service is not started from within the application \nwith the help of an Intent, but instead whenever the custom tile is added in the quick settings menu by the\nuser. Applications can have multiple tiles in the quick settings menu, but a \ncorresponds to a single one - you need separate service file for every tile.\n\nTo create a service file:\n\n 1. Write the JavaScript code you want the service to execute in a separate file.\n The service can execute any Titanium APIs but you should only use non-UI APIs.\n 2. Register the service in your `tiapp.xml` file. Refer to the example below.\n\n Icons used for the 'icon' attribute in the service declaration in tiapp.xml must\n be in the Android drawables folder, so they you should be put under\n `platform/android/res/drawable`\n Icons added with the setIcon method can be outside the directory.\n\nTo get a reference to the `Service` inside the JavaScript service code, use the\n property to retrieve a reference to the service,\n\nFurther Reading:\n\n * [Android Quick Settings Tile API](https://developer.android.com/about/versions/nougat/android-7.0.html#tile_api)\n", - "events": [ - { - "name": "pause", - "summary": "For Javascript-based services that you create, `pause` fires after each time the JavaScript\ncode executes.\n", - "description": "The `resume` and `pause` events occur in pairs, with `resume` firing just before your\nJavaScript service code executes, and `pause` just after.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "properties": [ - { - "name": "iteration", - "summary": "Incrementing integer indicating which iteration of an interval-based Service is pausing.\nFor example, if you have an interval-based Service running every 10 seconds, iteration\n3 would occur at about 30 seconds after you start the instance (assuming your service\ncode runs quickly).\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "resume", - "summary": "For JavaScript-based Services which you create, `resume` fires each time the JavaScript\ncode executes.\n", - "description": "For example, if your Service runs on an interval of 10000 (10 seconds), you would expect\nto see `resume` fired every 10 seconds, just as the JavaScript service code you wrote is\nabout to execute.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "properties": [ - { - "name": "iteration", - "summary": "Incrementing integer indicating which iteration of an interval-based Service is pausing.\nFor example, if you have an interval-based Service running every 10 seconds, iteration\n3 would occur at about 30 seconds after you start the instance (assuming your service\ncode runs quickly).\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "start", - "summary": "Fired when the bound service instance starts.", - "description": "Bound service instances are created via .\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service" - }, - { - "name": "stop", - "summary": "Fired when the bound service instance stops.", - "description": "The service stops when or\n is called and there are no more bound,\nun-stopped clients.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service" - }, - { - "name": "taskremoved", - "summary": "Fired when the task that comes from the service's application has been removed.", - "description": "This event is fired if the service is currently running and the user has removed a task\nthat comes from the service's application, e.g. the user swipes the application away from\nthe recent applications list. It only works for unbound service which is\nstarted using .\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service" - }, - { - "name": "startlistening", - "summary": "Tile is listening for events.", - "description": "Dispatched whenever the user has opened the quick setting menu and the Tile is added in there.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "stoplistening", - "summary": "Tile has stopped listening for events.", - "description": "Dispatched whenever the user has collapsed the quick setting menu and the Tile is not visible.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tileadded", - "summary": "The Tile has been added in the quick menu.", - "description": "Dispatched whenever the user has moved the Tile for this service in the quick settings menu.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tileremoved", - "summary": "The Tile has been removed from the quick menu.", - "description": "Dispatched whenever the user has removed the Tile for this service from the quick settings menu.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tiledialogoptionselected", - "summary": "An item from the single choice menu has been selected.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "properties": [ - { - "name": "itemIndex", - "summary": "Index of the selected item from the single choice menu in the dialog.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "tiledialogcancelled", - "summary": "Dispatched when the alert dialog has been cancelled.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tiledialogpositive", - "summary": "Dispatched when the positive (index 0) button has been clicked.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tiledialogneutral", - "summary": "Dispatched when the neutral (index 1) button has been clicked.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - }, - { - "name": "tiledialognegative", - "summary": "Dispatched when the negative (index 2) button has been clicked.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ] - } - ], - "examples": [ - { - "description": "Update Tile Example", - "code": "This example shows how to create a service in JavaScript.\nIt will update the Tile in quick settings according to the\nuser's interaction.\n\nFile: updatequicksettings.js:\n``` js\nvar service = Ti.Android.currentService;\nservice.addEventListener('click', function () {\n\n if (service.getState() == Ti.Android.TILE_STATE_ACTIVE) {\n service.setState(Ti.Android.TILE_STATE_INACTIVE);\n service.setLabel('Inactive');\n service.setIcon('inactive.png');\n } else {\n service.setState(Ti.Android.TILE_STATE_ACTIVE);\n service.setLabel('Active');\n service.setIcon('active.png');\n }\n service.updateTile();\n}\n```\n\nRegister the service in tiapp.xml:\n``` xml\n\n \n \n \n \n \n\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "foregroundCancel", - "summary": "Puts the service into the \"background\" state and removes its foreground notification.", - "description": "If you call the [foregroundNotify()](Titanium.Android.Service.foregroundNotify) method to\nput the service into the \"foreground\" state, then you call this method to put the service\nback into the \"background\" state. This will also automatically remove the foreground service's\nnotification that was put into the status bar.\n\nNote that stopping a foreground service will remove its foreground notification from\nthe status bar as well. So, you do not have to call this method to remove it. This method\nis only intended to be used by services that need to dynamically change states.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "returns": { - "type": "void" - } - }, - { - "name": "foregroundNotify", - "summary": "Puts the service into the \"foreground\" state and displays a notification.", - "description": "Calling this method will change the service from the \"background\" state (the default)\nto the \"foreground\" state. It will also post a notification to the status bar to notify the\nend-user that the app is doing work, even while backgrounded. This feature is typically\nused by apps that play music, monitor current location, or perform large downloads while\nthe app is in the background.\n\nNote that a foreground service is far less likely to be terminated by the operating system\nwhile the app is in the background. A foreground service is also needed if the app\nneeds to acquire location data since Android 8.0 and higher throttles location acquisition\nwhile the app is in the background.\n\nSee Android 8.0 \"Background Execution Limits\":\n\n * https://developer.android.com/about/versions/oreo/background\n\nYou can call this method before or after the service has been started. If you need to\nchange the displayed notification, then you can call this method again with the same\nnotification ID and with an updated [notification] object.\n\nThe notification will be automatically removed from the status bar when the service has\nbeen stopped or if you call the [foregroundCancel()](Titanium.Android.Service.foregroundCancel)\nmethod.\n\nThis method will fail on Android 9.0 and above unless you set the following Android manifest\npermission in your \"tiapp.xml\" file.\n\n``` xml\n\n \n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "parameters": [ - { - "name": "id", - "summary": "Unique integer ID to be assigned to the notification. Cannot be zero.", - "type": "Number" - }, - { - "name": "notification", - "summary": "Notification to display in the status bar. Cannot be null.", - "type": "Titanium.Android.Notification" - }, - { - "name": "foregroundServiceType", - "summary": "Notification service type specified by .", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "start", - "summary": "Starts the Service.", - "description": "Effective only if this instance of was created\nwith .\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops this running instance of the Service.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "returns": { - "type": "void" - } - }, - { - "name": "updateTile", - "summary": "Applies current tile's properties.", - "description": "Updates the Tile's with it's current label, icon and state.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setIcon", - "deprecated": { - "notes": "Please use the [icon](Titanium.Android.QuickSettingsService.icon) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Changes the Tile's icon.", - "description": "If no image is passed as Tile icon it will use the Application's one.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "icon", - "summary": "Source of the icon image", - "type": [ - "String", - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setState", - "deprecated": { - "notes": "Please use the [state](Titanium.Android.QuickSettingsService.state) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Sets the state of the Tile.", - "description": "State can be one of the following: [TILE_STATE_UNAVAILABLE](Titanium.Android.TILE_STATE_UNAVAILABLE),\n[TILE_STATE_INACTIVE](Titanium.Android.TILE_STATE_INACTIVE),\n[TILE_STATE_ACTIVE](Titanium.Android.TILE_STATE_ACTIVE)\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "state", - "summary": "State to be set.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setLabel", - "deprecated": { - "notes": "Please use the [label](Titanium.Android.QuickSettingsService.label) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Changes the Tile's label.", - "description": "If no label is set the Tile uses the Application name.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "label", - "summary": "String to be used.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getIcon", - "deprecated": { - "notes": "Please use the [icon](Titanium.Android.QuickSettingsService.icon) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Returns the Tile's current icon.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": [ - "String", - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - } - }, - { - "name": "getState", - "deprecated": { - "notes": "Please use the [state](Titanium.Android.QuickSettingsService.state) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Returns the Tile's current state.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getLabel", - "deprecated": { - "notes": "Please use the [label](Titanium.Android.QuickSettingsService.label) property to get/set the value.", - "since": "10.0.0" - }, - "summary": "Returns the Tile's current label.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "isLocked", - "summary": "Returns 'true' if the device is currently locked, 'false' otherwise.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isSecure", - "summary": "Returns 'true' if the device is in secure state, 'false' otherwise.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "showDialog", - "summary": "Opens an Alert dialog.", - "description": "Creates and shows a default Alert dialog with the provided options dictionary.\n\nNote: Alert dialog only supports one of the following: message/options.\nIf you pass both - only `message` will be shown.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Dictionary containing the options for the dialog.", - "type": "showParams" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "startActivityAndCollapse", - "summary": "Collapses the quick settings menu and starts an activity for the passed Intent.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "intent", - "summary": "Intent to be fired.", - "type": "Titanium.Android.Intent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unlockAndRun", - "summary": "Prompts the user to unlock the device and runs the JS code.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "jsCode", - "summary": "JavaScript code to be evaluated.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "intent", - "summary": "The intent used to start or bind to the Service.", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "type": "Titanium.Android.Intent", - "permission": "read-only" - }, - { - "name": "serviceInstanceId", - "summary": "A service can be started more than once -- this number (based on an incrementing integer)\nindicates which \"start number\" in the sequence the current service instance is.\n", - "platforms": [ - { - "since": "7.0", - "name": "android" - } - ], - "inherits": "Titanium.Android.Service", - "type": "Number", - "permission": "read-only" - }, - { - "name": "icon", - "summary": "Changes the Tile's icon.", - "description": "If no image is passed as Tile icon it will use the Application's one.\n", - "platforms": [ - { - "since": "10.0.0", - "name": "android" - } - ], - "type": [ - "String", - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - }, - { - "name": "state", - "summary": "Sets the state of the Tile.", - "description": "State can be one of the following: [TILE_STATE_UNAVAILABLE](Titanium.Android.TILE_STATE_UNAVAILABLE),\n[TILE_STATE_INACTIVE](Titanium.Android.TILE_STATE_INACTIVE),\n[TILE_STATE_ACTIVE](Titanium.Android.TILE_STATE_ACTIVE)\n", - "platforms": [ - { - "since": "10.0.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Android.TILE_STATE_UNAVAILABLE", - "Titanium.Android.TILE_STATE_INACTIVE", - "Titanium.Android.TILE_STATE_ACTIVE" - ] - }, - { - "name": "label", - "summary": "The Tile's label.", - "description": "If no label is set the Tile uses the Application name.\n", - "platforms": [ - { - "since": "10.0.0", - "name": "android" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "showParams": { - "name": "showParams", - "summary": "Dictionary of options for the method.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/OptionDialog.yml", - "properties": [ - { - "name": "title", - "summary": "String to be used as title for the dialog.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "message", - "summary": "String to be used as a message for the dialog.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "buttonNames", - "summary": "Array of String instances.", - "description": "They will be shown as buttons' titles. They are limited up\nto three buttons and with a predefined order - positive, neutral, negative. See events.\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "options", - "summary": "Array of String instances.", - "description": "They will be shown as a single choice list.\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "animated", - "summary": "Determines whether to animate the dialog as it is shown.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "optional": true - }, - { - "name": "view", - "summary": "View to which to attach the dialog.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "rect", - "summary": "Positions the arrow of the option dialog relative to the attached view's dimensions.", - "description": "Setting the x, y coordinates to (0, 0) places the dialog in the top-left corner of the\nview object. Set both the `width` and `height` properties to 1.\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dimension", - "optional": true - } - ] - }, - "Titanium.Android.R": { - "name": "Titanium.Android.R", - "summary": "The Titanium binding of the native Android `R` class, giving access to\nAndroid system-wide resources or application resources.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/R.yml", - "description": "To access system-wide resources your application's resources, use\n.\nTo access your application's resources, use .\n\nThese properties and sub-properties correspond directly to the properties\nof the the `android.R` class, and should have the same syntax.\nTo retrieve the \"OK\" string from system resources in Android:\n\n``` js\nTi.Android.currentActivity.getString(Ti.Android.R.string.ok);\n```\n\nIf the file `platform/android/res/drawable/icon.png` exists in the\nproject, it can be accessed using its resource name, as follows:\n\n``` js\nvar resid = Titanium.App.Android.R.drawable.icon;\n```\n\nSee also:\n[android.R](https://developer.android.com/reference/android/R.html) in the\nAndroid Developer Reference.\nFor more information, refer to the official documentation on the Android\nDeveloper website about\n[accessing application resources](https://developer.android.com/guide/topics/resources/accessing-resources.html).\n\nStarting in Titanium SDK 7.3.0, this API exposes all Android related R classes\nfor the usage in Hyperloop. For example, it can be used to access `menu` resources\nas part of native user interfaces, e.g. `BottomNavigationView` or `RecyclerView`.\nSee an example in the [Hyperloop Sample App](https://github.com/tidev/hyperloop-examples) for details!\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "anim", - "summary": "Animation resources. See\n[R.anim](https://developer.android.com/reference/android/R.anim.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "animator", - "summary": "Animator resources. See\n[R.animator](https://developer.android.com/reference/android/R.animator.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "array", - "summary": "Array resources. See [R.array](https://developer.android.com/reference/android/R.array.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "attr", - "summary": "Attribute resources. See\n[R.attr](https://developer.android.com/reference/android/R.attr.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "bool", - "summary": "Boolean resources. See\n[R.bool](https://developer.android.com/reference/android/R.bool.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "color", - "summary": "Color resources. See\n[R.color](https://developer.android.com/reference/android/R.color.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "dimen", - "summary": "Dimension resources. See\n[https://developer.android.com/reference/android/R.dimen.html](https://developer.android.com/reference/android/R.dimen.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "drawable", - "summary": "Drawable resources. See\n[R.drawable](https://developer.android.com/reference/android/R.drawable.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "fraction", - "summary": "Fraction resources. See\n[R.fraction](https://developer.android.com/reference/android/R.fraction.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "id", - "summary": "ID resources. See\n[R.id](https://developer.android.com/reference/android/R.id.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "integer", - "summary": "Integer resources. See\n[R.integer](https://developer.android.com/reference/android/R.integer.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "interpolator", - "summary": "Interpolator resources. See\n[R.fraction](https://developer.android.com/reference/android/R.interpolator.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "layout", - "summary": "Layout resources. See\n[R.layout](https://developer.android.com/reference/android/R.layout.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "menu", - "summary": "Menu resources. See\n[R.menu](https://developer.android.com/reference/android/R.menu.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "mipmap", - "summary": "Mipmap resources. See\n[R.mipmap](https://developer.android.com/reference/android/R.mipmap.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "plurals", - "summary": "Plurals resources. See\n[R.plurals](https://developer.android.com/reference/android/R.plurals.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "raw", - "summary": "Raw resources. See\n[R.raw](https://developer.android.com/reference/android/R.raw.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "string", - "summary": "String resources. See\n[R.string](https://developer.android.com/reference/android/R.string.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "style", - "summary": "Style resources. See\n[R.style](https://developer.android.com/reference/android/R.style.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "styleable", - "summary": "Styleable resources. See\n[R.styleable](https://developer.android.com/reference/android/R.styleable.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "transition", - "summary": "Transition resources. See\n[R.transition](https://developer.android.com/reference/android/R.transition.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "xml", - "summary": "XML resources. See\n[R.xml](https://developer.android.com/reference/android/R.xml.html)\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.RemoteViews": { - "name": "Titanium.Android.RemoteViews", - "summary": "The Titanium binding of [Android RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html). \n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/RemoteViews.yml", - "description": "`RemoteViews` is an API for referencing and updating a remote view hierarchy that\nlives in another process, for example, in a [Notification](Titanium.Android.Notification).\n\nTo create a remote view hierarchy, you must define an Android XML layout for the views\nyou want to display, and place the XML file in the `platform/android/res/layout` inside your\nproject folder. See the examples for a sample XML layout and sample code for creating a\nremote view.\n\nTo use a remote view hierarchy in a notification, see\n[Notification.contentView](Titanium.Android.Notification.contentView).\n\nBecause the remote view hierarchy belongs to another process, you cannot call methods on it\ndirectly, but you can call methods on the `RemoteViews` object to update views in the\nhierarchy by ID. To reference a view inside the layout, use the\n object to reference the view's ID. For example, if you have a \nview with the ID `notify_imageview`, you can refer to it using:\n \n``` js\nTi.App.Android.R.id.notify_imageview\n```\n\nSee also: \n\n* [RemoteViews](https://developer.android.com/reference/android/widget/RemoteViews.html)\n in the Android Developer Reference.\n\n* [XML Layouts](https://developer.android.com/guide/topics/ui/declaring-layout.html)\n in the Android Developer Guide.\n", - "examples": [ - { - "description": "Create a Remote View", - "code": "\nThe following code excerpt creates a `RemoteViews` object based on a custom layout \ncalled `custom_layout.xml`, and set a label's text.\n\n``` js\nvar AppR = Ti.App.Android.R;\nvar customLayout = Ti.Android.createRemoteViews({ layoutId: AppR.layout.custom_layout });\ncustomLayout.setTextViewText(AppR.id.custom_text, \"Click Me!\");\n```\n\nThis example uses a simple custom layout:\n\n``` xml\n\n\n \n\n```\n\nThe layout file for this example must be placed in\n`platform/android/res/layout/custom_layout.xml`. \n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setBoolean", - "summary": "Calls a method taking a single `boolean` argument on a view in the remote view\nhierarchy. See Android's documentation for\n[setBoolean](https://developer.android.com/reference/android/widget/RemoteViews.html#setBoolean(int, java.lang.String, boolean)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to invoke the method on.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "methodName", - "summary": "Name of the method to call.", - "type": "String" - }, - { - "name": "value", - "summary": "Value to pass to the method.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setChronometer", - "summary": "Sets the base time, format string, and started flag for a chronometer\nin the remote view hierarchy.\n", - "description": "See Android's documentation for \n[setChronometer](https://developer.android.com/reference/android/widget/RemoteViews.html#setChronometer(int, long, java.lang.String, boolean)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the Chronometer to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "base", - "summary": "Time at which the timer would have read 0:00.", - "type": "Date" - }, - { - "name": "format", - "summary": "Chronometer format string, or `null` to simply display the timer value.", - "type": "String" - }, - { - "name": "started", - "summary": "True if you want the clock to be started, false if not.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setDouble", - "summary": "Calls a method taking a single `double` argument on a view in the remote view\nhierarchy.\n", - "description": "See Android's documentation for \n[setDouble](https://developer.android.com/reference/android/widget/RemoteViews.html#setDouble(int, java.lang.String, double)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "methodName", - "summary": "Name of the method to call.", - "type": "String" - }, - { - "name": "value", - "summary": "Value to pass to the method.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setImageViewResource", - "summary": "Sets the image for an image view in the remote view hierarchy using an Android drawable resource.", - "description": "See Android's documentation for \n[setImageViewResource](https://developer.android.com/reference/android/widget/RemoteViews.html#setImageViewResource(int, int)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the `ImageView` to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "srcId", - "summary": "Resource ID of the new image.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setImageViewUri", - "summary": "Sets the image for an image view in the remote view hierarchy using a URI.\n", - "description": "This method supports supports both Android and Titanium URLs. \n\nSee Android's documentation for\n[setImageViewUri](https://developer.android.com/reference/android/widget/RemoteViews.html#setImageViewUri(int, android.net.Uri)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the `ImageView` to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "uri", - "summary": "URI of the image (both Android and Titanium URLs are supported).", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setInt", - "summary": "Calls a method taking a single `int` argument on a view in the remote view hierarchy.\n", - "description": "See Android's documentation for [setInt](https://developer.android.com/reference/android/widget/RemoteViews.html#setInt(int, java.lang.String, int))\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "methodName", - "summary": "Name of the method to call.", - "type": "String" - }, - { - "name": "value", - "summary": "Value to pass to the method.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setOnClickPendingIntent", - "summary": "Launches a when the specified view is clicked.", - "description": "See Android's documentation for\n[setOnClickPendingIntent](https://developer.android.com/reference/android/widget/RemoteViews.html#setOnClickPendingIntent(int, android.app.PendingIntent)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to add a click listener to.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "pendingIntent", - "summary": "The `PendingIntent` to execute when this view is clicked.", - "type": "Titanium.Android.PendingIntent" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setProgressBar", - "summary": "Sets the progress, max value, and indeterminate flag of a progress bar in the\nremote view hierarchy.\n", - "description": "See Android's documentation for\n[setProgressBar](https://developer.android.com/reference/android/widget/RemoteViews.html#setProgressBar(int, int, int, boolean)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the progress bar to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "max", - "summary": "The new maximum value of the progress bar.", - "type": "Number" - }, - { - "name": "progress", - "summary": "The new progress value of the progress bar (from 0..`max`).", - "type": "Number" - }, - { - "name": "indeterminate", - "summary": "Determines whether the progress bar is indeterminate.\nIf `true`, the progress bar displays an infinite looping animation.\n", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setString", - "summary": "Calls a method taking a single String argument on a view in the remote view\nhierarchy.\n", - "description": "See Android's documentation for\n[setString](https://developer.android.com/reference/android/widget/RemoteViews.html#setString(int, java.lang.String, java.lang.String)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "methodName", - "summary": "Name of the method to call.", - "type": "String" - }, - { - "name": "value", - "summary": "String to pass to the method.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setTextColor", - "summary": "Sets the text color of a view in the remote view hierarchy.", - "description": "See Android's documentation for\n[setTextColor](https://developer.android.com/reference/android/widget/RemoteViews.html#setTextColor(int, int)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "color", - "summary": "Color as an integer.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setTextViewText", - "summary": "Sets the text of a text view in the remote view hierarchy.", - "description": "See Android's documentation for\n[setTextViewText](https://developer.android.com/reference/android/widget/RemoteViews.html#setTextViewText(int, java.lang.CharSequence)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the text view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "text", - "summary": "New text for the text view.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setUri", - "summary": "Calls a method taking one URI on a view in the remote view hierarchy.", - "description": "See Android's documentation for\n[setUri](https://developer.android.com/reference/android/widget/RemoteViews.html#setUri(int, java.lang.String, android.net.Uri)).\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to update.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "methodName", - "summary": "Name of the method to call.", - "type": "String" - }, - { - "name": "value", - "summary": "URI (as a string) to pass to the method.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setViewVisibility", - "summary": "Sets the visibility of a view in the remote view hierarchy.", - "description": "See Android's documentation for [setViewVisibility](https://developer.android.com/reference/android/widget/RemoteViews.html#setViewVisibility(int, int))\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "parameters": [ - { - "name": "viewId", - "summary": "Resource ID of the view to show or hide.\nApplication-specific resource IDs can be specified using .\n", - "type": "Number" - }, - { - "name": "visibility", - "summary": "The visibility. Either `0` (VISIBLE), `4` (INVISIBLE) or `8` (GONE).", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "layoutId", - "summary": "Android layout resource ID for the view to display. Required.", - "description": "To define a custom layout resource in your application, the XML layout file \nshould be placed in `platform/android/res/layout` folder inside your project folder.\n\nUse to reference the ID of the layout.\n", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "type": "Number", - "availability": "creation" - }, - { - "name": "packageName", - "summary": "Package name that the resource ID lives in. Optional.", - "platforms": [ - { - "since": "1.6", - "name": "android" - } - ], - "type": "String", - "availability": "creation" - } - ], - "subtype": "proxy" - }, - "Titanium.Android.Service": { - "name": "Titanium.Android.Service", - "summary": "Android application component that executes in the background.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Android/Service.yml", - "description": "A service is a component started by an application that runs in the background. The service\ndoes not have any application UI associated with it, so the user does not directly interact\nwith it, only your application.\n\nThe Titanium SDK gives you the ability to write your own Android Services using JavaScript.\nThe service executes your JavaScript code at intervals you specify. Note that the service\nmay stop running if the application is killed.\n\nTo create a service:\n\n 1. Write the JavaScript code you want the service to execute in a separate file.\n The service can execute any Titanium APIs but you should only use non-UI APIs.\n 2. Register the service in your `tiapp.xml` file. Refer to the example below.\n 3. Create a service intent by passing the JavaScript file to\n the method and set the interval to run the\n code using the intent's `putExtra()` method.\n 4. Pass the Intent object to either the method\n to create a `Service` object (*bound service*), where the application can\n manage the service by invoking methods and binding callbacks on the object,\n or to the method to start the service (*started service*)\n and the service manages itself.\n\nUse the `Titanium.Android.Service` API to manage the service.\n\nTo get a reference to the `Service` inside the JavaScript service code, use the\n property to retrieve a reference to the service,\nthen invoke the `Titanium.Android.Service` APIs on the `Service` object.\n\nFurther Reading:\n\n * [Android Services guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/Android_API_Deep_Dives/Android_Services.html)\n * [Android Developer: Service](https://developer.android.com/reference/android/app/Service.html)\n\n### Background Location Service Example\nIn order to obtain location events while the application is backgrounded a foreground service must be used.\nBelow is an example of a simple background location service.\n\ntiapp.xml:\n``` xml\n\n \n \n \n \n \n \n \n\n```\n\nlocationService.js:\n``` js\nconsole.log(`Background location service started.`);\n\n// Create foreground service.\nTi.Android.currentService.foregroundNotify(\n 123,\n Ti.Android.createNotification({\n contentTitle: \"Background Location Service\",\n contentText: \"Obtaining location data...\",\n contentIntent: Ti.Android.createPendingIntent({\n intent: Ti.App.Android.launchIntent || Ti.Android.createIntent(),\n })\n }),\n Ti.Android.FOREGROUND_SERVICE_TYPE_LOCATION\n);\n```\n\napp.js:\n``` js\nconst win = Ti.UI.createWindow({ backgroundColor: 'gray', layout: 'vertical' });\nconst backgroundServiceBtn = Ti.UI.createButton({ title: 'START BACKGROUND SERVICE' });\nconst listView = Ti.UI.createListView();\n\nlet count = 1;\nlet service = null;\n\n// Set accuracy to high\nTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;\n\n// Enable manual configuration via location providers.\nTi.Geolocation.Android.manualMode = true;\n\n// Define a location provider.\nTi.Geolocation.Android.addLocationProvider(\n Ti.Geolocation.Android.createLocationProvider({\n name: Ti.Geolocation.Android.PROVIDER_GPS,\n minUpdateDistance: 0,\n minUpdateTime: 5000\n })\n);\n\nfunction getLocation () {\n\n // Create location event listener.\n Ti.Geolocation.addEventListener('location', e => {\n\n // Create new section for location data.\n let section = Ti.UI.createListSection({ headerTitle: `#${count++} - ${new Date().toTimeString()}` });\n if (e.success) {\n if (e.coords) {\n e = e.coords;\n }\n\n // Insert location data.\n section.items = [\n { properties: { title: 'LOCATION:\\n' + e.latitude + ', ' + e.longitude, color: 'green' } },\n { properties: { title: 'ALTITUDE:\\n' + e.altitude, color: 'green' } },\n { properties: { title: 'ACCURACY:\\n' + e.accuracy, color: 'green' } }\n ])\n\n } else {\n\n // Oops! Something bad happened.\n section.items = [\n { properties: { title: 'ERROR:\\n' + e.error, color: 'red' } }\n ];\n }\n\n // Add section to listView\n listView.appendSection(section);\n });\n}\n\nfunction startBackgroundLocationService() {\n if (service) {\n console.log('Starting background location service...');\n service.start();\n backgroundServiceBtn.title = 'STOP BACKGROUND SERVICE';\n }\n}\n\nfunction stopBackgroundLocationService() {\n if (service) {\n console.log('Stopping background location service...');\n service.stop();\n backgroundServiceBtn.title = 'START BACKGROUND SERVICE';\n }\n}\n\nwin.addEventListener('open', () => {\n\n // Request location permissions.\n Ti.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_ALWAYS, e => {\n if (e.success) {\n getLocation();\n } else {\n alert('Could not obtain location permissions.');\n }\n });\n});\n\nbackgroundServiceBtn.addEventListener('click', () => {\n if (!service) {\n\n // Create background location service.\n const intent = Ti.Android.createServiceIntent({ url: 'locationService.js' });\n service = Ti.Android.createService(intent);\n\n // Android 10+ request background location permissions.\n if (parseInt(Ti.Platform.version.split('.')[0]) >= 10) {\n Ti.Android.requestPermissions([ 'android.permission.ACCESS_BACKGROUND_LOCATION' ], e => {\n if (e.success) {\n startBackgroundLocationService();\n } else {\n alert('Could not obtain background location permissions.');\n }\n });\n } else {\n startBackgroundLocationService();\n }\n\n } else {\n stopBackgroundLocationService();\n }\n});\n\nwin.add([backgroundServiceBtn, listView]);\nwin.open();\n```\n", - "events": [ - { - "name": "pause", - "summary": "For Javascript-based services that you create, `pause` fires after each time the JavaScript\ncode executes.\n", - "description": "The `resume` and `pause` events occur in pairs, with `resume` firing just before your\nJavaScript service code executes, and `pause` just after.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "properties": [ - { - "name": "iteration", - "summary": "Incrementing integer indicating which iteration of an interval-based Service is pausing.\nFor example, if you have an interval-based Service running every 10 seconds, iteration\n3 would occur at about 30 seconds after you start the instance (assuming your service\ncode runs quickly).\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "resume", - "summary": "For JavaScript-based Services which you create, `resume` fires each time the JavaScript\ncode executes.\n", - "description": "For example, if your Service runs on an interval of 10000 (10 seconds), you would expect\nto see `resume` fired every 10 seconds, just as the JavaScript service code you wrote is\nabout to execute.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "properties": [ - { - "name": "iteration", - "summary": "Incrementing integer indicating which iteration of an interval-based Service is pausing.\nFor example, if you have an interval-based Service running every 10 seconds, iteration\n3 would occur at about 30 seconds after you start the instance (assuming your service\ncode runs quickly).\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "start", - "summary": "Fired when the bound service instance starts.", - "description": "Bound service instances are created via .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ] - }, - { - "name": "stop", - "summary": "Fired when the bound service instance stops.", - "description": "The service stops when or\n is called and there are no more bound,\nun-stopped clients.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ] - }, - { - "name": "taskremoved", - "summary": "Fired when the task that comes from the service's application has been removed.", - "description": "This event is fired if the service is currently running and the user has removed a task\nthat comes from the service's application, e.g. the user swipes the application away from\nthe recent applications list. It only works for unbound service which is\nstarted using .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ] - } - ], - "examples": [ - { - "description": "Hello World Service", - "code": "This example shows how to create a service in JavaScript.\nYour service code is included in its own JavaScript file.\n\nIn this example, the service reads data from the which created it,\nto see what it should say besides \"Hello World\".\n\nFile: myservice.js:\n``` js\nvar service = Titanium.Android.currentService;\nvar intent = service.intent;\nvar message = intent.getStringExtra(\"message_to_echo\");\nTitanium.API.info(\"Hello World! I am a Service. I have this to say: \" + message);\n```\n\nRegister the service in tiapp.xml:\n``` xml\n\n \n \n \n \n \n\n```\n\nCode in \"regular\" Titanium file to launch the service and listen for pause/resume events.\nCode also stops the service after its code runs 3 times.\n\n``` js\nvar intent = Titanium.Android.createServiceIntent( { url: 'myservice.js' } );\n// Service should run its code every 2 seconds.\nintent.putExtra('interval', 2000);\n// A message that the service should 'echo'\nintent.putExtra('message_to_echo', 'Titanium rocks!');\n\nvar service = Titanium.Android.createService(intent);\nservice.addEventListener('resume', function(e) {\n Titanium.API.info('Service code resumes, iteration ' + e.iteration);\n});\nservice.addEventListener('pause', function(e) {\n Titanium.API.info('Service code pauses, iteration ' + e.iteration);\n if (e.iteration === 3) {\n Titanium.API.info('Service code has run 3 times, will now stop it.');\n service.stop();\n }\n});\nservice.start();\n```\n\nConsole Output:\n```\n[INFO] [29,1942] Service code resumes, iteration 1\n[INFO] [70,2029] Hello World! I am a Service. I have this to say: Titanium rocks!\n[INFO] [3,2070] Service code pauses, iteration 1\n[INFO] [2,3915] Service code resumes, iteration 2\n[INFO] [31,3961] Hello World! I am a Service. I have this to say: Titanium rocks!\n[INFO] [5,3968] Service code pauses, iteration 2\n[INFO] [2,5917] Service code resumes, iteration 3\n[INFO] [27,5961] Hello World! I am a Service. I have this to say: Titanium rocks!\n[INFO] [16,5980] Service code pauses, iteration 3\n[INFO] [1,5981] Service code has run 3 times, will now stop it.\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "foregroundCancel", - "summary": "Puts the service into the \"background\" state and removes its foreground notification.", - "description": "If you call the [foregroundNotify()](Titanium.Android.Service.foregroundNotify) method to\nput the service into the \"foreground\" state, then you call this method to put the service\nback into the \"background\" state. This will also automatically remove the foreground service's\nnotification that was put into the status bar.\n\nNote that stopping a foreground service will remove its foreground notification from\nthe status bar as well. So, you do not have to call this method to remove it. This method\nis only intended to be used by services that need to dynamically change states.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "foregroundNotify", - "summary": "Puts the service into the \"foreground\" state and displays a notification.", - "description": "Calling this method will change the service from the \"background\" state (the default)\nto the \"foreground\" state. It will also post a notification to the status bar to notify the\nend-user that the app is doing work, even while backgrounded. This feature is typically\nused by apps that play music, monitor current location, or perform large downloads while\nthe app is in the background.\n\nNote that a foreground service is far less likely to be terminated by the operating system\nwhile the app is in the background. A foreground service is also needed if the app\nneeds to acquire location data since Android 8.0 and higher throttles location acquisition\nwhile the app is in the background.\n\nSee Android 8.0 \"Background Execution Limits\":\n\n * https://developer.android.com/about/versions/oreo/background\n\nYou can call this method before or after the service has been started. If you need to\nchange the displayed notification, then you can call this method again with the same\nnotification ID and with an updated [notification] object.\n\nThe notification will be automatically removed from the status bar when the service has\nbeen stopped or if you call the [foregroundCancel()](Titanium.Android.Service.foregroundCancel)\nmethod.\n\nThis method will fail on Android 9.0 and above unless you set the following Android manifest\npermission in your \"tiapp.xml\" file.\n\n``` xml\n\n \n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Unique integer ID to be assigned to the notification. Cannot be zero.", - "type": "Number" - }, - { - "name": "notification", - "summary": "Notification to display in the status bar. Cannot be null.", - "type": "Titanium.Android.Notification" - }, - { - "name": "foregroundServiceType", - "summary": "Notification service type specified by .", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "start", - "summary": "Starts the Service.", - "description": "Effective only if this instance of was created\nwith .\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops this running instance of the Service.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "intent", - "summary": "The intent used to start or bind to the Service.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.Intent", - "permission": "read-only" - }, - { - "name": "serviceInstanceId", - "summary": "A service can be started more than once -- this number (based on an incrementing integer)\nindicates which \"start number\" in the sequence the current service instance is.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.App.Android": { - "name": "Titanium.App.Android", - "summary": "A module used to access Android application resources.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/Android/Android.yml", - "description": "For more information, refer to the official documentation on the Android Developer website about \n[application resources](https://developer.android.com/guide/topics/resources/index.html).\n", - "events": [ - { - "name": "shortcutitemclick", - "summary": "Fired when a is clicked.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "properties": [ - { - "name": "id", - "summary": "Identifier of the clicked shortcut item.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Custom String Resource", - "code": "\nCustom Android resources may be placed in `platform/android` in the project root. \nFor example, to utilize a custom localization file, create and populate \n`platform/android/res/values/mystrings.xml` with the following data.\n\n``` xml\n\n\n testing 1 2 3\n\n```\n\nIn Javascript, this can be accessed as follows.\n\n``` js\nvar activity = Ti.Android.currentActivity;\nvar R = Ti.App.Android.R;\n\nvar mystring = activity.getString(R.string.mystring);\nTi.API.debug(\"mystring = \" + mystring);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearUserCache", - "summary": "Clears app data and cache. This will close the app.", - "platforms": [ - { - "since": "13.1.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "R", - "summary": "The `R` namespace for application resources.", - "description": "The properties and sub-properties of this object relate directly to the\nnative application resources `R` class, and thus have the same syntax.\nFor more information, refer to the official documentation on the\nAndroid Developer website about\n[accessing application resources](https://developer.android.com/guide/topics/resources/accessing-resources.html).\n\nFor example, if the file `platform/android/res/drawable/icon.png`\nexists in the project, it can be accessed using its resource name,\nas follows.\n\n``` js\nvar resid = Titanium.App.Android.R.drawable.icon;\n```\n\nTo access system-wide resources, rather than application resources, use\n instead.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "type": "Titanium.Android.R", - "permission": "read-only" - }, - { - "name": "appVersionCode", - "summary": "The version number of the application. \n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "appVersionName", - "summary": "The version name of the application. \n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "launchIntent", - "summary": "Return the intent that was used to launch the application.\n", - "description": "This intent will not change for the lifetime of the application. Its [action](Titanium.Android.Intent.action)\nis typically set to \"android.intent.action.MAIN\" when launched via the app list screen.\n\nThis launch intent can be used to resume the app while backgrounded via the\n[startActivity()](Titanium.Android.Activity.startActivity) method or via a notification.\n\nWhen the app is launched via a data intent such as a URL, shortcut, notification, etc. then that intent\nis provided by the [Ti.Android.rootActivity](Titanium.Android.rootActivity) object's\n[intent](Titanium.Android.Activity.intent) property instead. That intent will initially be set to the\nlaunch intent, but will change when a [\"newintent\"](Titanium.Android.Activity.newintent) event has been fired.\nYou should always read the root activity's intent instead of the launch intent for data.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "Titanium.Android.Intent", - "permission": "read-only" - } - ] - }, - "Titanium.App": { - "name": "Titanium.App", - "summary": "The top-level App module is mainly used for accessing information about the\napplication at runtime, and for sending or listening for system events.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/App.yml", - "description": "The `App` module exposes a number of properties set in the `tiapp.xml` file.\n\nThree of these properties, the application name, ID, and URL, must be specified when the\napplication is created.\n\nWhile most values may be changed by editing the `tiapp.xml` file after creating the project,\nthe GUID is automatically generated and should not be changed.\n\nTo access other application properties set in the `tiapp.xml` file not exposed by the\n`Titanium.App` module, see .\n\n#### iOS Application Life Cycle\n\nAt any given moment, you applications can be in one of the following possible states:\n\n* Not running: The app has not been launched or was running but was terminated by the system.\n\n* Inactive: The app is running in the foreground but is currently not receiving events.\nAn app usually stays in this state only briefly as it transitions to a different state.\nThe `pause` event is fired during this state.\n\n* Active: The app is running in the foreground and is receiving events. This is the normal\nmode for foreground apps.\n\n* Background: The app is in the background and executing code. Most apps enter this state\nbriefly on their way to being suspended.\n\n* Suspended: The app is in the background but is not executing code. The system moves\napps to this state automatically and does not notify them before doing so. While suspended,\nan app remains in memory but does not execute any code. The `paused` event is fired\nduring this state. The system tries to keep as many apps in memory at the same time as it\ncan, but when memory runs low it terminates suspended apps to reclaim that memory. Apps\nthat consume large amounts of memory while in the background are the first apps to be terminated.\n\n**Responding To Interruptions**\n\n***System Alerts***\n\nWhen an **alert-based** interruption occurs, such as an incoming phone call, the app moves\ntemporarily to the inactive state, and fires the `pause` event. The system then displays\nan alert to the user. The app remains in this state until the user dismisses the alert.\nAt this point, the app either returns to the active state and fires the `resumed` event;\nor moves to the background state and fires the `paused` event.\n\nAlert-based interruptions result in temporary loss of control by your app and results in `pause`\nevent being fired. Your app continues to run in the foreground, but it does not receive\ntouch events from the system. (It does continue to receive notifications and other types\nof events, such as accelerometer events.) When your app is moved back to the\nactive state, the `resumed` event is fired.\n\nThe same set of events takes place when user **double taps on the home button**.\n\n***Sleep/Wake Button***\n\nPressing the **Sleep/Wake** button is another type of interruption that causes your app to\nmove to an inactive state. When the app is in the foreground and the **Sleep/Wake button**\nis pressed, the the system fires the `pause` event followed by the `paused` event and\nbecomes inactive. This is an intentionally behavioral change by Apple to conserve battery when\nthe Sleep/Wake button is pressed. On waking up the app fires the `resume` event followed by the\n`resumed` event and returns the app to normal state.\n\n***Home Button***\n\nPressing the **home button** is another kind of interruption. The app fires `pause` and\n`paused`events before going into background. When app is reopened it fires the `resume`\nevent followed by the `resumed` event, returning the app to the normal state.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Lifecycle events fired during different interruptions
Type of InterruptionGoing into BackgroundComing into Foreground
Alert-Based/Fast App Switchingpause resumed
Sleep/Wake Buttonpausepausedresumeresumed
Home Button (backgrounding)pausepausedresumeresumed
\n\n***Blur and Focus Events***\n\nWhen using the iOS pause/resume feature, the `blur` and `focus` events do not fire\nbefore the application enters the background or after it returns to the foreground,\nrespectively. Instead, the application needs to monitor the `pause` and `resumed` events,\nwhich relies on the underlying iOS events to determine the application state rather than the\nUI events.\n\n#### Application Level Events\n\nApplication-level events are custom events that are defined globally for your\napplication. By convention, application-level events are set on the `Titanium.App`\nmodule, like this:\n\n``` js\nTi.App.addEventListener('app:myCustomEvent', myHandlerFunction);\n```\n\nAdding a prefix (like 'app:' in this example) is optional, but can help ensure that\nyour custom event names don't conflict with any future Titanium events.\n\nApplication-level event listeners can be added and fired from any context, including from inside\na web view, so they are ideal for communicating between separate parts of your\napplication.\n\nWhen you add an event listener on a Titanium module (such as `Ti.App` or\n[Ti.Geolocation](Titanium.Geolocation)), the event listener function is referenced from\nthe global context. This means the event listener function and any object it references\ncan't be garbage collected until the event listener is removed.\n\nThis can lead to memory leaks if application-level event listeners are added and not\nremoved.\n\nSee also: [Event Handling](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Fundamentals/Event_Handling.html)\nin the Titanium Mobile Guides.\n\n#### System Level Accessibility Events\n\nSystem-level Accessibility events include:\n\n* Events your application fires to alert the device's accessibility system of some condition\nor to ask it to do something.\n* Events fired by the device's accessibility system and listened for in your application.\n\nCurrently there are four system-level accessibility events. Three of them are available for\nyour application to fire, and one of them is for your application to listen for.\n\n##### Firing Accessibility Events.\n\nThe following accessibility events can be fired by your application to alert the accessibility\nsystem of a particular condition or to ask it to perform an action.\n\nThese events are fired using , which is available in Titanium Mobile 3.0.0.\n\n* , available in iOS and Android, asks the device's\naccessibility system to make an announcement. The announcement itself is a string passed as the second\nargument to . *How* the device's accessibility actually makes that announcement\ndepends on what accessibility services are activated on the device. The most common are VoiceOver on\niOS and TalkBack on Android. Each of those would read the announcement aloud.\n\n``` js\nTi.App.fireSystemEvent(Ti.App.EVENT_ACCESSIBILITY_ANNOUNCEMENT, \"Welcome to my App\");\n```\n\n* , available only on iOS, can be used to alert\nthe accessibility system that the layout of the screen has changed, such as when an element\nappears or disappears. When your application fires this event, Titanium calls `UIAccessibilityLayoutChangedNotification`\nin the iOS [UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nNo second parameter is required when firing this event with .\n\n* , available only on iOS, can be used to alert\nthe accessibility system when a new view appears that comprises a major portion of the screen.\nWhen your application fires this event, Titanium calls `UIAccessibilityScreenChangedNotification`\nin the iOS [UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nNo second parameter is required when firing this event with .\n\n##### Listening for Accessibility Events\n\nCurrently there is only one system accessibility event which your application can listen for using\n, namely . This event, available on iOS and on Android\n(for devices running Ice Cream Sandwich or greater), is fired when the device's accessibility service is turned\non or off. The object passed as a parameter to the listener function contains an `enabled` property which is\n`true` if the accessibility service is now turned on, or `false` otherwise.\n", - "events": [ - { - "name": "accessibilitychanged", - "summary": "Fired by the system when the device's accessibility service is turned on or off.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "enabled", - "summary": "Whether accessibility is now enabled or disabled.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "close", - "summary": "Fired by the system when the application is about to be terminated.", - "description": "It is the last event that can be received before the application gets closed.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "memorywarning", - "summary": "Fired when the app receives a warning from the operating system about low memory availability.", - "platforms": [ - { - "since": "3.2.3", - "name": "iphone" - }, - { - "since": "3.2.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "pause", - "summary": "Fired when the application transitions from active to inactive state on a multitasked system.", - "description": "This event fires when the user leaves the application or for certain types of temporary interruptions\nsuch as a notification or incoming phone call. On an iPad application with split view enabled,\nthe event will be called once the application is put in the background and a different split view\napplication is focused.\n\nSee the `applicationWillResignActive` section of the official Apple documentation about\n[Monitoring Application State Changes](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622950-applicationwillresignactive)\nfor the exact behavior that triggers this event.\n\nNote that calls to functions that modify the UI during this event may be partially executed,\n**up to** the UI call before the suspension. See [paused](Titanium.App.paused) event. If this happens, the remainder of the code will\nbe executed after the application is resumed, but before the `resume` event is triggered.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "paused", - "summary": "Fired when the application transitions to the background on a multitasked system.", - "description": "This event fires when putting the application in the background using the home button\nor when using the sleep/wake or power button.\n\nThis event fires when the user leaves the application.\n\nSee the `applicationDidEnterBackground` section of the official Apple documentation about\n[Monitoring Application State Changes](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622997-applicationdidenterbackground?language=objc)\nfor the exact behavior that triggers this event.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "proximity", - "summary": "Fired when the proximity sensor changes state.", - "description": "The proximity sensor detects whether the device is being held up to the user's ear,\nand shuts down the display.\n\nProximity events are only fired when [proximityDetection](Titanium.App.proximityDetection)\nis `true`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - } - ], - "properties": [ - { - "name": "state", - "summary": "Proximity state value.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "screenshotcaptured", - "summary": "Fired after the user takes a screenshot, e.g. by pressing both the home and lock screen buttons.", - "description": "Android is only available on devices with Android 14+ and you'll have to add the following permission\nto your tiapp.xml: ``\n", - "platforms": [ - { - "since": "13.1.0", - "name": "android" - }, - { - "since": "13.1.0", - "name": "iphone" - }, - { - "since": "13.1.0", - "name": "ipad" - }, - { - "since": "13.1.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "source", - "summary": "The current window the screenshot was taken from.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "uncaughtException", - "summary": "Fired when an uncaught JavaScript exception occurs.", - "description": "This event will occur in both production and development builds, allowing you to warn the\nuser that an error has occurred, and log more information to help you fix any bugs.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "android" - }, - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "message", - "summary": "The error message.", - "type": "String" - }, - { - "name": "line", - "summary": "The line where the error occurred.", - "type": "Number" - }, - { - "name": "sourceId", - "summary": "A unique identification for the source file.", - "type": "Number" - }, - { - "name": "type", - "summary": "The type of error.", - "type": "String" - }, - { - "name": "sourceURL", - "summary": "The URL to the source file.", - "type": "String" - }, - { - "name": "title", - "summary": "The title for the error.", - "type": "String" - }, - { - "name": "sourceName", - "summary": "The name of the source file.", - "type": "String" - }, - { - "name": "lineSource", - "summary": "The line source reference.", - "type": "String" - }, - { - "name": "lineOffset", - "deprecated": { - "notes": "Use `column` property for cross-platform parity.", - "since": "9.0.0" - }, - "summary": "The offset on the line where the error occurred. (Deprecated since 9.0.0. Use `column` instead.)", - "type": "Number" - }, - { - "name": "javascriptStack", - "deprecated": { - "notes": "Use `stack` property for cross-platform parity.", - "since": "9.0.0" - }, - "summary": "The JavaScript stack trace of the exception. (Deprecated since 9.0.0. Use `stack` instead.)", - "type": "String" - }, - { - "name": "javaStack", - "deprecated": { - "notes": "Use `nativeStack` property for cross-platform parity.", - "since": "9.0.0" - }, - "summary": "The Java stack trace of the exception. (Deprecated since 9.0.0. Use `nativeStack` instead.)", - "type": "String" - }, - { - "name": "stack", - "summary": "The JavaScript stack trace of the exception.", - "type": "String" - }, - { - "name": "nativeStack", - "summary": "The native platform stack trace of the exception.", - "type": "String" - }, - { - "name": "column", - "summary": "The column offset on the line where the error occurred.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "resume", - "summary": "Fired when the application returns to the foreground on a multitasked system.", - "description": "This event fires when putting the application in the background\nusing the home button and when using the sleep/wake or power button.\n\nNote that this event does not fire for pauses resulting from notifications or incoming phone\ncalls.\n\nSee the `applicationWillEnterForeground` section of the official Apple documentation about\n[Monitoring Application State Changes](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623076-applicationwillenterforeground)\nfor the exact behavior that triggers this event.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "resumed", - "summary": "Fired when the application returns to the foreground.", - "description": "This event fires when the application enters the foreground with the `resume` event or\nreturns to focus after a notification or incoming phone call. On an iPad with split view enabled,\nthis event will be called every time the application resized.\n\nSee the `applicationDidBecomeActive` section of the official Apple documentation about\n[Monitoring Application State Changes](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622956-applicationdidbecomeactive)\nfor the exact behavior that triggers this event.\n\nNote: This event will not be fired for URL's in iOS 10+ that are handled by the \nor , because Apple does not call the `applicationDidBecomeActive` for\nURL-handling anymore. Instead, use the `handleurl` event in .\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "started", - "summary": "Fired after the \"app.js\" or \"alloy.js\" gets executed during application startup.", - "description": "The intention of this event is for modules to defer firing their own startup related events\nuntil the app developer's main script has had a chance to add listeners for them.\n", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - }, - { - "since": "8.0.0", - "name": "iphone" - }, - { - "since": "8.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "keyboardframechanged", - "summary": "Fired when the soft keyboard is presented, on and off the screen.", - "description": "This event fires when the application presents the soft keyboard on/off the screen . The\nevent on iOS returns the dictionary `keyboardFrame` containing `x`, `y`, `height` and `width` keys,\ncorresponding to the frame of the keyboard with respect to the screen coordinates.\n\nOn Titanium SDK 4.0.0 and later the event also contains a second parameter `animationDuration` representing\nthe duration of the animation for the presentation and dismissal of the soft keyboard.\n\nNote that the keyboard `height` and `width` properties will not be accurate when the keyboard\nis being dismissed.\n\nFor Android it will only work using Android 11 and up. The return values are empty but you can use\n`keyboardVisible` to check if the keyboard is visible or not.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "keyboardFrame", - "summary": "A dictionary with keys x, y, width and height representing the frame of keyboard on screen.", - "type": "Dimension" - }, - { - "name": "animationDuration", - "summary": "The duration of the keyboard animation. This parameter is only available on Titanium SDK 4.0.0 and later.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "significanttimechange", - "summary": "Fired when there is a significant change in the time.", - "description": "Examples of significant time changes include the arrival of midnight, an update to the time by a carrier,\nand the change to daylight savings time. If your application is currently in `paused` state, this message\nwill be is queued until your application returns to the foreground, at which point it is delivered. If multiple\nchanges occur, only the most recent one is delivered.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "shortcutitemclick", - "summary": "Fired when a is clicked.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "id", - "summary": "Identifier of the clicked shortcut item.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "userinteraction", - "summary": "Called whenever an interaction with the window occurred. To be used together with the property.", - "description": "Implement this method if you wish to know that the user has interacted with the device in some\nway while your app is running.\n\nNote that this callback will be invoked for the touch down action that begins a touch gesture,\nbut may not be invoked for the touch-moved and touch-up actions that follow.\n\nSee also:\n - Android: See the [onUserInteraction](https://developer.android.com/reference/android/app/Activity.html#onUserInteraction()) callback\n - iOS: See the [sendEvent](https://developer.apple.com/documentation/uikit/uiapplication/1623043-sendevent) delegate\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireSystemEvent", - "summary": "Fire a system-level event such as .", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "eventName", - "summary": "The name of the event to fire.", - "type": "String" - }, - { - "name": "param", - "summary": "A parameter to be passed to the system event.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getArguments", - "deprecated": { - "notes": "Use the property instead", - "since": "10.0.0" - }, - "summary": "Returns the arguments passed to the application on startup.", - "description": "On Android, fetch the [Ti.Android.rootActivity](Titanium.Android.rootActivity) object and\nread its [intent](Titanium.Android.Activity.intent) property to retrieve the parameters used\nto launch the application activity. Note that this [intent](Titanium.Android.Activity.intent)\nwill change when a \"[newintent](Titanium.Android.Activity.newintent)\" event has been fired.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "launchOptions" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "EVENT_ACCESSIBILITY_ANNOUNCEMENT", - "summary": "Convenience constant for system event \"accessibilityannouncement\".", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EVENT_ACCESSIBILITY_CHANGED", - "summary": "Convenience constant for system event \"accessibilitychanged\".", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "accessibilityEnabled", - "summary": "Indicates whether Accessibility is enabled by the system.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "copyright", - "summary": "Application copyright statement, determined by `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "currentService", - "summary": "A reference to the current background service running when the application is placed in the background.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.App.iOS.BackgroundService", - "permission": "read-only" - }, - { - "name": "deployType", - "summary": "Build type that reflects how the application was packaged.\n\nReturns one of the following values:\n* `development` (Simulator)\n* `test` (Device)\n* `production` (App Store / Adhoc)\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "description", - "summary": "Application description, determined by `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "guid", - "summary": "Application globally-unique ID, determined by `tiapp.xml`.", - "description": "This value is system-generated and consistent through all versions.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "forceSplashAsSnapshot", - "summary": "Shows the application's splash screen on app resume.", - "description": "Note: This only works on device.\nWhen the app goes to the background a screenshot of the current app state is taken. When\nthe app resumes that screenshot is shown for brief moment. To disable this behavior, set\nthis property to `true` and the default splash screen will show on app resume instead.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "id", - "summary": "Application ID, from `tiapp.xml`.", - "description": "The application ID is a required property that must be specified when creating a new project.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "installId", - "summary": "The install ID for this application.", - "description": "The application install ID is a unique identifier (UUID) for this\ninstall of the application. It is not modified by application updates;\nonly when an application is initially installed, or removed and\nre-installed.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "idleTimerDisabled", - "summary": "Determines whether the screen is locked when the device is idle.", - "description": "Set to `true` to disable the timer. For Android look at [Titanium.UI.View.keepScreenOn](Titanium.UI.View.keepScreenOn).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "name", - "summary": "Application name, determined by `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "proximityDetection", - "summary": "Determines whether proximity detection is enabled.", - "description": "Set to `true` to receive events.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "proximityState", - "summary": "Indicates the state of the device's proximity sensor, according to the\n event.\n", - "description": "This property is `true` when the proximity sensor is close to the user.\n\nWhen is disabled, the value of this property is undefined.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "disableNetworkActivityIndicator", - "summary": "Prevents network activity indicator from being displayed.\n", - "description": "Setting this property to true disables display of the network activity indicator when network activity is in progress.\nIf the network activity indicator is currently visible, it is hidden immediately.\n\n**NOTE: In general, the user should always be made aware of network activity. The network activity indicator should only be disabled for very brief network activity (a few seconds).**\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "publisher", - "summary": "Application publisher, from `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "sessionId", - "summary": "Unique session identifier for the current continuous run of the application.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "url", - "summary": "Application URL, from `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "version", - "summary": "Application version, from `tiapp.xml`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "keyboardVisible", - "summary": "Indicates whether or not the soft keyboard is visible.", - "description": "On Android it will only work using Android 11 and up. Otherwise it will always be false.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "trackUserInteraction", - "summary": "Indicates whether or not the user interaction should be tracked.", - "description": "Use the event to get notified about user interaction.\nFor Android, user-interactions are controlled by the event and do not require this\nproperty to be set explicitly. For iOS, this is done to prevent additional overhead.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "arguments", - "summary": "The arguments passed to the application on startup.", - "description": "On Android, fetch the [Ti.Android.rootActivity](Titanium.Android.rootActivity) object and\nread its [intent](Titanium.Android.Activity.intent) property to retrieve the parameters used\nto launch the application activity. Note that this [intent](Titanium.Android.Activity.intent)\nwill change when a \"[newintent](Titanium.Android.Activity.newintent)\" event has been fired.\n", - "platforms": [ - { - "since": "10.0.1", - "name": "iphone" - }, - { - "since": "10.0.1", - "name": "ipad" - }, - { - "since": "10.0.1", - "name": "macos" - } - ], - "type": "launchOptions" - } - ] - }, - "launchOptions": { - "name": "launchOptions", - "summary": "Dictionary describing the arguments passed to the application on startup.\nUse the [getArguments](Titanium.App.getArguments) method to retrieve the launch options.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/App.yml", - "properties": [ - { - "name": "url", - "summary": "This key indicates that the application was launched in order to open\nthe specified URL.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "source", - "summary": "This key indicates that the application was launched by another\napplication with the specified bundle ID.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "launchOptionsLocationKey", - "summary": "If set to `true`, this key indicates that the application was launched in response to an\nincoming location event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - } - ] - }, - "Titanium.App.Properties": { - "name": "Titanium.App.Properties", - "summary": "The App Properties module is used for storing application-related data in property/value pairs \nthat persist beyond application sessions and device power cycles.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/Properties/Properties.yml", - "description": "#### App Properties in the tiapp.xml file\n\nApp properties defined in the `tiapp.xml` file may be accessed using these APIs. An app\nproperty is defined inside the root-level `` element with the `` element.\nUse the `name` attribute to define your property name and place the value inline with the\n`` element. For example, to define an app property called `foo` with the value `42`:\n\n``` xml\n\n\n 42\n\n```\n\nThen, you can retrieve the property during runtime with the following API call:\n\n``` js\nconst foo = Ti.App.Properties.getString('foo');\n```\n\nAny application properties defined in the `tiapp.xml` file are stored in the\ndevice's secure storage, making them read-only. Additionally, external access to these\nproperties is now restricted. Other iOS applications cannot access these properties and\nnative Android modules must use the Titanium module API TiApplication.getAppProperties()\nmethod to access these properties.\n\nIf you need to change the values during runtime, initially create the property with these APIs\nrather than defining them in the `tiapp.xml` file.\n\n**Important**: Using this API in the Apple ecosystem requires the `NSPrivacyAccessedAPICategoryUserDefaults`\nproperty set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "events": [ - { - "name": "change", - "summary": "Fired when a property is changed.", - "description": "On iOS, the event is fired when the user re-enters the application after \nmaking a change using the Settings application.\n\nThe event is also fired when the application changes a property directly using one of the \n`Ti.App.iOS.UserDefaults` or `Ti.App.Properties` methods.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "Store a property", - "code": "Store a string property.\n\n``` js\nTi.App.Properties.setString('givenName', 'Paul');\nTi.API.info('The value of the givenName property is: ' + Ti.App.Properties.getString('givenName'));\n```\n" - }, - { - "description": "Enumerate over saved properties", - "code": "Output all saved properties to the console.\n\n``` js\nvar props = Ti.App.Properties.listProperties();\n\nfor (var i = 0, ilen = props.length; i < ilen; i++){\n var value = Ti.App.Properties.getString(props[i]);\n Ti.API.info(props[i] + ' = ' + value);\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getBool", - "summary": "Returns the value of a property as a boolean data type.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "getDouble", - "summary": "Returns the value of a property as a double (double-precision, floating point) data type.", - "description": "This method must only be used to retrieve properties created with \n[setDouble](Titanium.App.Properties.setDouble). \n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getInt", - "summary": "Returns the value of a property as an integer data type.\n", - "description": "This method must only be used to retrieve properties created with \n[setInt](Titanium.App.Properties.setInt). \n\nUse [getDouble](Titanium.App.Properties.getDouble) and [setDouble](Titanium.App.Properties.setDouble) \nto store values outside the integer data type range of `-2,147,483,648` to `2,147,483,647`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getList", - "summary": "Returns the value of a property as an array data type.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Array", - "optional": true - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getObject", - "summary": "Returns the value of a property as an object.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Object", - "optional": true - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "getString", - "summary": "Returns the value of a property as a string data type.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "hasProperty", - "summary": "Indicates whether a property exists.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "listProperties", - "summary": "Returns an array of property names.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "removeProperty", - "summary": "Removes a property if it exists, or does nothing otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllProperties", - "summary": "Removes all properties that have been set by the user on runtime, or does nothing otherwise.", - "platforms": [ - { - "since": "6.0.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setBool", - "summary": "Sets the value of a property as a boolean data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setDouble", - "summary": "Sets the value of a property as a double (double-precision, floating point) data type. The \nproperty will be created if it does not exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setInt", - "summary": "Sets the value of a property as an integer data type. The property will be created if it \ndoes not exist.\n", - "description": "Use [getDouble](Titanium.App.Properties.getDouble) and [setDouble](Titanium.App.Properties.setDouble) \nto store values outside the integer data type range of `-2,147,483,648` to `2,147,483,647`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value, within the range `-2,147,483,648` to `2,147,483,647`.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setList", - "summary": "Sets the value of a property as an array data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setObject", - "summary": "Sets the value of a property as an object data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Object" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setString", - "summary": "Sets the value of a property as a string data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ] - }, - "Titanium.App.iOS.ActivityAttributes": { - "name": "Titanium.App.iOS.ActivityAttributes", - "summary": "Use this module to communicate with the native iOS 16+ Dynamic Island APIs.\n", - "extends": "Object", - "platforms": [ - { - "since": "12.0.0", - "name": "iphone" - }, - { - "since": "12.0.0", - "name": "ipad" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/ActivityAttributes.yml", - "description": "To properly use these APIs, you need to have your Widget Extension ready.\nYou can follow this [sample repository](https://github.com/hansemannn/titanium-widget-kit-sample-app) for an extended example.\n", - "examples": [ - { - "description": "Start a new activity", - "code": "``` js\nconst attributes = Ti.App.iOS.createActivityAttributes();\nattributes.startActivity({\n param1: \"Hello\",\n param2: \"World\",\n data: JSON.stringify({ intKey: 1, boolKey: true })\n});\n```\n" - } - ], - "methods": [ - { - "name": "startActivity", - "summary": "Starts a new activity (aka the Dynamic Island) with the provided parameters", - "platforms": [ - { - "since": "12.0.0", - "name": "iphone" - }, - { - "since": "12.0.0", - "name": "ipad" - } - ], - "parameters": [ - { - "name": "value", - "summary": "The values to pass to your extension. For maximum flexibility, this parameter should be passed\nas a String-based Object, e.g.\n```\n{\n \"param1\": \"Hello\",\n \"param2\": \"World\"\n}\nIf you need to pass other types, please serialize them to a valid JSON object and pass it's\nstringified representation to this method.\n", - "type": "Object" - } - ], - "returns": { - "type": "void" - } - } - ] - }, - "Titanium.App.iOS.BackgroundService": { - "name": "Titanium.App.iOS.BackgroundService", - "summary": "A service that runs when the application is placed in the background.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/BackgroundService.yml", - "description": "A background service is created by . \n\nAt creation, a local URL to a JavaScript file must be defined. The code it contains is executed \neach time the application is no longer in the foreground, along with all other services that have \nbeen registered in the same way. When this happens, all background services continue to run until \none of the following occurs:\n\n* A service is stopped with the `stop` method.\n* The application resumes, at which points all background services are stopped.\n* The OS terminates the service for one of the reasons discussed in \n\"Background Service Limitations\", below.\n\nA background service can invoke a , which prompts users via \na dialog to return to the application and provides a button that brings it back into the \nforeground.\n\n#### Background Service Limitations\n\nA background service is subject to limitations imposed by the operating system, such as\n\n* The OS limits the total amount of time a background service can run for after the application \nis paused, typically to no more than 10 minutes.\n* The OS may terminate the background service at any point to reclaim resources.\n", - "examples": [ - { - "description": "Background Services Example", - "code": "Two background services are registered in the following application.\n\nThe first service logs a message every time the application is paused and then is stopped to \nrelease the service from memory. The service is not unregistered, and so will continue to be \ninvoked.\n\nThe second creates an application property where it stores a run count value. For the first 4 \ntimes the application is paused, a local notification is invoked that gives the user the \nopportunity to bring the application back to the foreground. Once the run count reaches 5, \nthe service is unregistered and is not invoked again until the application is relaunched.\n\n#### app.js\n``` js\nvar win1 = Ti.UI.createWindow({ \n title:'Background Services Example',\n backgroundColor:'#4186cd',\n modal:true\n});\n\nTi.API.info('Registering background services');\nvar service = Ti.App.iOS.registerBackgroundService({url:'bg-service1.js'});\nvar service2 = Ti.App.iOS.registerBackgroundService({url:'bg-service2.js'});\nTi.API.info('*** Press home button to pause application ***');\n\nwin1.open();\n```\n \n#### bg-service1.js\n``` js\nTi.API.info('bg-service1: service has been invoked once, and will now be stopped to release it from memory. ');\nTi.App.currentService.stop();\n\nvar listener = Ti.App.currentService.addEventListener('stop',function(){\n Ti.API.info('bg-service1: Although the service has been stopped, it is still registered and will be executed again on next pause');\n Ti.API.info('bg-service1: As all background services are automatically stopped on resume, it is not always necessary to explicitly stop a service');\n});\n```\n\n#### bg-service2.js\n``` js\nvar count = Ti.App.Properties.getInt('bg-svc2-count', 0);\n\nif (count > 4){\n // reset count after 4 invocations\n count = 0;\n}\n\ncount++;\n\nTi.App.Properties.setInt('bg-svc2-count', count);\n\nTi.API.info('bg-service2 has been run ' + count + ' times');\n\nif (count > 4){\n Ti.App.currentService.unregister();\n var finalNotif = Ti.App.iOS.scheduleLocalNotification({\n alertBody:'bg-service2: As service has been invoked more than 4 times, it has been unregistered and will NOT run again. Relaunch the app to re-register it',\n date:new Date(new Date().getTime() + 1000) // 1 second after unregister\n });\t\n} else {\n var curNotif = Ti.App.iOS.scheduleLocalNotification({\n alertBody:'bg-service2: has been invoked ' + count + ' times. It is still registered and will run again when the app is transitioned to the background',\n date:new Date(new Date().getTime() + 1000) // 1 second after pause\n });\t\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops the service from running during the current background session to conserve resources.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unregister", - "summary": "Unregisters the background service.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "url", - "summary": "A local URL to a JavaScript file containing the code to run in the background.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation", - "default": "none" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.LocalNotification": { - "name": "Titanium.App.iOS.LocalNotification", - "summary": "A local notification to alert the user of new or pending application information.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/LocalNotification.yml", - "description": "A LocalNotification is created by . \n\nLocal notifications are a way for an application that is not running in the foreground to let\nusers know that it has information for them. When invoked, the application either displays a\nbanner message or an alert dialog with a **Close** button to dismiss and an **Open** button to bring the application\ninto the foreground. The application can also modify the icon badge, to show the\nnumber of pending notifications, and generate a sound.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cancel", - "deprecated": { - "notes": "Use [Titanium.App.iOS.UserNotificationCenter.removePendingNotifications](Titanium.App.iOS.UserNotificationCenter.removePendingNotifications) instead.", - "since": "7.3.0" - }, - "summary": "Cancels the pending notification.", - "platforms": [ - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.SearchQuery": { - "name": "Titanium.App.iOS.SearchQuery", - "summary": "A search query object manages the criteria to apply when searching app content that you have previously \nindexed by using the Core Spotlight APIs.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchQuery.yml", - "description": "You can use this API to search multiple objects at the same time. You can do that \nby using the `queryString` parameter that has a special syntax to filter and index several items. Please refer \nto the official [Apple documentation](https://developer.apple.com/reference/corespotlight/cssearchquery) for detailed information on how to structure your search-query to get the \nbest possible results.\n\nTo use this feature make sure you have a compatible device running iOS 10 or later.\n\nTo create a SearchableItem object, use the Titanium.App.iOS.createSearchableItem method.\nPass a dictionary of properties to the method that will help identify the item.\nAt minimum, you must set the [attributeSet](Titanium.App.iOS.SearchableItem.attributeSet) property, which associates\nthe metadata with the SearchableItem object.\n", - "events": [ - { - "name": "founditems", - "summary": "Fired when the query finds a new batch of matching items.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "items", - "summary": "An array of indexed items that match the specified query.", - "type": "Array" - }, - { - "name": "foundItemsCount", - "summary": "The number of items that are currently fetched.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "completed", - "summary": "Fired when the query completes to inform you about it's success. \nTo receive items, use the `founditems` event.\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns true if download succeeded, false otherwise.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. Undefined otherwise.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Perform a simple search-query for all items that start with \"Searchable\" in it.", - "code": "The following example demonstrates how to search a Ti.App.iOS.SearchableItem using the iOS 10\nTi.App.iOS.SearchQuery API.\n\n#### app.js\n``` js\nvar win = Ti.UI.createWindow({\n backgroundColor: \"#fff\"\n});\nvar btn = Ti.UI.createButton({\n title: \"Start search-query\"\n});\n\nvar searchItems = [];\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\n title: \"Titanium Core Spotlight Tutorial\"\n});\n\nitemAttr.contentDescription = \"Tech Example \\nOn: \" + String.formatDate(new Date(), \"short\");\nitemAttr.keywords = [\"Mobile\", \"Appcelerator\", \"Titanium\"];\nitemAttr.displayName = \"Hello world\";\n\nvar item = Ti.App.iOS.createSearchableItem({\n uniqueIdentifier: \"my-id\",\n domainIdentifier: \"com.mydomain\",\n attributeSet: itemAttr\n});\nsearchItems.push(item);\n\nvar indexer = Ti.App.iOS.createSearchableIndex();\n\nindexer.addToDefaultSearchableIndex(searchItems, function(e) {\n if (e.success) {\n Ti.API.info(\"Press the home button and now search for your keywords\");\n } else {\n alert(\"Searchable index could not be created: \" + JSON.stringify(e.error));\n }\n});\n\nbtn.addEventListener(\"click\", function() {\n // An array of found Ti.App.iOS.SearchableItem's\n var allItems = [];\n\n // The search-query\n var searchQuery = Ti.App.iOS.createSearchQuery({\n queryString: 'title == \"Titanium*\"',\n attributes: [\"title\", \"displayName\", \"keywords\", \"contentType\"]\n });\n\n // The event to be called when a new batch of items is found\n searchQuery.addEventListener(\"founditems\", function(e) {\n for (var i = 0; i < e.items.length; i++) {\n allItems.push(e.items[i]);\n }\n });\n\n // The event to be called when the search-query completes\n searchQuery.addEventListener(\"completed\", function(e) {\n if (!e.success) {\n alert(e.error);\n }\n\n for (var i = 0; i < allItems.length; i++) {\n var attributeSet = allItems[i].attributeSet\n var foundTitle = attributeSet.title\n var foundDisplayName = attributeSet.displayName\n\n Ti.API.info(\"title: \" + foundTitle + \", displayName: \" + foundDisplayName);\n }\n });\n\n // Start the search-query (or use searchQuery.cancel()) to abort it\n searchQuery.start();\n});\n\nwin.add(btn);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "start", - "summary": "Asynchronously queries the index for items that match the query object's specifications.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cancel", - "summary": "Cancels a query operation.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isCancelled", - "summary": "A Boolean value that indicates if the query has been cancelled (`true`) or not (`false`).", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns `true` if the query was cancelled.", - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "queryString", - "summary": "A formatted string that defines the matching criteria to apply to indexed items.", - "description": "This parameter cannot be null.", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "attributes", - "summary": "An array of strings that represent the attributes of indexed items.", - "description": "Each string corresponds to a property name that can be set for an item. For a list of possible properties, see\nthe API. Passing null for this parameter means that the query does not use \nattributes to find matching items.\n", - "platforms": [ - { - "since": "5.5.0", - "name": "iphone" - }, - { - "since": "5.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.SearchableIndex": { - "name": "Titanium.App.iOS.SearchableIndex", - "summary": "The SearchableIndex module is used to add or remove Ti.App.iOS.SearchableItem objects from the device search index.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableIndex.yml", - "description": "To effectively add and remove information from the iOS search index you will need to use the following modules:\n\n* - Used to create metadata related to the `Ti.App.iOS.SearchableItem`\n* - Used to assemble metadata into a unique object package to be used by `Ti.App.iOS.SearchableIndex`\n* - Used to add and remove `Ti.App.iOS.SearchableItem` objects to the device search index\n\nTo use this feature make sure you have a compatible device running iOS 9 or later.\n", - "examples": [ - { - "description": "Add Searchable Content to the On-Device Index", - "code": "The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and\nadd a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the\nTi.App.iOS.SearchableIndex object to add it to the on-device search index.\n\n#### app.js\n``` js\nvar searchItems = [];\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\n title:\"Titanium Core Spotlight Tutorial\",\n contentDescription:\"Tech Example \\nOn: \" + String.formatDate(new Date(),\"short\"),\n keywords:[\"Mobile\",\"Appcelerator\",\"Titanium\"]\n});\n\nvar item = Ti.App.iOS.createSearchableItem({\n identifier:\"my-id\",\n domainIdentifier:\"com.mydomain\",\n attributeSet:itemAttr\n});\nsearchItems.push(item);\n\nvar indexer = Ti.App.iOS.createSearchableIndex();\n\nindexer.addToDefaultSearchableIndex([searchItems],function(e){\n if(e.success){\n alert(\"Press the home button and now search for your keywords\");\n }else{\n alert(\"Errored: \" + JSON.stringify(e.error));\n }\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isSupported", - "summary": "Indicates whether indexing is supported by the device.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "addToDefaultSearchableIndex", - "summary": "Adds an array of Titanium.App.iOS.SearchableItem objects to the default search index.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "Array", - "summary": "Array of Titanium.App.iOS.SearchableItem objects to be added to the default search index.", - "type": "Array" - }, - { - "name": "callback", - "summary": "Function to invoke on success or failure of adding the array Titanium.App.iOS.SearchableItem object to the default search index.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deleteAllSearchableItems", - "summary": "Removes all search items added by the application.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to invoke on success or failure of deleting all search items.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deleteAllSearchableItemByDomainIdentifiers", - "summary": "Removes search items based on an array of domain identifiers.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "Array", - "summary": "Array of domain identifiers to be removed from the default search index.", - "type": "Array" - }, - { - "name": "callback", - "summary": "Function to invoke on success or failure of removing search items from the default search index.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deleteSearchableItemsByIdentifiers", - "summary": "Removes search items based on an array of identifiers.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "Array", - "summary": "Array of identifiers to be removed from the default search index.", - "type": "Array" - }, - { - "name": "callback", - "summary": "Function to invoke on success or failure of removing search items from the default search index.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.SearchableItem": { - "name": "Titanium.App.iOS.SearchableItem", - "summary": "Used to create a unique object containing all of the search information that will appear in the device search index.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableItem.yml", - "description": "To effectively add and remove information from the iOS search index you will need to use the below listed modules:\n\n* - Used to create metadata related to the `Ti.App.iOS.SearchableItem`\n* - Used to assemble metadata into a unique object package to be used by `Ti.App.iOS.SearchableIndex`\n* - Used to add and remove `Ti.App.iOS.SearchableItem` objects to the device search index\n\nTo use this feature make sure you have a compatible device running iOS 9 or later.\n\nTo create a SearchableItem object, use the Titanium.App.iOS.createSearchableItem method.\nPass a dictionary of properties to the method that will help identify the item.\nAt minimum, you must set the [attributeSet](Titanium.App.iOS.SearchableItem.attributeSet) property, which associates\nthe metadata with the SearchableItem object.\n\nThen, pass the SearchableItem object to a SearchableIndex object's\n[addToDefaultSearchableIndex()](Titanium.App.iOS.SearchableIndex.addToDefaultSearchableIndex) method to add the item\nto the device's search index.\n", - "examples": [ - { - "description": "Add Searchable Content to the On-Device Index", - "code": "The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and\nadd a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the\nTi.App.iOS.SearchableIndex object to add it to the on-device search index.\n\n#### app.js\n``` js\nvar searchItems = [];\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\n title:\"Titanium Core Spotlight Tutorial\",\n contentDescription:\"Tech Example \\nOn: \" + String.formatDate(new Date(),\"short\"),\n keywords:[\"Mobile\",\"Appcelerator\",\"Titanium\"]\n});\n\nvar item = Ti.App.iOS.createSearchableItem({\n uniqueIdentifier:\"my-id\",\n domainIdentifier:\"com.mydomain\",\n attributeSet:itemAttr\n});\nsearchItems.push(item);\n\nvar indexer = Ti.App.iOS.createSearchableIndex();\n\nindexer.addToDefaultSearchableIndex(searchItems,function(e){\n if(e.success){\n alert(\"Press the home button and now search for your keywords\");\n }else{\n alert(\"Errored: \" + JSON.stringify(e.error));\n }\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "attributeSet", - "summary": "Set of metadata properties to display for the item.", - "description": "Must be set to create a SearchableItem object.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.App.iOS.SearchableItemAttributeSet", - "availability": "creation" - }, - { - "name": "domainIdentifier", - "summary": "Identifier that represents the \"domain\" or owner of this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "expirationDate", - "summary": "Searchable items have an expiration date or time to live. By default it is set to one month.", - "description": "Absolute date after which the activity is no longer eligible to be indexed or handed off.\n\nThe date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "uniqueIdentifier", - "summary": "Unique identifier to your application group.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.SearchableItemAttributeSet": { - "name": "Titanium.App.iOS.SearchableItemAttributeSet", - "summary": "The SearchableItemAttributeSet module defines metadata properties for SearchItem and UserActivity objects.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/SearchableItemAttributeSet.yml", - "description": "The SearchableItemAttributeSet object provides a large number of properties covering most common scenarios such\nas files, music, video, and document searches. To effectively add and remove information from the iOS search index\nyou will need to use the below listed modules:\n\n* - Used to create metadata related to the `Ti.App.iOS.SearchableItem`\n* - Used to assemble metadata into a unique object package to be used by `Ti.App.iOS.SearchableIndex`\n* - Used to add and remove `Ti.App.iOS.SearchableItem` objects to the device search index\n\nTo use this feature make sure you have a compatible device running iOS 9 or later.\n\nTo create a SearchableItemAttributeSet object, use the Titanium.App.iOS.createSearchableItemAttributeSet method.\nPass a dictionary of metadata properties to the method to associate with a SearchableItem object or UserActivity.\nAt minimum, you must set the [itemContentType](Titanium.App.iOS.SearchableItemAttributeSet.itemContentType) property.\n\nPass the SearchableItemAttributeSet object to either the Titanium.App.iOS.createSearchableItem method to the `attributeSet` key\nor to a UserActivity object's [addContentAttributeSet()](Titanium.App.iOS.UserActivity.addContentAttributeSet) method.\n", - "examples": [ - { - "description": "Add Searchable Content to the On-Device Index", - "code": "The following example demonstrates how to create a new Ti.App.iOS.SearchableItem and\nadd a Ti.App.iOS.SearchableItemAttributeSet. The Ti.App.iOS.SearchableItem is then passed to the\nTi.App.iOS.SearchableIndex object to add it to the on-device search index.\n\n#### app.js\n``` js\nvar searchItems = [];\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\n title:\"Titanium Core Spotlight Tutorial\"\n});\n\nitemAttr.contentDescription =\"Tech Example \\nOn: \" + String.formatDate(new Date(),\"short\");\nitemAttr.keywords =[\"Mobile\",\"Appcelerator\",\"Titanium\"];\n\nvar item = Ti.App.iOS.createSearchableItem({\n uniqueIdentifier:\"my-id\",\n domainIdentifier:\"com.mydomain\",\n attributeSet:itemAttr\n});\nsearchItems.push(item);\n\nvar indexer = Ti.App.iOS.createSearchableIndex();\n\nindexer.addToDefaultSearchableIndex(searchItems,function(e){\n if(e.success){\n alert(\"Press the home button and now search for your keywords\");\n }else{\n alert(\"Errored: \" + JSON.stringify(e.error));\n }\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "itemContentType", - "summary": "Content type of the attribute set.", - "description": "Must be set to create a SearchableItemAttributeSet object. Set to an identifier in the\n[iOS Developer Library: System-Declared Uniform Type Identifiers](https://developer.apple.com/library/content/documentation/Miscellaneous/Reference/UTIRef/Articles/System-DeclaredUniformTypeIdentifiers.html)\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation", - "constants": [ - "Titanium.App.iOS.UTTYPE_TEXT", - "Titanium.App.iOS.UTTYPE_PLAIN_TEXT", - "Titanium.App.iOS.UTTYPE_UTF8_PLAIN_TEXT", - "Titanium.App.iOS.UTTYPE_UTF16_EXTERNAL_PLAIN_TEXT", - "Titanium.App.iOS.UTTYPE_UTF16_PLAIN_TEXT", - "Titanium.App.iOS.UTTYPE_RTF", - "Titanium.App.iOS.UTTYPE_HTML", - "Titanium.App.iOS.UTTYPE_XML", - "Titanium.App.iOS.UTTYPE_PDF", - "Titanium.App.iOS.UTTYPE_RTFD", - "Titanium.App.iOS.UTTYPE_FLAT_RTFD", - "Titanium.App.iOS.UTTYPE_TXN_TEXT_AND_MULTIMEDIA_DATA", - "Titanium.App.iOS.UTTYPE_WEB_ARCHIVE", - "Titanium.App.iOS.UTTYPE_IMAGE", - "Titanium.App.iOS.UTTYPE_JPEG", - "Titanium.App.iOS.UTTYPE_JPEG2000", - "Titanium.App.iOS.UTTYPE_TIFF", - "Titanium.App.iOS.UTTYPE_PICT", - "Titanium.App.iOS.UTTYPE_GIF", - "Titanium.App.iOS.UTTYPE_PNG", - "Titanium.App.iOS.UTTYPE_QUICKTIME_IMAGE", - "Titanium.App.iOS.UTTYPE_APPLE_ICNS", - "Titanium.App.iOS.UTTYPE_BMP", - "Titanium.App.iOS.UTTYPE_ICO", - "Titanium.App.iOS.UTTYPE_MOVIE", - "Titanium.App.iOS.UTTYPE_VIDEO", - "Titanium.App.iOS.UTTYPE_AUDIO", - "Titanium.App.iOS.UTTYPE_QUICKTIME_MOVIE", - "Titanium.App.iOS.UTTYPE_MPEG", - "Titanium.App.iOS.UTTYPE_MPEG4", - "Titanium.App.iOS.UTTYPE_MP3", - "Titanium.App.iOS.UTTYPE_MPEG4_AUDIO", - "Titanium.App.iOS.UTTYPE_APPLE_PROTECTED_MPEG4_AUDIO" - ] - }, - { - "name": "displayName", - "summary": "A localized string to be displayed in the UI for this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alternateNames", - "summary": "An array of localized strings of alternate display names for this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "path", - "summary": "The complete path to the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentURL", - "summary": "File URL representing the content to be indexed.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "thumbnailURL", - "summary": "File URL pointing to a thumbnail image for this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "thumbnailData", - "summary": "Image data for thumbnail for this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.Blob" - ] - }, - { - "name": "relatedUniqueIdentifier", - "summary": "For activities this is the unique identifier for the item this activity is related to.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "metadataModificationDate", - "summary": "The date that the last metadata attribute was changed.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentType", - "summary": "UTI Type pedigree for an item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "contentTypeTree", - "summary": "Array of strings related to the content tree of the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "keywords", - "summary": "Represents keywords associated with this particular item. Example keywords might be Birthday etc.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "title", - "summary": "The title of the particular item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "subject", - "summary": "Subject of the the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "theme", - "summary": "Theme of the the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentDescription", - "summary": "An account of the content of the resource.", - "description": "Description may include but is not limited to: an abstract, table of contents, reference\nto a graphical representation of content or a free-text account of the content.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "identifier", - "summary": "Used to reference to the resource within a given context.", - "description": "Recommended best practice is to identify the resource by\nmeans of a string or number conforming to a formal identification system.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "audiences", - "summary": "A class of entity for whom the resource is intended or useful.", - "description": "A class of entity may be determined by the creator, publisher\nor third party.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "fileSize", - "summary": "Size of the document in MB.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "pageCount", - "summary": "Number of pages in the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "pageWidth", - "summary": "Width in points (72 points per inch) of the document page.", - "description": "First page only for PDF's - other pages within the PDF may\nnot be the same width.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "pageHeight", - "summary": "Height in points (72 points per inch) of the document page.", - "description": "First page only for PDF's - other pages within the PDF may\nnot be the same height.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "securityMethod", - "summary": "Security (encryption) method used in the file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "creator", - "summary": "Application used to create the document content (e.g. \"Word\",\"Framemaker\", etc.).", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "encodingApplications", - "summary": "Software used to convert the original content into a PDF stream.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "kind", - "summary": "Kind that the item represents.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "fontNames", - "summary": "Array of font names used in the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "audioSampleRate", - "summary": "The sample rate of the audio data contained in the file.", - "description": "The sample rate is a float value representing Hertz (audio_frames/second),\nfor example, 44100.0 or 22254.54.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "audioChannelCount", - "summary": "The number of channels in the audio data contained in the file.", - "description": "This item only represents\nthe number of discreet channels of audio data found in the file. It does not indicate\nany configuration of the data in regards to a user's speaker setup.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "tempo", - "summary": "The tempo of the music contained in the audio file in Beats Per Minute.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "keySignature", - "summary": "The musical key of the song/composition contained in an audio file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "timeSignature", - "summary": "The time signature of the musical composition contained in the audio/MIDI file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "audioEncodingApplication", - "summary": "The name of the application that encoded the data contained in the audio file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "composer", - "summary": "The composer of the song/composition contained in the audio file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "lyricist", - "summary": "The lyricist/text writer for song/composition contained in the audio file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "album", - "summary": "The title for a collection of media.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "artist", - "summary": "The artist for the media.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "audioTrackNumber", - "summary": "The track number of a song/composition when it is part of an album.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "recordingDate", - "summary": "The recording date of the song/composition.", - "description": "This information differs from\nthe `contentCreationDate` attribute as it indicates the date that the\n'art' was created, in contrast to contentCreationDate which for example, could indicate\nthe creation date of an edited or 'mastered' version of the original art.\n\nThe date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "musicalGenre", - "summary": "The musical genre of the song/composition contained in the audio file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "generalMIDISequence", - "summary": "Used to indicates whether the MIDI sequence contained in the file is setup for use with a General MIDI device.", - "description": "Should be `1` if true and `0` otherwise.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "musicalInstrumentCategory", - "summary": "Metadata attribute that stores the category of instrument.", - "description": "Files should have an instrument associated with\nthem (\"Other Instrument\" is provided as a catch-all). For some\ncategories, like \"Keyboards\" there are instrument names which\nprovide a more detailed instrument definition, for example, Piano, Organ, etc.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "musicalInstrumentName", - "summary": "Metadata attribute that stores the name of instrument.", - "description": "Relative to the instrument category. Files can have an\ninstrument name associated with them if they have certain\ninstrument categories, for example, the category Percussion has\nmultiple instruments, including Conga and Bongo.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "supportsPhoneCall", - "summary": "Used to indicate that using the phone number is appropriate.", - "description": "If `supportsPhoneCall` is `1` and the item has the `phoneNumbers` property set, then the phone number\nmay be used to initiate phone calls. This should be used to indicate that using the phone\nnumber is appropriate, and a primary action for the user. For example, `supportsPhoneCall`\nwould be set on a business, but not an academic paper that happens to have phone numbers\nfor the authors or the institution.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "supportsNavigation", - "summary": "Used to determine if navigation is supported.", - "description": "If `supportsNavigation` is set to `1`, and the item has the `latitude` and `longitude` properties set,\nthen the latitude and longitude may be used for navigation. For example, `supportsNavigation`\nwould be set on a restaurant review, but not on a photo.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "containerTitle", - "summary": "Title displayed in the search container", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "containerDisplayName", - "summary": "Display of the search container", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "containerIdentifier", - "summary": "Identifier for the search container", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "containerOrder", - "summary": "Order the search container is displayed.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "editors", - "summary": "The list of editor/editors that have worked on this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "participants", - "summary": "The list of people who are visible in an image or movie or written about in a document.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "projects", - "summary": "The list of projects that this item is part of.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "downloadedDate", - "summary": "The date that the file was last downloaded / received.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "lastUsedDate", - "summary": "The date that the item was last used.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentCreationDate", - "summary": "The date that the contents of the item were created.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentModificationDate", - "summary": "The date that the contents of the item were last modified.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "addedDate", - "summary": "The date that the item was moved into the current location.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "contentSources", - "summary": "Used to indicate where the item was obtained from.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "comment", - "summary": "Comment related to a file.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "copyright", - "summary": "Copyright of the content.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "duration", - "summary": "Duration in seconds of the content of the item (if appropriate).", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "contactKeywords", - "summary": "A list of contacts that are somehow associated with this document beyond what is captured as Author.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "codecs", - "summary": "The codecs used to encode/decode the media.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "organizations", - "summary": "Used to indicate company/Organization that created the document.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "mediaTypes", - "summary": "Media types present in the content.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "version", - "summary": "A version specifier for this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "role", - "summary": "Used to indicate the role of the document creator.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "streamable", - "summary": "Whether the content is prepared for streaming. Set to `0` for not streamable and `1` for streamable.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "totalBitRate", - "summary": "The total bit rate (audio and video combined) of the media.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "videoBitRate", - "summary": "The video bit rate.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "audioBitRate", - "summary": "The audio bit rate.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "deliveryType", - "summary": "The delivery type of the item. Set to `0` for fast start and `1` for RTSP.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "languages", - "summary": "Used to designate the languages of the intellectual content of the resource.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "rights", - "summary": "Used to provide a link to information about rights held in and over resource.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "publishers", - "summary": "Used to designate the entity responsible for making the resource available.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "contributors", - "summary": "Used to designate the entity responsible for making contributions to the content of the resource.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "coverage", - "summary": "Used to designate the extent or scope of the content of the resource.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "rating", - "summary": "User rating of this item out of 5 stars.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "ratingDescription", - "summary": "A description of the rating, for example, the number of reviewers.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "playCount", - "summary": "User play count of this item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "information", - "summary": "Information about the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "director", - "summary": "Director of the item, for example, the movie director.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "producer", - "summary": "Producer of the content.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "genre", - "summary": "Genre of the item, for example, movie genre.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "performers", - "summary": "Performers in the movie.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "originalFormat", - "summary": "Original format of the movie.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "originalSource", - "summary": "Original source of the movie.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "local", - "summary": "Whether or not the item is local. Set to `1` if true and `0` otherwise.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "contentRating", - "summary": "Whether or not the item has explicit content. Set to `1` for explicit or `0` for clean.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "url", - "summary": "URL of the item.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "fullyFormattedAddress", - "summary": "The fully formatted address of the item (obtained from MapKit).", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "subThoroughfare", - "summary": "The sub-location (e.g., street number) for the item according to guidelines established by the provider.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "thoroughfare", - "summary": "The location (e.g., street name) for the item according to guidelines established by the provider.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "postalCode", - "summary": "The postal code for the item according to guidelines established by the provider.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.UserActivity": { - "name": "Titanium.App.iOS.UserActivity", - "summary": "The UserActivity module is used to enable device Handoff and to create User Activities.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserActivity.yml", - "description": "A UserActivity object requires the `activityType` property to be specified at creation time.\nAdditional properties can be set either at creation or set individually after creation.\n\nHandoff will not work in the simulator. You must build and run on a compatible device.\n\nHandoff functionality depends on a few things:\n\n * You must be logged into the same iCloud account on each device you wish to use Handoff.\n * Handoff broadcasts activities via Bluetooth LE signals, so both the broadcasting and receiving devices must have Bluetooth LE 4.0 support.\n * Connect all devices to the same Wi-Fi network.\n\nMake sure you have two devices that are logged onto the same iCloud account.\n\nSince iOS 12, you can also configure the UserActivity API for handling Siri Shortcuts. See the\nbelow API's and example or refer to the [Apple Siri Shortcuts Docs](https://developer.apple.com/documentation/sirikit/donating_shortcuts?language=objc)\nfor details.\n", - "events": [ - { - "name": "useractivitywillsave", - "deprecated": { - "notes": "Set the property `needsSave` to true every time you update current activity state instead.", - "since": "5.2.0" - }, - "summary": "Fired if the activity context needs to be saved before being continued on another device.\n\nTo fire the event, set the UserActivity object's `needsSave ` property to `true`.\n\nThe receiver should update the activity with current activity state.\n\nAfter the event is fired, iOS will reset the `needsSave` property to false.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "activityType", - "summary": "The activityType of the User Activity triggering the event.", - "type": "String" - }, - { - "name": "title", - "summary": "The title of the User Activity if defined.", - "type": "String" - }, - { - "name": "webpageURL", - "summary": "The webpageURL of the User Activity if defined.", - "type": "String" - }, - { - "name": "userInfo", - "summary": "Dictionary object containing the userInfo data of the User Activity.", - "type": "Dictionary" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "useractivitywascontinued", - "summary": "Fired when the user activity was continued on another device.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "activityType", - "summary": "The activityType of the User Activity triggering the event.", - "type": "String" - }, - { - "name": "title", - "summary": "The title of the User Activity if defined.", - "type": "String" - }, - { - "name": "webpageURL", - "summary": "The webpageURL of the User Activity if defined.", - "type": "String" - }, - { - "name": "userInfo", - "summary": "Dictionary object containing the userInfo data of the User Activity.", - "type": "Dictionary" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "useractivitydeleted", - "summary": "Fired when the user activity get deleted using the or \n methods.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "Creating a new User Activity", - "code": "The following example demonstrates how to create a new UserActivity and mark the activity as\nthe current activity Handoff should be using when switching between devices.\n\nIt is important to note that all activityTypes must be defined in your `tiapp.xml` before this\nfeature can be supported. It is important to check the supported property on your UserActivity\nto ensure the activity created is supported on your device.\n\n#### app.js\n``` js\nvar activity = Ti.App.iOS.createUserActivity({\nactivityType: 'com.setdirection.home',\n title: 'activity 1',\n userInfo: {\n msg: 'hello world'\n }\n});\n\nif (!activity.isSupported()) {\n alert('User Activities are not supported on this device!');\n} else {\n activity.becomeCurrent();\n\n Ti.App.iOS.addEventListener('continueactivity', function (e) {\n if (e.activityType === 'com.setdirection.home' && e.userInfo.msg) {\n alert(e.userInfo.msg);\n }\n });\n}\n```\n\n#### tiapp.xml\n``` xml\n\n \n \n \n NSUserActivityTypes\n \n com.setdirection.home\n \n \n \n \n\n```\n" - }, - { - "description": "iOS 12+ Siri Shortcuts", - "code": "The following example shows how to add and delete a UserActivity for Siri Shortcuts\non iOS 12 and later.\n\n#### app.js\n``` js\nvar win = Ti.UI.createWindow({\n backgroundColor: '#fff'\n});\n\nvar btn = Ti.UI.createButton({\n top: 200,\n title: 'Delete UserActivity'\n});\n\nvar itemAttr = Ti.App.iOS.createSearchableItemAttributeSet({\n itemContentType: Ti.App.iOS.UTTYPE_IMAGE,\n title: 'Titanium Siri Shortcut Tutorial',\n contentDescription: 'Tech Example \\nOn: ' + (new Date().toLocaleString()),\n});\n\nvar activity = Ti.App.iOS.createUserActivity({\n activityType: 'com.appcelerator.titanium',\n title: 'Siri shortcut activity',\n userInfo: {\n msg: 'hello world'\n },\n eligibleForSearch: true,\n eligibleForPrediction: true,\n persistentIdentifier: 'titanium_siri_identifier'\n});\n\nactivity.addContentAttributeSet(itemAttr);\n\nif (!activity.isSupported()) {\n alert('User Activities are not supported on this device!');\n} else {\n activity.becomeCurrent();\n\n Ti.App.iOS.addEventListener('continueactivity', function (e) {\n Ti.API.info('continueactivity called');\n if (e.activityType === 'com.appcelerator.titanium' && e.userInfo.msg) {\n alert(e.userInfo.msg);\n }\n });\n}\n\nactivity.addEventListener('useractivitydeleted', function (e) {\n Ti.API.info('useractivitydeleted called');\n alert('user activity deleted');\n});\n\nbtn.addEventListener('click', function () {\n activity.deleteSavedUserActivitiesForPersistentIdentifiers(['titanium_siri_identifier']);\n});\n\nwin.add(btn);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addContentAttributeSet", - "summary": "Adds a Titanium.App.iOS.SearchableItemAttributeSet to the user activity.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "contentAttributeSet", - "summary": "SearchableItemAttributeSet object that contains the set of properties you want to display for a searchable activity.", - "type": "Titanium.App.iOS.SearchableItemAttributeSet" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "becomeCurrent", - "summary": "Marks the activity as currently in use by the user.\n", - "description": "For example, you should mark the activity associated with the active window as current.\nA newly created activity is eligible for continuation on another device after the first time it becomes current.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "invalidate", - "summary": "Invalidates an activity when it is no longer eligible for continuation.\n", - "description": "For example, when the window associated with an activity is closed, you should invalidate the activity.\nAn invalid activity cannot become current.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "resignCurrent", - "summary": "Marks the activity as currently **not** in use and ineligible to be continued.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isSupported", - "summary": "Determines if user activities are supported (`true`) or not (`false`) by the device.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns `true` if the device supports user activity.", - "type": "Boolean" - } - }, - { - "name": "deleteSavedUserActivitiesForPersistentIdentifiers", - "summary": "Deletes user activities created by your app that have the specified persistent identifiers.\n", - "description": "The event is fired after deleting the \nuser activities. Listen and wait for this event to fired to ensure that the system deletes \nthe activities (or marks them for deletion).\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "persistentIdentifiers", - "summary": "Array of persistent identifiers of user activity.", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "deleteAllSavedUserActivities", - "summary": "Deletes all user activities created by your app.", - "description": "The event is fired after deleting the \nuser activities. Listen and wait for this event to fired to ensure that the system deletes \nthe activities (or marks them for deletion).\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "activityType", - "summary": "Name of the activity type.", - "description": "Apple recommends using a reverse DNS scheme to name activities in the format: com....\n\nThe activity type must also be registered in the `ios plist` section of the `tiapp.xml` file. Add the `NSUserActivityTypes`\nkey and set its value to an array of activity type strings.\n\n#### tiapp.xml\n``` xml\n\n \n \n \n NSUserActivityTypes\n \n com.fooinc.musicalpedia.playtrack\n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "eligibleForPublicIndexing", - "summary": "Set to `true` if the user activity can be publicly accessed by all iOS users.", - "description": "Set to `true` if this user activity should be eligible for indexing for any user of the application,\non any device, or `false` if the activity contains private or sensitive information or which would not be useful to other\nusers if indexed. You must also set either the `requiredUserActivityKeys` or `webpageURL` property.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "eligibleForSearch", - "summary": "Set to true if the user activity should be added to the on-device index.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "eligibleForHandoff", - "summary": "Set to true if this user activity should be eligible to be handed off to another device", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "eligibleForPrediction", - "summary": "A Boolean value that determines whether Siri can suggest the user activity as a shortcut to the user.\n", - "description": "To donate a user activity to Siri Shortcuts, set eligibleForPrediction to `true` and make the \nuser activity current. To make the user activity current, call the becomeCurrent method of activity.\nFor more information, see https://developer.apple.com/documentation/sirikit/donating_shortcuts?language=objc. \n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "persistentIdentifier", - "summary": "A value used to identify the user activity.", - "description": "Set this property to a unique value that identifies the user activity so you can later delete it with \nTi.App.iOS.UserActivity.deleteSavedUserActivitiesForPersistentIdentifiers method.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "expirationDate", - "summary": "Absolute date after which the activity is no longer eligible to be indexed or handed off.", - "description": "The date will be a string in the following format: \"yyyy-MM-dd'T'HH:mm:ss.SSS'+0000'\"\nFor example, `2015-12-25T23:30:55.978+0000`\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "Determined by iOS" - }, - { - "name": "keywords", - "summary": "An array of string keywords representing words or phrases that might help the user to find the activity in the application history.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "needsSave", - "summary": "Set to true every time you have updated the user activity and need the changes to be saved before handing it off to another device.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "requiredUserInfoKeys", - "summary": "An array of String keys from the userInfo property which represent the minimal information about the user activity that should be stored for later restoration.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "supported", - "deprecated": { - "notes": "Use [Titanium.App.iOS.UserActivity.isSupported](Titanium.App.iOS.UserActivity.isSupported) instead.", - "since": "5.1.0" - }, - "summary": "Determines if user activities are supported (`true`) or not (`false`) by the device.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "title", - "summary": "An optional, user-visible title for this activity such as a document name or web page title.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "userInfo", - "summary": "The userInfo dictionary contains application-specific state needed to continue an activity on another device.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "webpageURL", - "summary": "When no suitable application is installed on a resuming device and the `webpageURL` property is set,\nthe user activity will instead be continued in a web browser by loading the specified URL.\n", - "description": "Only supports the `http://` and `https://` protocols. Any other protocol will throw an error.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.UserDefaults": { - "name": "Titanium.App.iOS.UserDefaults", - "summary": "The UserDefaults module is used for storing application-related data in property/value pairs \nthat persist beyond application sessions and device power cycles. UserDefaults allows the suiteName\nof the UserDefaults to be specified at creation time.\n\n**Important**: Using this API requires the `NSPrivacyAccessedAPICategoryUserDefaults` property set in the\nprivacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "extends": "Titanium.App.Properties", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserDefaults.yml", - "description": "Unlike Titanium.App.Properties, Titanium.App.iOS.UserDefaults does not pull properties defined in the `tiapp.xml` file.\n\nTo create a UserDefaults object, use the method.\n", - "events": [ - { - "name": "change", - "summary": "Fired when a property is changed.", - "description": "On iOS, the event is fired when the user re-enters the application after \nmaking a change using the Settings application.\n\nThe event is also fired when the application changes a property directly using one of the \n`Ti.App.iOS.UserDefaults` or `Ti.App.Properties` methods.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties" - } - ], - "examples": [ - { - "description": "Create a UserDefaults object", - "code": "Creating a UserDefaults object\n\n``` js\nvar props = Ti.App.iOS.createUserDefaults({\n suiteName: 'group.mySuite'\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getBool", - "summary": "Returns the value of a property as a boolean data type.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "getDouble", - "summary": "Returns the value of a property as a double (double-precision, floating point) data type.", - "description": "This method must only be used to retrieve properties created with \n[setDouble](Titanium.App.Properties.setDouble). \n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getInt", - "summary": "Returns the value of a property as an integer data type.\n", - "description": "This method must only be used to retrieve properties created with \n[setInt](Titanium.App.Properties.setInt). \n\nUse [getDouble](Titanium.App.Properties.getDouble) and [setDouble](Titanium.App.Properties.setDouble) \nto store values outside the integer data type range of `-2,147,483,648` to `2,147,483,647`.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "getList", - "summary": "Returns the value of a property as an array data type.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Array", - "optional": true - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getObject", - "summary": "Returns the value of a property as an object.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "Object", - "optional": true - } - ], - "returns": { - "type": "Object" - } - }, - { - "name": "getString", - "summary": "Returns the value of a property as a string data type.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "default", - "summary": "Default value to return if property does not exist.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "hasProperty", - "summary": "Indicates whether a property exists.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "listProperties", - "summary": "Returns an array of property names.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "returns": { - "type": "Array" - } - }, - { - "name": "removeProperty", - "summary": "Removes a property if it exists, or does nothing otherwise.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllProperties", - "summary": "Removes all properties that have been set by the user on runtime, or does nothing otherwise.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "returns": { - "type": "void" - } - }, - { - "name": "setBool", - "summary": "Sets the value of a property as a boolean data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setDouble", - "summary": "Sets the value of a property as a double (double-precision, floating point) data type. The \nproperty will be created if it does not exist.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setInt", - "summary": "Sets the value of a property as an integer data type. The property will be created if it \ndoes not exist.\n", - "description": "Use [getDouble](Titanium.App.Properties.getDouble) and [setDouble](Titanium.App.Properties.setDouble) \nto store values outside the integer data type range of `-2,147,483,648` to `2,147,483,647`.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value, within the range `-2,147,483,648` to `2,147,483,647`.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setList", - "summary": "Sets the value of a property as an array data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setObject", - "summary": "Sets the value of a property as an object data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "Object" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setString", - "summary": "Sets the value of a property as a string data type. The property will be created if it \ndoes not exist.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.App.Properties", - "parameters": [ - { - "name": "property", - "summary": "Name of property.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "suiteName", - "summary": "Sets the name of the suite to be used to access UserDefaults.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - } - ] - }, - "Titanium.App.iOS.UserNotificationAction": { - "name": "Titanium.App.iOS.UserNotificationAction", - "summary": "An action the user selects in response to an interactive notification.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationAction.yml", - "description": "To create a notification action, use the method.\n\nAn notification action represents an option a user selects in response to an interactive\nnotification. The notification action is represented as a button in the application UI.\n", - "methods": [], - "properties": [ - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "activationMode", - "summary": "Selects how to activate the application.", - "description": "Set to `Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND` to activate the application in the\nbackground to respond to the action unless the application is already in the foreground.\n\nSet to `Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND` to launch the application in the\nforeground to respond to the action. These actions won't be displayed on Apple Watch.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "availability": "creation", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND", - "Titanium.App.iOS.USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND" - ] - }, - { - "name": "behavior", - "summary": "Custom behavior the user notification supports.", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "availability": "creation", - "default": "", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_BEHAVIOR_DEFAULT", - "Titanium.App.iOS.USER_NOTIFICATION_BEHAVIOR_TEXTINPUT" - ] - }, - { - "name": "authenticationRequired", - "summary": "Set to true if the action requires the device to be unlocked. On the Apple Watch actions never require authentication.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation" - }, - { - "name": "destructive", - "summary": "Set to true if the action causes destructive behavior to the user's data or the application.", - "description": "The action appears red in the locked screen and notification center instead of the\ndefault color.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "availability": "creation" - }, - { - "name": "identifier", - "summary": "Identifier for this action. Used to identify the action the user pressed.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "title", - "summary": "Title of the button displayed in the notification.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.UserNotificationCategory": { - "name": "Titanium.App.iOS.UserNotificationCategory", - "summary": "A set of notification actions to associate with a notification.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCategory.yml", - "description": "To create a notification category, use the method.\n\nA notification category represents a collection of \nto associate with a specific notification. The notification category allows the application to\ncustomize the notification options based on which notification style is used. For alert dialogs,\nonly four notification actions can be displayed, while all other notifications can only display two\nactions.\n\nTo use a local interactive notification, you need to register the notification category using\nthe method and send a notification using the\n and pass the category identifier to the `category`\nproperty.\n", - "methods": [], - "properties": [ - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "actionsForDefaultContext", - "summary": "Array of notification actions to associate with the group.", - "description": "Note that only the first four actions can be displayed for an alert dialog and on the Apple Watch.\nThe first two actions can be displayed for all other notifications.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "availability": "creation" - }, - { - "name": "actionsForMinimalContext", - "summary": "Array of notification actions to display for non-dialog-style notification.", - "description": "If not specified, the first two actions from `actionsForDefaultContent` are displayed.\nNote: This property has been removed in iOS 10. iOS 10+ will handle the actions internally.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "availability": "creation" - }, - { - "name": "categorySummaryFormat", - "summary": "A format string for the summary description used when the system groups the category's notifications.", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "identifier", - "summary": "Identifier for this category.", - "description": "When scheduling a notification, pass this value to the `category` property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "intentIdentifiers", - "summary": "The intents related to notifications of this category.", - "description": "When a notification is delivered, the presence of an intent identifier\nlets the system know that the notification is potentially related to the\nhandling of a request made through Siri.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "availability": "creation" - }, - { - "name": "hiddenPreviewsBodyPlaceholder", - "summary": "The placeholder text to display when notification previews are disabled for the app.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation" - }, - { - "name": "options", - "summary": "Options for how to handle notifications of this type.", - "description": "If not specified, defaults to .", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "availability": "creation", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_CATEGORY_OPTION_NONE", - "Titanium.App.iOS.USER_NOTIFICATION_CATEGORY_OPTION_CUSTOM_DISMISS_ACTION", - "Titanium.App.iOS.USER_NOTIFICATION_CATEGORY_OPTION_ALLOW_IN_CARPLAY", - "Titanium.App.iOS.USER_NOTIFICATION_CATEGORY_OPTION_HIDDEN_PREVIEWS_SHOW_TITLE", - "Titanium.App.iOS.USER_NOTIFICATION_CATEGORY_OPTION_HIDDEN_PREVIEWS_SHOW_SUBTITLE" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.App.iOS.UserNotificationCenter": { - "name": "Titanium.App.iOS.UserNotificationCenter", - "summary": "The top-level App iOS Notification Center module. It is used to control scheduled notifications\nand receive details about the system-wide notification settings.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCenter.yml", - "methods": [ - { - "name": "getPendingNotifications", - "summary": "Fetches the pending notifications asynchronously.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "The function that is being called after the notifications\nhave been fetched.\n", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getDeliveredNotifications", - "summary": "Fetches the delivered notifications asynchronously.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "The function that is being called after the notifications\nhave been fetched.\n", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removePendingNotifications", - "summary": "Removes the specified pending notifications to prevent them from being triggered.\nIf no notifications are specified, all pending notifications will be removed.\n", - "description": "Pending notifications can be obtained via a call to the \nmethod.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "notifications", - "summary": "The pending notification to remove. If none specified, all pending notifications\nwill be removed.\n", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeDeliveredNotifications", - "summary": "Removes the specified delivered notifications from the notification-center.\nIf no notifications are specified, all delivered notifications will be removed.\n", - "description": "Delivered notifications can be obtained via a call to the \nmethod.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "notifications", - "summary": "The delivered notification to remove. If none specified, all pending notifications\nwill be removed.\n", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "requestUserNotificationSettings", - "summary": "Notification types and user notification categories the application is registered to use.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "The callback invoked when requesting user notification settings.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - } - ] - }, - "UserNotificationCallbackResponse": { - "name": "UserNotificationCallbackResponse", - "summary": "Response when receiving pending or local notifications\nin and\n.\n", - "extends": "Object", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCenter.yml", - "properties": [ - { - "name": "notifications", - "summary": "An array of identifiers used to create notifications.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ] - }, - "UserNotificationDictionary": { - "name": "UserNotificationDictionary", - "summary": "Dictionary of notification data used in the array of `notifications`\nwhen receiving pending or local notifications in\n and\n.\n", - "extends": "Object", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCenter.yml", - "properties": [ - { - "name": "alertTitle", - "summary": "Title of the notification.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alertSubtitle", - "summary": "Subtitle of the notification.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alertAction", - "summary": "Alert button text ('Open', by default) or home text ('Press Home to unlock', by default)\ntype: String\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alertBody", - "summary": "Alert message.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alertLaunchImage", - "summary": "Image displayed instead of `Default.png` when launching the application.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "badge", - "summary": "Application badge value.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "date", - "summary": "Date and time when the notification was configured to fire.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "sound", - "summary": "Path to the sound file configured to play when the notification was fired.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "timezone", - "summary": "Timezone of the date when the notification was configured to fire.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "userInfo", - "summary": "Custom data object.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "UserInfoDictionary" - }, - { - "name": "category", - "summary": "Category identifier of the notification.", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "identifier", - "summary": "The notification identifier.", - "description": "This property is required in iOS 10+ and will fallback to a generated\nUUID-string if not set. It is recommended to manage the identifier\nyourself, but you can also get the generated UUID by accessing via\nthe \"userInfo.id\" field for parity with older iOS versions.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false - }, - { - "name": "region", - "summary": "Region of the notification.", - "description": "The following keys are included:\n - latitude: The latitude of the region.\n - longitude: The longitude of the region.\n - radius: The radius of the region.\n - identifier: The identifier of the region.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - } - ] - }, - "UserInfoDictionary": { - "name": "UserInfoDictionary", - "summary": "Dictionary object of parameters.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCenter.yml", - "properties": [ - { - "name": "showInForeground", - "summary": "Show notification if app is in foreground", - "description": "Boolean if a notification banner is shown if the app is in foreground.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "GetUserNotificationSettings": { - "name": "GetUserNotificationSettings", - "summary": "Dictionary object of parameters used to register the application with local notifications using\nthe method.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/UserNotificationCenter.yml", - "properties": [ - { - "name": "types", - "summary": "Notification types to use.", - "description": "Only available in iOS < 10. iOS 10 and later returns notification settings more detailed,\ncheck the other attributes for more information.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_NONE", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_BADGE", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_SOUND", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_ALERT", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_CRITICAL_ALERT", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_PROVISIONAL", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_PROVIDES_APP_NOTIFICATION_SETTINGS" - ] - }, - { - "name": "categories", - "summary": "Set of categories of user notification actions required by the application to use.", - "description": "Only available in iOS < 10. iOS 10 and later returns notification settings more detailed,\ncheck the other attributes for more information.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "authorizationStatus", - "summary": "The current authorization status for using notifications.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_AUTHORIZATION_STATUS_NOT_DETERMINED", - "Titanium.App.iOS.USER_NOTIFICATION_AUTHORIZATION_STATUS_AUTHORIZED", - "Titanium.App.iOS.USER_NOTIFICATION_AUTHORIZATION_STATUS_DENIED", - "Titanium.App.iOS.USER_NOTIFICATION_AUTHORIZATION_STATUS_PROVISIONAL" - ] - }, - { - "name": "soundSetting", - "summary": "The current sound settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "badgeSetting", - "summary": "The current badge settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "alertSetting", - "summary": "The current alert settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "notificationCenterSetting", - "summary": "The current notification-center settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "lockScreenSetting", - "summary": "The current lock-screen settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "carPlaySetting", - "summary": "The current CarPlay settings.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "criticalAlertSetting", - "summary": "The authorization status to play sounds for critical alerts.\nAvailable in Titanium SDK 7.4.0 and later.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "providesAppNotificationSettings", - "summary": "A Boolean value indicating the system displays a button for in-app notification settings.\nAvailable in Titanium SDK 7.4.0 and later.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_ENABLED", - "Titanium.App.iOS.USER_NOTIFICATION_SETTING_DISABLED" - ] - }, - { - "name": "alertStyle", - "summary": "The current alert style used to display notifications.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_ALERT_STYLE_NONE", - "Titanium.App.iOS.USER_NOTIFICATION_ALERT_STYLE_ALERT", - "Titanium.App.iOS.USER_NOTIFICATION_ALERT_STYLE_BANNER" - ] - } - ] - }, - "Titanium.App.iOS": { - "name": "Titanium.App.iOS", - "summary": "The top-level App iOS module, available only to iOS devices, that includes the facilities to\ncreate and manage local notifications and background services.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml", - "description": "\n### Local Notifications\n\nLocal notifications are a way for an application that is not running in the foreground to let\nusers know that it has information for them. When invoked, the application either displays a\nbanner message or an alert dialog with a **Close** button to dismiss and an **Open** button to bring the application\ninto the foreground. The application can also modify the icon badge, to show the\nnumber of pending notifications, and generate a sound.\n\nTo send a local notification, the application needs to:\n\n 1. Enroll the application to send local notifications with the\n method.\n 2. Schedule a local notification with the method.\n 3. Monitor the [notification](Titanium.App.iOS.notification) event to respond to the\n notification.\n\nFor instructions on sending local interactive notifications, see the\n[iOS Local Notifications guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/iOS_Local_Notifications.html).\n\n### Local Interactive Notifications\n\nYou can create interactive notifications, where users can respond to application notifications\nwithout launching the application to the foreground. The user needs to reveal notification\nactions in the notification, then press a notification action to respond to the notification.\n\nTo create an interactive notification, the application needs to:\n\n 1. Create and configure notification actions with the\n method.\n 2. Create notification categories and assign notification actions to them\n with the method.\n 3. Register the notification categories with the\n method.\n 4. Monitor the [localnotificationaction](Titanium.App.iOS.localnotificationaction) event.\n\nFor instructions on sending local interactive notifications, see the\n[iOS Local Notifications guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Notification_Services/iOS_Local_Notifications.html).\n\n### Background Downloads\n\nIn iOS 7, Apple introduced new background execution modes which allow the application to download\ncontent in the background. These background modes are supported in Titanium SDK 3.2.0 and later.\n\nFor more information on getting started, refer to the\n[iOS Background Services guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Platform_API_Deep_Dives/iOS_API_Deep_Dives/iOS_Background_Services.html).\n\n### Handoff User Activities\n\nHandoff allows you to create and transfer user activities from one device to another. For example, you can start editing\na document on your phone, then transfer the activity to your iPad to continue editing the document.\n\nTo make an activity shareable, use the API to create the activity.\nTo continue the activity on another device, listen for the\n[continueactivity](Titanium.App.iOS.continueactivity) event.\n\n### Index Application Content\n\nIn iOS 9 and later, Apple lets you index application content, such as music, videos, images and documents, to allow it\nto be searched in iOS Spotlight. To effectively add and remove information from the iOS search index\nyou will need to use the following APIs:\n\n* - Used to create metadata related to the `Ti.App.iOS.SearchableItem`\n* - Used to assemble metadata into a unique object package to be used by `Ti.App.iOS.SearchableIndex`\n* - Used to add and remove `Ti.App.iOS.SearchableItem` objects to the device search index\n", - "events": [ - { - "name": "notification", - "summary": "Fired when a local notification is received by the application.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "alertAction", - "summary": "Alert button text ('View', by default) or slider text ('slide to unlock...', by default).\n", - "type": "String" - }, - { - "name": "alertBody", - "summary": "Alert message.", - "type": "String" - }, - { - "name": "alertLaunchImage", - "summary": "Image displayed instead of `Default.png` when launching the application.", - "type": "String" - }, - { - "name": "badge", - "summary": "Application badge value.", - "type": "Number" - }, - { - "name": "date", - "summary": "Date and time when the notification was configured to fire.", - "type": "Date" - }, - { - "name": "sound", - "summary": "Name of the sound file configured to play when the notification was fired.", - "type": "String" - }, - { - "name": "timezone", - "summary": "Timezone of the date when the notification was configured to fire. Available in Titanium SDK 7.4.0+.", - "type": "String" - }, - { - "name": "userInfo", - "summary": "Custom data object.", - "type": "Dictionary" - }, - { - "name": "inBackground", - "summary": "Boolean indicating if notification was received while app was in background. Available in Titanium SDK 6.2.0.\nOn iOS 10+ this is no longer available since this event will only fire if the app is in foreground.\n", - "type": "Boolean" - }, - { - "name": "threadIdentifier", - "summary": "The unique identifier for the thread or conversation related to this notification request.\nIt will be used to visually group notifications together. Available in Titanium SDK 7.5.0+ and iOS 10+.\n", - "type": "String" - }, - { - "name": "category", - "summary": "The identifier of the app-defined [category object](Titanium.App.iOS.UserNotificationCategory). Available in Titanium SDK 7.5.0+ and iOS 10+.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "localnotificationaction", - "summary": "Fired when a user selects an action for an interactive local notification.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "alertAction", - "summary": "Alert button text ('Open', by default) or slider text ('slide to unlock...', by default).\n", - "type": "String" - }, - { - "name": "alertBody", - "summary": "Alert message.", - "type": "String" - }, - { - "name": "alertLaunchImage", - "summary": "Image displayed instead of `Default.png` when launching the application.", - "type": "String" - }, - { - "name": "badge", - "summary": "Application badge value.", - "type": "Number" - }, - { - "name": "date", - "summary": "Date and time when the notification was configured to fire.", - "type": "Date" - }, - { - "name": "identifier", - "summary": "Identifier of the action that was selected of the interactive notification.", - "type": "String" - }, - { - "name": "sound", - "summary": "Path to the sound file configured to play when the notification was fired.", - "type": "String" - }, - { - "name": "timezone", - "summary": "Timezone of the date when the notification was configured to fire.", - "type": "String" - }, - { - "name": "typedText", - "summary": "User input if the notification used the `USER_NOTIFICATION_BEHAVIOR_TEXTINPUT` behavior.", - "type": "String" - }, - { - "name": "userInfo", - "summary": "Custom data object.", - "type": "Dictionary" - }, - { - "name": "inBackground", - "summary": "Boolean indicating if notification was received while app was in background (since Titanium SDK 6.2.0).\nOn iOS 10+ this is no longer available since the event will only fire when opening the app after interacting\nwith a notification from the iOS notification center (which means the app was in background when the\nnotification was received).\n", - "type": "Boolean" - }, - { - "name": "threadIdentifier", - "summary": "The unique identifier for the thread or conversation related to this notification request.\nIt will be used to visually group notifications together. Available in Titanium SDK 7.5.0+ and iOS 10+.\n", - "type": "String" - }, - { - "name": "category", - "summary": "The identifier of the app-defined [category object](Titanium.App.iOS.UserNotificationCategory). Available in Titanium SDK 7.5.0+ and iOS 10+.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "remotenotificationaction", - "summary": "Fired when a user selects an action for an interactive remote notification.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "data", - "summary": "The payload passed to the Apple Push Notification Service.", - "type": "Dictionary" - }, - { - "name": "category", - "summary": "Identifier of the category of the interactive notification.", - "type": "String" - }, - { - "name": "identifier", - "summary": "Identifier of the action that was selected of the interactive notification.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "backgroundfetch", - "summary": "Fired when the application is woken up for a fetch operation. Available only on iOS 7 and later.", - "description": "Add this event if your app supports the `fetch` UIBackground mode. When an opportunity arises to\ndownload data, the system fires this event to give your app a chance to download any data it needs.\nYour callback of this event should download the data, prepare that data for use, and call the\n[endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method with the `handlerID` parameter from this event.\n\nWhen this event is fired, your app has up to 30 seconds of wall-clock time to perform the download\noperation and call the `endBackgroundHandler` method. In practice,\nyour app should call the `endBackgroundHandler` method as soon as possible\nafter initiating the download. If you do not call the `endBackgroundHandler` method in time, your app is suspended.\nMore importantly, the system uses the elapsed time to calculate power usage and data costs for your\napp's background downloads. If your app takes a long time to call `endBackgroundHandler` method, it may be given fewer\nfuture opportunities to fetch data in the future.\n\nIf you are downloading large content, initiate the download using a\n[urlSession](Modules.URLSession) background download task, then call the `endBackgroundHandler` method.\nListen for the [downloadcompleted](Titanium.App.iOS.downloadcompleted) event to prepare the data for use.\n\nThe event returns the dictionary containing the `handlerID` property, which is a unique handler ID for the\ncurrent event. This identifier should be passed as the argument to the\n[endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "handlerId", - "summary": "Unique string identifier for the `backgroundfetch` event. This identifier should be passed as the argument\nto the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method.\n", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "silentpush", - "summary": "Fired when the application is woken up by a silent remote notification. Available only on iOS 7 and later.", - "description": "Add this event if your app supports the `remote-notification` UIBackground mode.\nThis event is intended as a means for apps to minimize the time that elapses between\nthe user seeing a push notification and the app displaying the associated data.\nWhen a push notification arrives, the system displays the notification to the user and\nlaunches the app in the background (if needed) so that it can call this event.\nUse this event to download any data related to the push notification. When your method\nis done, call the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method with\n`handlerID` parameter from this event.\n\nThe system fires this event regardless of the state of your app. If your app is suspended\nor not running, the system wakes up or launches your app and puts it into the background\nrunning state before firing the event.\n\nWhen this event is fired, your app has up to 30 seconds of wall-clock time to perform the download\noperation and call the `endBackgroundHandler` method. In practice,\nyour app should call the `endBackgroundHandler` method as soon as possible\nafter initiating the download. If you do not call the `endBackgroundHandler` method in time, your app is suspended.\nMore importantly, the system uses the elapsed time to calculate power usage and data costs for your\napp's background downloads. If your app takes a long time to call `endBackgroundHandler` method, it may be given fewer\nfuture opportunities to fetch data in the future.\n\nIf you are downloading large content, initiate the download using a\n[urlSession](Modules.URLSession) background download task, then call the `endBackgroundHandler` method.\nListen for the [downloadcompleted](Titanium.App.iOS.downloadcompleted) event to prepare the data for use.\n\nThe event returns the dictionary containing the `handlerID` property, which is a unique handler ID for the\ncurrent event. This identifier should be passed as the argument to the\n[endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method.\n\nYou can send extra information with a silent push using extra:\n\n``` js\n{\n aps: {\n 'content-available': 1\n },\n extra: {\n foo: 'bar'\n }\n}\n```\n\nIn the event handler for silentpush, your code may look something like this:\n``` json\n{\n \"handlerId\": \"SilentPush-1415976886.375816\",\n \"aps\": {\n \"content-available\": 1,\n },\n \"extra\": {\n \"foo\": \"bar\"\n },\n \"bubbles\": true,\n \"type\": \"silentpush\",\n \"source\": {},\n \"cancelBubble\": false\n}\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "handlerId", - "summary": "Unique string identifier for the `silentpush` event. This identifier should be passed as the argument\nto the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method.\n", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "backgroundtransfer", - "summary": "Fired when the events related to a [urlSession](Modules.URLSession) are waiting to be processed.\nAvailable only on iOS 7 and later.\n", - "description": "The app fires this events when all background transfers associated with a `urlSession` object\nhave finished or failed. Use this method to reconnect any `urlSession`s and to update your\napp's user interface. For example, you might use this method to update progress indicators\nor to incorporate new content into your views. After processing the events, call the\n[endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method with the `handlerID`\nparameter. If a `urlSession` finishes its work when your app is not running, the system\nlaunches your app in the background so that it can process the event. In that situation,\nuse the provided identifier to create a new `urlSessionConfiguration` and `urlSession` objects.\nUpon creating urlSession object, that object calls the appropriate delegate methods to\nprocess the events.\n\nIf your app already has a session object with the specified identifier and is running or suspended,\nyou do not need to create a new session object using this method. Suspended apps are moved into the\nbackground. As soon as the app is running again, the `urlSession` object with the identifier receives\nthe events and processes them normally.\n\nAt launch time, the app does not call this method if there are uploads or downloads in progress.\nIf you want to display the current progress of those transfers in your app's user\ninterface, you must recreate the session object yourself. In that situation, cache the session\nidentifier value persistently and use it to recreate your session object.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "handlerId", - "summary": "Unique string identifier for the `backgroundtransfer` event. This identifier should be passed as the argument\nto the [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler) method.\n", - "type": "String" - }, - { - "name": "sessionId", - "summary": "The identifier of the URL session requiring attention. If your app was just launched,\nyou can use this identifier to create a new `urlSession` object that can receive the events.\n", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "downloadprogress", - "summary": "Fired periodically to inform the app about the download's progress of a [urlSession](Modules.URLSession).\nAvailable only on iOS 7 and later.\n", - "description": "This event only needs to be used if your app is using the `urlSession` module to download data.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "taskIdentifier", - "summary": "The `urlSession` download task's identifier.", - "type": "Number" - }, - { - "name": "sessionIdentifier", - "summary": "The `urlSession` session identifier. If it does not exist, this property is not provided.\nThis property is available since Titanium Mobile 5.4.0.GA.\n", - "type": "String" - }, - { - "name": "bytesWritten", - "summary": "The number of bytes transferred since the last time this event was fired.", - "type": "Number" - }, - { - "name": "totalBytesWritten", - "summary": "The total number of bytes transferred so far.", - "type": "Number" - }, - { - "name": "totalBytesExpectedToWrite", - "summary": "The expected length of the file, as provided by the Content-Length header. If this\nheader was not provided, the value is zero.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "uploadprogress", - "summary": "Fired periodically to inform the app about the upload's progress of a [urlSession](Modules.URLSession).\nAvailable only on iOS 7 and later.\n", - "description": "This event only needs to be used if your app is using the `urlSession` module to upload data.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "taskIdentifier", - "summary": "The `urlSession` upload task's identifier.", - "type": "Number" - }, - { - "name": "sessionIdentifier", - "summary": "The `urlSession` session identifier. If it does not exist, this property is not provided.\nThis property is available since Titanium Mobile 5.4.0.GA.\n", - "type": "String" - }, - { - "name": "bytesSent", - "summary": "The number of bytes transferred since the last time this event was fired.", - "type": "Number" - }, - { - "name": "totalBytesSent", - "summary": "The total number of bytes transferred so far.", - "type": "Number" - }, - { - "name": "totalBytesExpectedToSend", - "summary": "The expected length of the file, as provided by the Content-Length header. If this\nheader was not provided, the value is zero.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "downloadcompleted", - "summary": "Fired to indicate that a [urlSession's](Modules.URLSession) download task has finished downloading.\nAvailable only on iOS 7 and later.\n", - "description": "This event only needs to be used if your app is using the `urlSession` module to download data.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "taskIdentifier", - "summary": "The `urlSession` download task's identifier.", - "type": "Number" - }, - { - "name": "sessionIdentifier", - "summary": "The `urlSession` session identifier. If it does not exist, this property is not provided.\nThis property is available since Titanium Mobile 5.4.0.GA.\n", - "type": "String" - }, - { - "name": "data", - "summary": "The downloaded data as a Titanium.Blob object.", - "type": "Titanium.Blob" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "sessioncompleted", - "summary": "Fired to indicate that a [urlSession](Modules.URLSession) task finished transferring data.\nAvailable only on iOS 7 and later.\n", - "description": "This event only needs to be used if your app is using the `urlSession` module to download or upload data.\n\nServer errors are not reported through the error parameter. The only error events sent\nthrough the error parameter are client-side errors, such as being unable to resolve\nthe hostname or connect to the host.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "taskIdentifier", - "summary": "The `urlSession` download task's identifier.", - "type": "Number" - }, - { - "name": "sessionIdentifier", - "summary": "The `urlSession` session identifier. If it does not exist, this property is not provided.\nThis property is available since Titanium Mobile 5.4.0.GA.\n", - "type": "String" - }, - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns true if download succeeded, false otherwise.", - "type": "Boolean" - }, - { - "name": "errorCode", - "summary": "The error code of the error, if any (potentially system-dependent).", - "type": "Number" - }, - { - "name": "message", - "summary": "A string containing the localized description of the error.\nThis property does not exist if errorCode is 0, which means there is no error.\n", - "type": "String" - }, - { - "name": "responseText", - "summary": "The response text for [task](Modules.URLSession.task) and [uploadTask](Modules.URLSession.uploadTask).\nThis property does not exist for download task. For download task response,\nuse [downloadcompleted](Titanium.App.iOS.downloadcompleted) event.\n", - "type": "String" - }, - { - "name": "statusCode", - "summary": "The response status code for tasks.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "sessioneventscompleted", - "summary": "Fired to indicate that all messages enqueued for a [urlSession](Modules.URLSession) have been delivered.\nAvailable only on iOS 7 and later.\n", - "description": "This event only needs to be used if your app is using the `urlSession` module to download data.\n\nIn iOS, when a background transfer completes and if your app is no longer running, your app\nis automatically relaunched in the background, and the app fires the [backgroundtransfer](Titanium.App.iOS.backgroundtransfer) event.\nThis event should contain the identifier of the session that caused your app to be launched.\nYour app should then store that `handlerID` before creating a background session configuration object\nwith the same identifier, and creating a URL session object with that configuration.\nThe newly created session is automatically reassociated with ongoing background activity.\n\nWhen your app later receives a `sessioneventscompleted` event, this indicates that\nall messages previously enqueued for this session have been delivered, and that it\nis now safe to invoke [endBackgroundHandler](Titanium.App.iOS.endBackgroundHandler)\nmethod with the `handlerID` or to begin any internal updates that may result in invoking\nthis method.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "sessionIdentifier", - "summary": "The `urlSession` session identifier. If it does not exist, this property is not provided.\nThis property is available since Titanium Mobile 5.4.0.GA.\n", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "usernotificationsettings", - "summary": "Fired when the user notification settings are registered.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "types", - "summary": "Notification types the application is registered to use.", - "type": "Array" - }, - { - "name": "categories", - "summary": "Set of categories of user notification actions the application is registered to use.", - "type": "Array" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "watchkitextensionrequest", - "deprecated": { - "notes": "Use [Titanium.WatchSession](Titanium.WatchSession) instead, which is supported on iOS 9 and later.\n", - "since": "5.0.0" - }, - "summary": "Fired when openParentApplication:reply is called from a WatchKit extension. Available only on iOS 8.2 and later.", - "description": "Add this event if your Titanium application if you are using a WatchKit extension. When your WatchKit extension uses the openParentApplication:reply\nmethod your Titanium application will be opened in the background and provides your Titanium app the information from the extension. When this\nevent is fired you must provide a reply by calling the [sendWatchExtensionReply](Titanium.App.iOS.sendWatchExtensionReply) method with\nthe `handlerID` parameter from this event.\n\nThe event returns the dictionary containing the `handlerID` property, which is a unique handler ID for the\ncurrent event and the `userInfo` property, containing the dictionary passed from the WatchKit extension. The `handlerID` identifier\nmust be passed as the an argument to the [sendWatchExtensionReply](Titanium.App.iOS.sendWatchExtensionReply) method.\n\n``` js\nTi.App.iOS.addEventListener(\"watchkitextensionrequest\",function(e){\n var replyContent = {foo:\"bar\"};\n Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);\n});\n```\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "handlerId", - "summary": "Unique string identifier for the `watchkitextensionrequest` event. This identifier should be passed an argument\nto the [sendWatchExtensionReply](Titanium.App.iOS.sendWatchExtensionReply) method.\n", - "type": "String" - }, - { - "name": "userInfo", - "summary": "The payload passed to the `openParentApplication:reply` method from the WatchKit extension.\n", - "type": "Dictionary" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "continueactivity", - "summary": "Fired when iOS continueactivity calls `continueUserActivity`.", - "description": "Add this event if your Titanium application if you are responding to an iOS Handoff or Core Spotlight `continueUserActivity` request. This event will\nfire when a user taps on the handoff icon or the Core Spotlight search item. Your Titanium application will be opened in the background and provides\nyour Titanium app the information from the NSUserActivity. When this event is fired you should implement logic within your application to allow the\nuser to pick-up from where they left off on their other device.\n\n``` js\nTi.App.iOS.addEventListener(\"continueactivity\", function(e) {\n console.log('activityType: '' + e.activityType);\n});\n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "activityType", - "summary": "Unique string identifier for the handoff user activity. The identifier must be defined in your `tiapp.xml` file.\n", - "type": "String" - }, - { - "name": "searchableItemActivityIdentifier", - "summary": "With field will contain the searchable Unique Identifier if the continueactivity is fired from a Core Spotlight search result.\n", - "type": "String" - }, - { - "name": "title", - "summary": "The optional title provided to the user activity or search item.\n", - "type": "String" - }, - { - "name": "webpageURL", - "summary": "The optional webpageURL provided to the user activity.\n", - "type": "String" - }, - { - "name": "userInfo", - "summary": "The optional userInfo provided to the user activity. The userInfo is a custom dictionary and can contain any information needed\nto create your handoff or Core Spotlight session.\n", - "type": "Dictionary" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "shortcutitemclick", - "summary": "Fired when a user taps the Application Shortcut.", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - } - ], - "properties": [ - { - "name": "itemtype", - "summary": "The unique identifier for the application shortcut.", - "type": "String" - }, - { - "name": "title", - "summary": "The title of the application shortcut.", - "type": "String" - }, - { - "name": "subtitle", - "summary": "The subtitle of the application shortcut.", - "type": "String" - }, - { - "name": "userInfo", - "summary": "The payload passed by the application shortcut.", - "type": "Dictionary" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "handleurl", - "summary": "Fired when a new URL is handled by the application.", - "description": "Incoming URL's can either be triggered by an external application or\nlinks inside your / .\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "launchOptions", - "summary": "The launch options that are related to opening the URL.", - "type": "LaunchOptionsType" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "traitcollectionchange", - "summary": "Fired when the trait collection of the device changes, e.g. the user interface style.", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "screenshotcaptured", - "deprecated": { - "notes": "Use [Titanium.App.screenshotcaptured](Titanium.App.screenshotcaptured) instead.", - "since": "13.1.0" - }, - "summary": "Fired after the user takes a screenshot, e.g. by pressing both the home and lock screen buttons.", - "platforms": [ - { - "since": "9.1.0", - "name": "iphone" - }, - { - "since": "9.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createUserDefaults", - "summary": "Creates and returns an instance of Titanium.App.iOS.UserDefaults.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by Titanium.App.iOS.UserDefaults except those marked not-creation or read-only.", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.App.iOS.UserDefaults" - } - }, - { - "name": "cancelAllLocalNotifications", - "deprecated": { - "notes": "Use [Titanium.App.iOS.UserNotificationCenter.removePendingNotifications](Titanium.App.iOS.UserNotificationCenter.removePendingNotifications) instead.", - "since": "7.3.0" - }, - "summary": "Cancels all scheduled local notifications.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "cancelLocalNotification", - "deprecated": { - "notes": "Use [Titanium.App.iOS.UserNotificationCenter.removePendingNotifications](Titanium.App.iOS.UserNotificationCenter.removePendingNotifications) instead.", - "since": "7.3.0" - }, - "summary": "Cancels a local notification.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Application-created ID of the local notification to cancel.\nTo create an ID for the notification, set the `id` property in the `userInfo` dictionary\npassed to the method.\n", - "type": [ - "Number", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "registerBackgroundService", - "summary": "Registers a service to run when the application is placed in the background.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Parameters used to create the service. Must include a `url` property, to specify the\nlocal JavaScript file to execute when the application is placed in the background.\n", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.App.iOS.BackgroundService" - } - }, - { - "name": "registerUserNotificationSettings", - "summary": "Registers the application to use the requested notification types and categories.\n", - "description": "Call this method at application start up. If the application needs to register for remote\nnotifications, call this method before calling\n[Titanium.Network.registerForPushNotifications](Titanium.Network.registerForPushNotifications).\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Parameters used to enroll the application in local notifications.", - "type": "UserNotificationSettings" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "scheduleLocalNotification", - "summary": "Schedule a local notification.", - "platforms": [ - { - "since": "1.5.0", - "name": "iphone" - }, - { - "since": "1.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Parameters used to create a notification.", - "type": "NotificationParams" - } - ], - "returns": { - "type": "Titanium.App.iOS.LocalNotification" - } - }, - { - "name": "setMinimumBackgroundFetchInterval", - "summary": "Specifies the minimum amount of time that must elapse between background fetch operations.\nAvailable only on iOS 7 and later.\n", - "description": "This property has no effect for apps that do not have the UIBackgroundModes key with\nthe fetch value in its Info.plist file. The default fetch interval for apps is\n. Therefore, you must call this\nmethod and set a fetch interval before your app is given background execution time.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fetchInterval", - "summary": "The minimum number of seconds that must elapse before another background fetch can be initiated.\nThis value is advisory only and does not indicate the exact amount of time expected between\nfetch operations.\n", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "endBackgroundHandler", - "summary": "Marks the end of the app execution after initiating the download operation. Available only on iOS 7 and later.", - "description": "When calling this method, pass in the `handlerID` value that initiated the background state.\nYou must call this handler after initiating the download operation and should do so as soon as possible.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "handlerID", - "summary": "Unique string identifier for the event (`backgroundfetch`, `silentpush` or `backgroundtransfer`)\nthat initiated the background operation mode.\n", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "sendWatchExtensionReply", - "deprecated": { - "notes": "Use [Titanium.WatchSession](Titanium.WatchSession) instead, which is supported on iOS 9 and later.\n", - "since": "5.0.0" - }, - "summary": "Marks the end of an `openParentApplication:reply` execution by a WatchKit extension.", - "description": "This method must be called after your Titanium application has finished processing the `watchkitextensionrequest` event. Optional\ninformation can be provided in the userInfo argument will be provided back to the WatchKit extension as part of the reply method.\nIf no userInfo is provide nil will be sent to the WatchKit extension to during the reply callback.\n\nThis method should be used as part of the `watchkitextensionrequest` event as shown below.\n\n``` js\nTi.App.iOS.addEventListener(\"watchkitextensionrequest\", function(e) {\n var replyContent = {foo: \"bar\"};\n Ti.App.iOS.sendWatchExtensionReply(e.handlerId,replyContent);\n});\n```\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "handlerId", - "summary": "Unique string identifier for the event (`watchkitextensionrequest`)\nthat initiated from the WatchKit extension calling the openParentApplication:reply method.\n", - "type": "String" - }, - { - "name": "userInfo", - "summary": "Custom data object which will be passed in the reply method to your WatchKit extension.\n", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createUserNotificationAction", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.App.iOS.UserNotificationAction" - } - }, - { - "name": "createUserNotificationCategory", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.App.iOS.UserNotificationCategory" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "EVENT_ACCESSIBILITY_LAYOUT_CHANGED", - "summary": "Convenience constant for system event \"accessibilitylayoutchanged\".", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "EVENT_ACCESSIBILITY_SCREEN_CHANGED", - "summary": "Convenience constant for system event \"accessibilityscreenchanged\".", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "BACKGROUNDFETCHINTERVAL_MIN", - "summary": "Use with [setMinimumBackgroundFetchInterval](Titanium.App.iOS.setMinimumBackgroundFetchInterval) method.\nSpecifies the smallest fetch interval supported by the system.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "BACKGROUNDFETCHINTERVAL_NEVER", - "summary": "Use with [setMinimumBackgroundFetchInterval](Titanium.App.iOS.setMinimumBackgroundFetchInterval) method.\nUsed to specify a fetch interval large enough to prevent fetch operations from occurring.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_NONE", - "summary": "The application may not present any UI upon a notification being received.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_BADGE", - "summary": "The application may badge its icon upon a notification being received.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_SOUND", - "summary": "The application may play a sound upon a notification being received.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_ALERT", - "summary": "The application may display an alert upon a notification being received.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_CRITICAL_ALERT", - "summary": "The ability to play sounds for critical alerts.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_PROVISIONAL", - "summary": "The ability to post non-interrupting notifications provisionally to the Notification Center.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_TYPE_PROVIDES_APP_NOTIFICATION_SETTINGS", - "summary": "An option indicating the system should display a button for in-app notification settings.\nUse with the [types](UserNotificationSettings.types) property.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_ACTIVATION_MODE_BACKGROUND", - "summary": "The action will execute in background. Use with the\n[activationMode](Titanium.App.iOS.UserNotificationAction.activationMode) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_ACTIVATION_MODE_FOREGROUND", - "summary": "The action will launch the application and execute in the foreground.\nUse with the [activationMode](Titanium.App.iOS.UserNotificationAction.activationMode) property.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_BEHAVIOR_DEFAULT", - "summary": "Default action behavior with no additional action support.\n", - "description": "Use with the [behavior](Titanium.App.iOS.UserNotificationAction.behavior) property.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_BEHAVIOR_TEXTINPUT", - "summary": "Provides a textfield with the notification for the user to enter a text response.\n", - "description": "The user input will be passed to the `typedText` field of the object passed to the callback\nhandling the `localnotification` event.\n\nUse with the [behavior](Titanium.App.iOS.UserNotificationAction.behavior) property.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_AUTHORIZATION_STATUS_NOT_DETERMINED", - "summary": "The user has not yet made a choice regarding whether the application may post\nuser notifications.\n", - "description": "Used to check the `authorizationStatus` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_AUTHORIZATION_STATUS_AUTHORIZED", - "summary": "The application is authorized to post user notifications.", - "description": "Used to check the `authorizationStatus` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_AUTHORIZATION_STATUS_DENIED", - "summary": "The application is not authorized to post user notifications.", - "description": "Used to check the `authorizationStatus` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_AUTHORIZATION_STATUS_PROVISIONAL", - "summary": "The application is provisionally authorized to post non-interruptive user notifications.", - "description": "Used to check the `authorizationStatus` attribute received in\n.\n", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_SETTING_NOT_SUPPORTED", - "summary": "The application does not support this notification type.", - "description": "Used to check application-wide enabled notification settings received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_SETTING_ENABLED", - "summary": "The notification setting is turned on.", - "description": "Used to check application-wide enabled notification settings received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_SETTING_DISABLED", - "summary": "The notification setting is turned off.", - "description": "Used to check application-wide enabled notification settings received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_ALERT_STYLE_NONE", - "summary": "No banner or alert dialog is presented when the notification is received.", - "description": "Used to check the `alertStyle` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_ALERT_STYLE_ALERT", - "summary": "A alert dialog is presented when the notification is received.", - "description": "Used to check the `alertStyle` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_ALERT_STYLE_BANNER", - "summary": "A banner is presented when the notification is received.", - "description": "Used to check the `alertStyle` attribute received in\n.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_CATEGORY_OPTION_NONE", - "summary": "No options.", - "description": "Used in the `options` attribute when creating a .\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_CATEGORY_OPTION_CUSTOM_DISMISS_ACTION", - "summary": "Send dismiss actions to the UNUserNotificationCenter object's delegate for handling.", - "description": "Used in the `options` attribute when creating a .\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_CATEGORY_OPTION_ALLOW_IN_CARPLAY", - "summary": "Allow CarPlay to display notifications of this type.", - "description": "Used in the `options` attribute when creating a .\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_CATEGORY_OPTION_HIDDEN_PREVIEWS_SHOW_TITLE", - "summary": "Show the notification's title, even if the user has disabled notification previews for the app.", - "description": "Used in the `options` attribute when creating a .\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_NOTIFICATION_CATEGORY_OPTION_HIDDEN_PREVIEWS_SHOW_SUBTITLE", - "summary": "Show the notification's subtitle, even if the user has disabled notification previews for the app.", - "description": "Used in the `options` attribute when creating a .\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_INTERFACE_STYLE_UNSPECIFIED", - "deprecated": { - "notes": "Use instead, which is supported cross-platform.", - "since": "9.1.0" - }, - "summary": "An unspecified interface style.", - "description": "Used in the `userInterfaceStyle` property.", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_INTERFACE_STYLE_LIGHT", - "deprecated": { - "notes": "Use instead, which is supported cross-platform.", - "since": "9.1.0" - }, - "summary": "A light interface style.", - "description": "Used in the `userInterfaceStyle` property.", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "USER_INTERFACE_STYLE_DARK", - "deprecated": { - "notes": "Use instead, which is supported cross-platform.", - "since": "9.1.0" - }, - "summary": "A dark interface style.", - "description": "Used in the `userInterfaceStyle` property.", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "UTTYPE_TEXT", - "summary": "Uniform type identifier for all text types.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.text" - }, - { - "name": "UTTYPE_PLAIN_TEXT", - "summary": "Uniform type identifier for a plain text type, equivalent to MIME type text/plain.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.plain-text" - }, - { - "name": "UTTYPE_UTF8_PLAIN_TEXT", - "summary": "Uniform type identifier for Unicode-8 plain text type.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.utf8-plain-text" - }, - { - "name": "UTTYPE_UTF16_EXTERNAL_PLAIN_TEXT", - "summary": "Uniform type identifier for Unicode-16 with byte-order mark (BOM), or if BOM is not present,\nan external representation byte order (big-endian).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "UTTYPE_UTF16_PLAIN_TEXT", - "summary": "Uniform type identifier for Unicode-16, native byte order, with an optional byte-order mark (BOM).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "UTTYPE_RTF", - "summary": "Uniform type identifier for Rich Text.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.rtf" - }, - { - "name": "UTTYPE_HTML", - "summary": "Uniform type identifier for HTML.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.html" - }, - { - "name": "UTTYPE_XML", - "summary": "Uniform type identifier for XML.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.xml" - }, - { - "name": "UTTYPE_PDF", - "summary": "Uniform type identifier for PDF data.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.adobe.pdf" - }, - { - "name": "UTTYPE_RTFD", - "summary": "Uniform type identifier for Rich Text Format Directory, that is, Rich Text with content embedding, on-disk format.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.rtfd" - }, - { - "name": "UTTYPE_FLAT_RTFD", - "summary": "Uniform type identifier for Rich Text with content embedding, pasteboard format.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.flat-rtfd" - }, - { - "name": "UTTYPE_TXN_TEXT_AND_MULTIMEDIA_DATA", - "summary": "Uniform type identifier for MLTE (Textension) format for mixed text and multimedia data.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "UTTYPE_WEB_ARCHIVE", - "summary": "Uniform type identifier for WebKit webarchive format.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.webarchive" - }, - { - "name": "UTTYPE_IMAGE", - "summary": "Uniform type identifier for all image types.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.image" - }, - { - "name": "UTTYPE_JPEG", - "summary": "Uniform type identifier for JPEG images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.jpeg" - }, - { - "name": "UTTYPE_JPEG2000", - "summary": "Uniform type identifier for JPEG 2000 images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.jpeg-2000" - }, - { - "name": "UTTYPE_TIFF", - "summary": "Uniform type identifier for TIFF images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.tiff" - }, - { - "name": "UTTYPE_PICT", - "summary": "Uniform type identifier for PICT images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.pict" - }, - { - "name": "UTTYPE_GIF", - "summary": "Uniform type identifier for GIF images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.compuserve.gif" - }, - { - "name": "UTTYPE_PNG", - "summary": "Uniform type identifier for PNG images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.png" - }, - { - "name": "UTTYPE_QUICKTIME_IMAGE", - "summary": "Uniform type identifier for QuickTime images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.quicktime-image" - }, - { - "name": "UTTYPE_APPLE_ICNS", - "summary": "Uniform type identifier for macOS icon images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.icns" - }, - { - "name": "UTTYPE_BMP", - "summary": "Uniform type identifier for Windows bitmap images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.microsoft.bmp" - }, - { - "name": "UTTYPE_ICO", - "summary": "Uniform type identifier for Windows icon images.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.microsoft.ico" - }, - { - "name": "UTTYPE_MOVIE", - "summary": "Uniform type identifier for all audiovisual content.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.movie" - }, - { - "name": "UTTYPE_VIDEO", - "summary": "Uniform type identifier for all video content without audio.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.video" - }, - { - "name": "UTTYPE_AUDIO", - "summary": "Uniform type identifier for all audio content.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.audio" - }, - { - "name": "UTTYPE_QUICKTIME_MOVIE", - "summary": "Uniform type identifier for QuickTime movies.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.quicktime-movie" - }, - { - "name": "UTTYPE_MPEG", - "summary": "Uniform type identifier for MPEG-1 and MPEG-2 content.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.mpeg" - }, - { - "name": "UTTYPE_MPEG4", - "summary": "Uniform type identifier for MPEG-4 content.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.mpeg-4" - }, - { - "name": "UTTYPE_MP3", - "summary": "Uniform type identifier for MP3 audio.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.mp3" - }, - { - "name": "UTTYPE_MPEG4_AUDIO", - "summary": "Uniform type identifier for MPEG-4 audio.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.mpeg-4-audio" - }, - { - "name": "UTTYPE_APPLE_PROTECTED_MPEG4_AUDIO", - "summary": "Uniform type identifier for Apple-protected MPEG-4 audio.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "currentUserNotificationSettings", - "deprecated": { - "notes": "Use [Titanium.App.iOS.UserNotificationCenter.requestUserNotificationSettings](Titanium.App.iOS.UserNotificationCenter.requestUserNotificationSettings) instead.", - "since": "7.3.0" - }, - "summary": "Notification types and user notification categories the application is registered to use.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "UserNotificationSettings", - "permission": "read-only" - }, - { - "name": "supportedUserActivityTypes", - "summary": "Provides an Array of the NSUserActivityTypes keys defined within your Titanium project.\n", - "description": "Used to obtain a list of the NSUserActivityTypes keys defined in your Titanium project's tiapp.xml file.\nThese NSUserActivityTypes keys are the keys which you can use working with iOS Titanium User Activities.\nNSUserActivityTypes must be defined at build time in your tiapp.xml file as shown below:\n\n``` xml\n\n \n \n NSUserActivityTypes\n \n com.setdirection.home\n com.setdirection.shelf\n com.setdirection.item\n \n \n \n \n```\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "applicationOpenSettingsURL", - "summary": "Returns a URL to open the app's settings.", - "description": "Used to create a URL that you can pass to the [openURL](Titanium.Platform.openURL) method.\nWhen you open the URL built from this string, the system launches the Settings app and displays the app's custom settings, if it has any.\n\n``` js\nvar settingsURL = Ti.App.iOS.applicationOpenSettingsURL;\nif (Ti.Platform.canOpenURL(settingsURL)) {\n Ti.Platform.openURL(settingsURL);\n}\n```\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "userInterfaceStyle", - "deprecated": { - "notes": "Use instead, which is supported cross-platform.", - "since": "9.1.0" - }, - "summary": "The style associated with the user interface.", - "description": "Use this property to determine whether your interface should be configured with a dark or light appearance.\nThe default value of this trait is set to the corresponding appearance setting on the user's device.\n", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.App.iOS.USER_INTERFACE_STYLE_UNSPECIFIED", - "Titanium.App.iOS.USER_INTERFACE_STYLE_LIGHT", - "Titanium.App.iOS.USER_INTERFACE_STYLE_DARK" - ] - } - ] - }, - "NotificationParams": { - "name": "NotificationParams", - "summary": "Dictionary object of parameters used to create a notification using\n.\n", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml", - "properties": [ - { - "name": "identifier", - "summary": "The notification identifier.", - "description": "This property is required in iOS 10+ and will fallback to a generated\nUUID-string if not set. It is recommended to manage the identifier\nyourself, but you can also get the generated UUID by accessing via\nthe \"userInfo.id\" field for parity with older iOS versions.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false - }, - { - "name": "alertAction", - "summary": "Alert button text ('Open', by default) or home text ('Press Home to unlock', by default)\nto display.\n", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "alertBody", - "summary": "Alert message to display.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "alertTitle", - "summary": "Alert title to display.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "alertSubtitle", - "summary": "Alert subtitle to display.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "alertLaunchImage", - "summary": "Image to display instead of `Default.png` when launching the application.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "attachments", - "summary": "Notification attachments to display.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "optional": true - }, - { - "name": "badge", - "summary": "Application badge value.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "optional": true - }, - { - "name": "category", - "summary": "String identifier of category of actions to be displayed for an interactive notification.\n", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "date", - "summary": "Date and time for the notification to occur.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "repeat", - "summary": "Interval to repeat the notification. One of `weekly`, `daily`, `yearly,` `monthly`.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "sound", - "summary": "Path to the sound file to play when notification occurs, relative to the `Resources` folder.\n", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "timezone", - "summary": "Timezone of the date configured for the notification. If not set, the system timezone is used.\n", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "userInfo", - "summary": "Data to pass to the application with the notification event.", - "platforms": [ - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary", - "optional": true - }, - { - "name": "region", - "summary": "Region the notification will be triggered in. Allowed parameter are:\n\n- `latitude`: Latitude of the location center, in decimal degrees (required).\n- `longitude`: Longitude of the location center, in decimal degrees (required).\n- `triggersOnce`: Whether or not the notification will only fire once (optional, default: true).\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary", - "optional": true - }, - { - "name": "summaryArgument", - "summary": "The string the notification adds to the category's summary format string.", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "summaryArgumentCount", - "summary": "The number of items the notification adds to the category's summary format string.", - "platforms": [ - { - "since": "7.4.0", - "name": "iphone" - }, - { - "since": "7.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "UserNotificationAttachment": { - "name": "UserNotificationAttachment", - "summary": "Provide at least the property `identifier` and `url` property to identify a local\nimage, sound or video. If your media is invalid, the API will throw an error log and\nskip the invalid attachment.\n", - "extends": "Object", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml", - "properties": [ - { - "name": "identifier", - "summary": "The identifier of this attachment.", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false - }, - { - "name": "url", - "summary": "The URL to the attachment's data. If you have obtained this attachment from\nthe notification-center then the URL will be security-scoped.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false - }, - { - "name": "options", - "summary": "An additional dictionary of options to provide.", - "description": "Allowed options are:\n * `typeHint` - File type hint (String)\n * `clipping` - Clipping enabled or not (Boolean)\n * `thumbnailHidden` - Thumbnail hidden or not (Boolean)\n * `thumbnailTime` - Video frame in milliseconds (Number)\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary", - "optional": true - } - ] - }, - "LaunchOptionsType": { - "name": "LaunchOptionsType", - "summary": "Dictionary object of parameters used to identify an incoming URL that is handled\nby the application.\n", - "extends": "Object", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml", - "properties": [ - { - "name": "source", - "summary": "The application or service that triggered the handled URL.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "url", - "summary": "The URL that was triggered by the application or service.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "UserNotificationSettings": { - "name": "UserNotificationSettings", - "summary": "Dictionary object of parameters used to register the application with local notifications using\nthe method.\n\nTo retrieve the current notification settings, use the\n method.\n", - "extends": "Object", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/App/iOS/iOS.yml", - "properties": [ - { - "name": "types", - "summary": "Notification types to use.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_NONE", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_BADGE", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_SOUND", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_ALERT", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_CRITICAL_ALERT", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_PROVISIONAL", - "Titanium.App.iOS.USER_NOTIFICATION_TYPE_PROVIDES_APP_NOTIFICATION_SETTINGS" - ] - }, - { - "name": "categories", - "summary": "Set of categories of user notification actions required by the application to use.", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ] - }, - "Titanium.Blob": { - "name": "Titanium.Blob", - "summary": "A container for binary data.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Blob.yml", - "description": "A `Blob` represents a chunk of binary information, often obtained through\nan [HTTPClient](Titanium.Network.HTTPClient) or by reading a [File](Titanium.Filesystem.File).\n\nBlobs are often used to store text or image data.\nThe `Blob` object includes a number of properties and methods specific to image blobs.\n\nAndroid supports an [append](Titanium.Blob.append) method, but\notherwise blobs are immutable.\n\nThe module provides several utility methods for working with\nblobs, including methods for converting between blobs and Base64-encoded strings,\nand methods for generating SHA-1 and SHA-256 hashes and MD5 digests from blob data.\n\nThe [Buffer](Titanium.Buffer) object can also contain binary data, and is\nmore easily mutable. Extracting blob data to a buffer is somewhat roundabout:\n\n``` js\nvar blobStream = Ti.Stream.createStream({ source: myBlob, mode: Ti.Stream.MODE_READ });\nvar newBuffer = Ti.createBuffer({ length: myBlob.length });\nvar bytes = blobStream.read(newBuffer);\n```\n\nCreating a blob from a buffer is much easier:\n``` js\nvar newBlob = myBuffer.toBlob();\n```\n\nIn both cases, the conversion involves copying the data from one object to another, so\nyou should be conscious of the amount of the data being copied.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "toString", - "summary": "Returns a string representation of this blob.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "append", - "summary": "Appends the data from another blob to this blob.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "parameters": [ - { - "name": "blob", - "summary": "Blob to append to this blob.", - "type": "Titanium.Blob" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "imageAsCropped", - "summary": "Creates a new blob by cropping the underlying image to the specified dimensions.", - "description": "Returns the cropped image as a blob.\n\nIf this blob doesn't represent an image, returns `null`.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Image cropping options. properties are all optional for this use case.\n\nDefaults will be to use the current image's `height`/`width` and to center the cropped rectangle horizontally/vertically on the original image (`x`/`y`).\n", - "type": "Dimension" - } - ], - "returns": { - "summary": "Cropped image as a blob.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageAsResized", - "summary": "Creates a new blob by resizing and scaling the underlying image to the specified dimensions.", - "description": "Returns the resized image as a blob.\n\nIf this blob doesn't represent an image, returns `null`.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "width", - "summary": "Width to resize this image to.", - "type": "Number" - }, - { - "name": "height", - "summary": "Height to resize this image to.", - "type": "Number" - } - ], - "returns": { - "summary": "Resized image as a blob.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageAsCompressed", - "summary": "Creates a new blob by compressing the underlying image to the specified quality.", - "description": "Returns the compressed image as a blob.\n\nIf this blob doesn't represent an image, returns `null`.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "quality", - "summary": "Quality to compress this image to. From 0.0 (lowest quality) to 1.0 (highest quality).", - "type": "Number" - } - ], - "returns": { - "summary": "Compressed image as a blob.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageAsThumbnail", - "summary": "Returns a thumbnail version of the underlying image, optionally with a border and rounded corners.", - "description": "Returns the thumbnail image as a blob.\n\nIf this blob doesn't represent an image, returns `null`.\n\nThe final height/width of the image will actually be `size + (2 * borderSize)` as the border is added around the image.\nBy default the `borderSize` is `1`.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "size", - "summary": "Size of the thumbnail, in either width or height.", - "type": "Number" - }, - { - "name": "borderSize", - "summary": "Width of the thumbnail's border.", - "type": "Number", - "optional": true - }, - { - "name": "cornerRadius", - "summary": "Radius of the thumbnail's corners.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "The image thumbnail in a blob.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageWithAlpha", - "summary": "Returns a copy of the underlying image with an added alpha channel.", - "description": "Returns the new image as a blob, or `null` if this blob is not an image.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "The image with an alpha channel in a blob, or `null` if this blob is not an image.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageWithRoundedCorner", - "summary": "Returns a copy of the underlying image with rounded corners added.", - "description": "Returns the new image as a blob, or `null` if this blob is not an image.\nThe image will grow in height and width by `(2 * borderSize)` as the border is added around the image to avoid scaling.\nBy default the `borderSize` is `1`.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "cornerSize", - "summary": "Size of the rounded corners in pixels.", - "type": "Number" - }, - { - "name": "borderSize", - "summary": "Width of the border in pixels.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "Image with a rounded corner in a blob, or `null` if this blob is not an image.", - "type": "Titanium.Blob" - } - }, - { - "name": "imageWithTransparentBorder", - "summary": "Returns a copy of the underlying image with an added transparent border.", - "description": "Returns the new image as a blob, or `null` if this blob is not an image.\nThe image will grow in height and width by `(2 * borderSize)` as the border is added around the image to avoid scaling.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "size", - "summary": "Width of the transparent border in pixels.", - "type": "Number" - } - ], - "returns": { - "summary": "The image with a transparent border in a blob, or `null` if this blob is not an image.", - "type": "Titanium.Blob" - } - }, - { - "name": "toArrayBuffer", - "summary": "Returns an `ArrayBuffer` representation of this blob.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "ArrayBuffer" - } - }, - { - "name": "arrayBuffer", - "summary": "Returns a `Promise` that resolves with the contents of the blob as binary data contained in an `ArrayBuffer`.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Promise" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "file", - "summary": "File object represented by this blob, or `null` if this blob is not\nassociated with a file.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Filesystem.File", - "permission": "read-only" - }, - { - "name": "length", - "summary": "Length of this blob in bytes.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "text", - "summary": "UTF-8 string representation of the data in this blob.", - "description": "If this blob represents pure binary data, the value will be `null`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "mimeType", - "summary": "Mime type of the data in this blob.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "height", - "summary": "If this blob represents an image, this is the height of the image in pixels.", - "description": "If this blob doesn't represent an image, `height` is reported as 0.\n\n**NOTE 1**: On SDK versions prior to 9.1.0, Ti.Blob images may have reported in points, not pixels.\nThis would occur for images with a higher density/scale returned by or images with `@dx` density suffixes.\nYou may multiply by to try and determine the pixels, but this value may be off for some pixel/density combinations.\n(e.g. a `10px` image would report as `3` on a `3x` density screen, so multiplying would give you `9` pixels, which is still incorrect)\n\n**NOTE 2**: This represents the height the platform decodes the image to in memory. iOS will automatically\nrotate a JPEG based on its EXIF orientation when loaded into memory, but Android does not and instead\nrotates it when shown on-screen. You can read the [uprightHeight](Titanium.Blob.uprightHeight) to determine\nwhat the image height will be after rotation, if applicable.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "uprightHeight", - "summary": "If the blob references an image, this provides the height in pixels after factoring in EXIF orientation.", - "description": "The height of the image in pixels after rotating/flipping it based on its EXIF orientation,\nwhich is commonly the case with JPEGs. Will return the save value as the [height](Titanium.Blob.height)\nproperty if image does not have an EXIF orientation or if the orientation is already upright.\n\nOn iOS, properties [height](Titanium.Blob.height) and [uprightHeight](Titanium.Blob.uprightHeight) will always match.\nOn Android, these properties may differ when loading a JPEG since this platform does not automatically\nrotate the loaded image in memory, but it is rotated when displaying it on-screen.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "width", - "summary": "If this blob represents an image, this is the width of the image in pixels.", - "description": "If this blob doesn't represent an image, `width` is reported as 0.\n\n**NOTE 1**: On SDK versions prior to 9.1.0, Ti.Blob images may have reported in points, not pixels.\nThis would occur for images with a higher density/scale returned by or images with `@dx` density suffixes.\nYou may multiply by to try and determine the pixels, but this value may be off for some pixel/density combinations.\n(e.g. a `10px` image would report as `3` on a `3x` density screen, so multiplying would give you `9` pixels, which is still incorrect)\n\n**NOTE 2**: This represents the width the platform decodes the image to in memory. iOS will automatically\nrotate a JPEG based on its EXIF orientation when loaded into memory, but Android does not and instead\nrotates it when shown on-screen. You can read the [uprightWidth](Titanium.Blob.uprightWidth) to determine\nwhat the image width will be after rotation, if applicable.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "uprightWidth", - "summary": "If the blob references an image, this provides the width in pixels after factoring in EXIF orientation.", - "description": "The width of the image in pixels after rotating/flipping it based on its EXIF orientation,\nwhich is commonly the case with JPEGs. Will return the save value as the [width](Titanium.Blob.width)\nproperty if image does not have an EXIF orientation or if the orientation is already upright.\n\nOn iOS, properties [width](Titanium.Blob.width) and [uprightWidth](Titanium.Blob.uprightWidth) will always match.\nOn Android, these properties may differ when loading a JPEG since this platform does not automatically\nrotate the loaded image in memory, but it is rotated when displaying it on-screen.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "nativePath", - "summary": "If this blob represents a [File](Titanium.Filesystem.File), this is the file URL\nthat represents it.\n", - "description": "If this blob doesn't represent a file, the value of `nativePath` is `null`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "size", - "summary": "Size of the blob in pixels (for image blobs) or bytes (for all other blobs).\n", - "description": "If this blob represents an image, this is the total number of pixels in the image.\nOtherwise it returns the number of bytes in the binary data.\n", - "platforms": [ - { - "since": "7.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "EXIF rotation of the image if available. Can be `undefined` if no orientation was found.", - "platforms": [ - { - "since": "12.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.BlobStream": { - "name": "Titanium.BlobStream", - "summary": "Wrapper around that implements the interface.", - "extends": "Titanium.IOStream", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/BlobStream.yml", - "description": "Use the method to create a `BlobStream` instance from a\n`Blob`.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "read", - "summary": "Reads data from this stream into a buffer.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is written into the buffer starting at\nposition `offset`. Data is read from this stream until one of the following occurs:\n\n* the end of this stream is reached\n* the end of the buffer is reached\n* a total of `length` bytes have been read from the stream\n\nIf `offset` and `length` are omitted, data is written starting at the beginning\nof the buffer.\n\nWhen called synchronously: returns the number of bytes read, or -1 if the end of\nstream was reached before any data was read.\n\nReturns 0 when called asynchronously.\n\nThrows an exception on error. For example, if the `offset` value is past\nthe last byte of `buffer`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to read stream data into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset into the buffer to start writing stream data.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to read.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes read.", - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes data from a buffer to this stream.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is read from the buffer starting at\n`offset`. Bytes are read from the buffer and written to the stream until:\n\n* the end of the buffer is reached\n* `length` bytes have been written\n* the stream returns an error\n\nIf `offset` and `length` are omitted, all of the data in the buffer is written to\nthis stream.\n\nReturns the number of bytes actually written when called synchronously.\n\nReturns 0 when called asynchronously.\n\nThrows an exception if an error is encountered.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to write to this stream.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in the buffer of the first byte to write to the stream.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write to the stream.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "isWritable", - "summary": "Indicates whether this stream is writable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is writable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "isReadable", - "summary": "Indicates whether this stream is readable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is readable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "close", - "summary": "Closes this stream.", - "description": "Throws an exception on error.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Buffer": { - "name": "Titanium.Buffer", - "summary": "Buffer is a mutable, resizable container for raw data.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Buffer.yml", - "description": "A `Buffer` works like a resizable array of byte values.\n\nUse the method to create a buffer.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "append", - "summary": "Appends `sourceBuffer` to the this buffer.", - "description": "This buffer is grown dynamically to accommodate the additional data if need be.\n\nIf `sourceOffset` and `sourceLength` are specified, data from `sourceBuffer` is\ncopied starting at position `sourceOffset`, and no more than `sourceLength` bytes\nare copied.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sourceBuffer", - "summary": "Buffer to append to this buffer.", - "type": "Titanium.Buffer" - }, - { - "name": "sourceOffset", - "summary": "Offset to start reading buffer data from.\nIf specified, `sourceLength` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "sourceLength", - "summary": "Number of bytes to read from `sourceBuffer`.\nIf specified, `sourceOffset` must also be specified.\n", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "The number of bytes appended.", - "type": "Number" - } - }, - { - "name": "insert", - "summary": "Inserts data from `sourceBuffer` into this buffer at `offset`.", - "description": "Buffer is grown to accommodate the new data.\n\nIf `sourceOffset` and `sourceLength` are specified, `sourceLength` bytes\nof data are copied from `sourceBuffer`, with the first byte at `sourceOffset`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sourceBuffer", - "summary": "Buffer holding data to insert into this buffer.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in this buffer to insert the first byte copied from\n`sourceBuffer`.\n", - "type": "Number" - }, - { - "name": "sourceOffset", - "summary": "Offset in `sourceBuffer` of the first byte to insert.\nIf specified, `sourceLength` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "sourceLength", - "summary": "Number of bytes to insert from `sourceBuffer`.\nIf specified, `sourceOffset` must be specified as well.\n", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "The number of bytes inserted.", - "type": "Number" - } - }, - { - "name": "copy", - "summary": "Copies data from `sourceBuffer` into the current buffer at `offset`.", - "description": "Does not expand this buffer if there is not enough room to accommodate the data\nfrom `sourceBuffer`.\n\nIf `sourceOffset` and `sourceLength` are specified, bytes are copied from\n`sourceBuffer` starting at `sourceOffset`, and a maximum of `sourceLength` bytes\nare copied.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sourceBuffer", - "summary": "Buffer to copy data from.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in this buffer for the first byte of the copied data.", - "type": "Number" - }, - { - "name": "sourceOffset", - "summary": "Offset in `sourceBuffer` to copy data from.\nIf specified, `sourceLength` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "sourceLength", - "summary": "Number of bytes to copy from `sourceBuffer`.\nIf specified, `sourceOffset` must be specified as well.\n", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "The number of bytes copied.", - "type": "Number" - } - }, - { - "name": "clone", - "summary": "Creates a complete or partial copy of this buffer.", - "description": "If called with no arguments, returns a complete copy of the current buffer.\n\nIf `offset` and `length` are specified, creates a new buffer from the original\nbuffer contents starting at `offset` and ending at `offset`+`length`-1.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "offset", - "summary": "Offset of first byte of this buffer to clone.\nIf specified, `length` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Number of bytes of data to clone.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "Titanium.Buffer" - } - }, - { - "name": "fill", - "summary": "Fills this buffer with the specified byte value.", - "description": "Fills the buffer by setting byte values to `fillByte`.\n\nIf `offset` and `length` are specified, fills the buffer starting at\n`offset` and ending at `offset`+`length`-1.\n\nIf `offset` and `length` are omitted, fills the entire buffer.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fillByte", - "summary": "Byte to fill buffer with.", - "type": "Number" - }, - { - "name": "offset", - "summary": "Offset of the first byte to set to `fillByte`.", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Number of bytes to fill.", - "type": "Number", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clear", - "summary": "Clears this buffer's contents but does not change the size of the buffer.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "release", - "summary": "Releases the space allocated to the buffer, and sets its length to 0.", - "description": "This is effectively the same as `buffer.length = 0`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "toString", - "summary": "Converts this buffer to a String.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "toBlob", - "summary": "Converts this buffer to a .", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Titanium.Blob" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "length", - "summary": "Length of the buffer in bytes.", - "description": "When `length` is modified the buffer will be re-sized while preserving existing data where\npossible. If the new buffer length is smaller than the length of the existing data then the\nexisting data will be truncated down to the size of the new buffer.\n\nResizing a buffer by setting its length should be used sparingly due to the associated overhead.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0 unless `value` is specified, in which case the length of the encoded data is used." - }, - { - "name": "value", - "summary": "Data to be encoded.", - "description": "If `value` is a Number, `type` must also be set. (This is simply a convenient way of\ncalling or .)\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ], - "availability": "creation" - }, - { - "name": "type", - "summary": "The type of data encoding to use with `value`.", - "description": "Required when `value` is a Number. For numbers, specify a `TYPE` constant\nfrom , for example, .\n\nWhen `value` is a String, specify a `CHARSET` constant from .\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation", - "default": "For string values, defaults to ." - }, - { - "name": "byteOrder", - "summary": "Byte order of this buffer.", - "description": "Specify either or .\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "availability": "creation", - "default": "OS native byte order." - } - ], - "subtype": "proxy" - }, - "Titanium.BufferStream": { - "name": "Titanium.BufferStream", - "summary": "Wrapper around that implements the interface.\n", - "extends": "Titanium.IOStream", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/BufferStream.yml", - "description": "Use the method to create a `BufferStream` instance from a\n`Buffer`.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "read", - "summary": "Reads data from this stream into a buffer.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is written into the buffer starting at\nposition `offset`. Data is read from this stream until one of the following occurs:\n\n* the end of this stream is reached\n* the end of the buffer is reached\n* a total of `length` bytes have been read from the stream\n\nIf `offset` and `length` are omitted, data is written starting at the beginning\nof the buffer.\n\nWhen called synchronously: returns the number of bytes read, or -1 if the end of\nstream was reached before any data was read.\n\nReturns 0 when called asynchronously.\n\nThrows an exception on error. For example, if the `offset` value is past\nthe last byte of `buffer`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to read stream data into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset into the buffer to start writing stream data.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to read.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes read.", - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes data from a buffer to this stream.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is read from the buffer starting at\n`offset`. Bytes are read from the buffer and written to the stream until:\n\n* the end of the buffer is reached\n* `length` bytes have been written\n* the stream returns an error\n\nIf `offset` and `length` are omitted, all of the data in the buffer is written to\nthis stream.\n\nReturns the number of bytes actually written when called synchronously.\n\nReturns 0 when called asynchronously.\n\nThrows an exception if an error is encountered.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to write to this stream.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in the buffer of the first byte to write to the stream.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write to the stream.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "isWritable", - "summary": "Indicates whether this stream is writable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is writable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "isReadable", - "summary": "Indicates whether this stream is readable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is readable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "close", - "summary": "Closes this stream.", - "description": "Throws an exception on error.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Calendar.Alert": { - "name": "Titanium.Calendar.Alert", - "summary": "An object that represents a single alert for an event in an calendar.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Alert.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "absoluteDate", - "summary": "The absolute date for the alarm.", - "description": "If you set this property for a relative offset alarm, it loses \nthe relative offset and becomes an absolute alarm.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "relativeOffset", - "summary": "The offset from the start of an event, at which the alarm fires.", - "description": "If you set this value for an absolute alarm, it loses its absolute date and \nbecomes a relative offset alarm.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "alarmTime", - "summary": "Date/time at which this alert alarm is set to trigger.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "begin", - "summary": "Start date/time for the corresponding event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "end", - "summary": "End date/time for the corresponding event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "eventId", - "summary": "Identifier of the event for which this alert is set.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "id", - "summary": "Identifier of this alert.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "minutes", - "summary": "Reminder notice period in minutes, that determines how long prior to the event this alert \nshould trigger.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "state", - "summary": "The current state of the alert.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.STATE_DISMISSED", - "Titanium.Calendar.STATE_FIRED", - "Titanium.Calendar.STATE_SCHEDULED" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Calendar.Attendee": { - "name": "Titanium.Calendar.Attendee", - "summary": "An object that represents a single attendee of an event.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Attendee.yml", - "description": "The API supports retrieving information about the attendee of an event.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "isOrganizer", - "summary": "Indicates whether this attendee is the event organizer.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "name", - "summary": "The attendee name.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "email", - "summary": "The attendee email.", - "description": "Due to privacy concerns in iOS, this value will be empty if the attendee\nis the device owner.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "role", - "summary": "The role of the attendee.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.ATTENDEE_ROLE_UNKNOWN", - "Titanium.Calendar.ATTENDEE_ROLE_OPTIONAL", - "Titanium.Calendar.ATTENDEE_ROLE_REQUIRED", - "Titanium.Calendar.ATTENDEE_ROLE_CHAIR", - "Titanium.Calendar.ATTENDEE_ROLE_NON_PARTICIPANT" - ] - }, - { - "name": "type", - "summary": "The type of the attendee.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.ATTENDEE_TYPE_UNKNOWN", - "Titanium.Calendar.ATTENDEE_TYPE_PERSON", - "Titanium.Calendar.ATTENDEE_TYPE_ROOM", - "Titanium.Calendar.ATTENDEE_TYPE_RESOURCE", - "Titanium.Calendar.ATTENDEE_TYPE_NONE", - "Titanium.Calendar.ATTENDEE_TYPE_REQUIRED", - "Titanium.Calendar.ATTENDEE_TYPE_GROUP" - ] - }, - { - "name": "status", - "summary": "The status of the attendee.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.ATTENDEE_STATUS_UNKNOWN", - "Titanium.Calendar.ATTENDEE_STATUS_PENDING", - "Titanium.Calendar.ATTENDEE_STATUS_ACCEPTED", - "Titanium.Calendar.ATTENDEE_STATUS_DECLINED", - "Titanium.Calendar.ATTENDEE_STATUS_TENTATIVE", - "Titanium.Calendar.ATTENDEE_STATUS_INVITED", - "Titanium.Calendar.ATTENDEE_STATUS_NONE", - "Titanium.Calendar.ATTENDEE_STATUS_DELEGATED", - "Titanium.Calendar.ATTENDEE_STATUS_IN_PROCESS" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Calendar": { - "name": "Titanium.Calendar", - "summary": "The Calendar module provides an API for accessing the native calendar functionality.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Calendar.yml", - "description": "This module supports retrieving information about existing events and creating new events.\nModifying or deleting existing events and creating recurring events are only supported on iOS.\n\n#### Android\nOn Android, calendar permissions must be explicitly configured in `tiapp.xml` in order to access the\ncalendar and you have to use [requestCalendarPermissions](Titanium.Calendar.requestCalendarPermissions)\nto request runtime permissions.\n\n``` xml\n\n\n```\nSee \"Common Requirements\" in\n[tiapp.xml and timodule.xml Reference](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Appendices/tiapp.xml_and_timodule.xml_Reference.html).\n", - "events": [ - { - "name": "change", - "summary": "Fired when the database backing the EventKit module is modified.", - "description": "This event is fired when changes are made to the Calendar database, including adding,\nremoving, and changing events or reminders. Individual changes are not described.\nWhen you receive this notification, you should refetch all Event objects you have\naccessed, as they are considered stale. If you are actively editing an event and\ndo not wish to refetch it unless it is absolutely necessary to do so, you can call\nthe [refresh](Titanium.Calendar.Event.refresh) method on it. If the method returns\nYES, you do not need to refetch the event.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "All Calendars vs Selectable Calendars", - "code": "Print the names of all calendars, and the names of calendars that\nhave been selected in the native Android calendar application.\n\n``` js\nfunction showCalendars(calendars) {\n for (var i = 0; i < calendars.length; i++) {\n Ti.API.info(calendars[i].name);\n }\n}\n// Provide permissions if necessary\nif (!Ti.Calendar.hasCalendarPermissions()) {\n Ti.Calendar.requestCalendarPermissions(function (e) {\n if (e.success) {\n printCalendars();\n }\n });\n} else {\n printCalendars();\n}\n\nfunction printCalendars() {\n Ti.API.info('ALL CALENDARS:');\n showCalendars(Ti.Calendar.allCalendars);\n if (Ti.Platform.osname === 'android') {\n Ti.API.info('SELECTABLE CALENDARS:');\n showCalendars(Ti.Calendar.selectableCalendars);\n }\n}\n```\n" - }, - { - "description": "Create an Event and Reminder on Android", - "code": "Creates an event and adds an e-mail reminder for 10 minutes before the event.\n\n``` js\nvar CALENDAR_TO_USE = 3;\nvar calendar = Ti.Calendar.getCalendarById(CALENDAR_TO_USE);\n\n// Create the event\nvar eventBegins = new Date(2010, 11, 26, 12, 0, 0);\nvar eventEnds = new Date(2010, 11, 26, 14, 0, 0);\nvar details = {\n title: 'Do some stuff',\n description: \"I'm going to do some stuff at this time.\",\n begin: eventBegins,\n end: eventEnds\n};\n\nvar event = calendar.createEvent(details);\n\n// Now add a reminder via e-mail for 10 minutes before the event.\nvar reminderDetails = {\n minutes: 10,\n method: Ti.Calendar.METHOD_EMAIL\n};\n\nevent.createReminder(reminderDetails);\n```\n" - }, - { - "description": "Events in a year", - "code": "Create a picker to allow an existing calendar to be selected and, when a button is clicked,\ngenerate details of all events in that calendar for the current year.\n\n``` js\nvar calendars = [];\nvar selectedCalendarName;\nvar selectedid;\nvar pickerData = [];\nvar osname = Ti.Platform.osname;\n\n//**read events from calendar*******\nfunction performCalendarReadFunctions(){\n var scrollView = Ti.UI.createScrollView({\n backgroundColor: '#eee',\n height: 500,\n top: 20\n });\n\n var label = Ti.UI.createLabel({\n backgroundColor: 'gray',\n text: 'Click on the button to display the events for the selected calendar',\n textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER,\n top: 20\n });\n scrollView.add(label);\n\n var selectableCalendars = Ti.Calendar.allCalendars;\n for (var i = 0, ilen = selectableCalendars.length; i < ilen; i++) {\n calendars.push({ name: selectableCalendars[i].name, id: selectableCalendars[i].id });\n pickerData.push( Ti.UI.createPickerRow({ title: calendars[i].name }) );\n if(i === 0){\n selectedCalendarName = selectableCalendars[i].name;\n selectedid = selectableCalendars[i].id;\n }\n }\n\n if(!calendars.length){\n label.text = 'No calendars available. Select at least one in the native calendar before using this app';\n } else {\n label.text = 'Click button to view calendar events';\n\n var picker = Ti.UI.createPicker({\n top:20\n });\n\n picker.add(pickerData);\n win.add(picker);\n\n picker.addEventListener('change', function(e){\n for (var i = 0, ilen = calendars.length; i < ilen; i++) {\n if(calendars[i].name === e.row.title){\n selectedCalendarName = calendars[i].name;\n selectedid = calendars[i].id;\n Ti.API.info('Selected calendar that we are going to fetch is :: '+ selectedid + ' name:' + selectedCalendarName);\n }\n }\n });\n\n var button = Ti.UI.createButton({\n title: 'View events',\n top: 20\n });\n win.add(button);\n\n button.addEventListener('click', function(e){\n label.text = 'Generating...';\n\n var currentYear = new Date().getFullYear();\n\n var consoleString = '';\n\n function print(s) {\n if (consoleString.length) {\n consoleString = consoleString + '\\n';\n }\n consoleString = consoleString + s;\n }\n\n var calendar = Ti.Calendar.getCalendarById(selectedid);\n Ti.API.info('Calendar was of type' + calendar);\n Ti.API.info('calendar that we are going to fetch is :: '+ calendar.id + ' name:' + calendar.name);\n\n function printReminder(r) {\n if (osname === 'android') {\n var typetext = '[method unknown]';\n if (r.method == Ti.Calendar.METHOD_EMAIL) {\n typetext = 'Email';\n } else if (r.method == Ti.Calendar.METHOD_SMS) {\n typetext = 'SMS';\n } else if (r.method == Ti.Calendar.METHOD_ALERT) {\n typetext = 'Alert';\n } else if (r.method == Ti.Calendar.METHOD_DEFAULT) {\n typetext = '[default reminder method]';\n }\n print(typetext + ' reminder to be sent ' + r.minutes + ' minutes before the event');\n }\n }\n\n function printAlert(a) {\n if (osname === 'android') {\n print('Alert id ' + a.id + ' begin ' + a.begin + '; end ' + a.end + '; alarmTime ' + a.alarmTime + '; minutes ' + a.minutes);\n } else if (osname === 'iphone' || osname === 'ipad') {\n print('Alert absoluteDate ' + a.absoluteDate + ' relativeOffset ' + a.relativeOffset);\n }\n }\n\n function printEvent(event) {\n if (event.allDay) {\n print('Event: ' + event.title + '; ' + event.begin + ' (all day)');\n } else {\n print('Event: ' + event.title + '; ' + event.begin + ' ' + event.begin+ '-' + event.end);\n }\n\n var reminders = event.reminders;\n if (reminders && reminders.length) {\n print('There is/are ' + reminders.length + ' reminder(s)');\n for (var i = 0; i < reminders.length; i++) {\n printReminder(reminders[i]);\n }\n }\n print('hasAlarm? ' + event.hasAlarm);\n var alerts = event.alerts;\n if (alerts && alerts.length) {\n for (var i = 0; i < alerts.length; i++) {\n printAlert(alerts[i]);\n }\n }\n\n var status = event.status;\n if (status == Ti.Calendar.STATUS_TENTATIVE) {\n print('This event is tentative');\n }\n if (status == Ti.Calendar.STATUS_CONFIRMED) {\n print('This event is confirmed');\n }\n if (status == Ti.Calendar.STATUS_CANCELED) {\n print('This event was canceled');\n }\n }\n\n var events = calendar.getEventsInYear(currentYear);\n if (events && events.length) {\n print(events.length + ' event(s) in ' + currentYear);\n print('');\n for (var i = 0; i < events.length; i++) {\n printEvent(events[i]);\n print('');\n }\n } else {\n print('No events');\n }\n\n label.text = consoleString;\n });\n }\n\n win.add(scrollView);\n}\n\n\nvar win = Ti.UI.createWindow({\n backgroundColor: 'gray',\n exitOnClose: true,\n fullscreen: false,\n layout: 'vertical',\n title: 'Calendar Demo'\n});\n\nif (Ti.Calendar.hasCalendarPermissions()) {\n performCalendarReadFunctions();\n} else {\n Ti.Calendar.requestCalendarPermissions(function(e) {\n if (e.success) {\n performCalendarReadFunctions();\n } else {\n Ti.API.error(e.error);\n alert('Access to calendar is not allowed');\n }\n });\n}\n\nwin.open();\n```\n" - }, - { - "description": "Create a Recurring Event with Alerts on iOS (add the code to the sample above)", - "code": "Create a recurring event with alerts.\n\n``` js\nfunction printEventDetails(eventID) {\n Ti.API.info('eventID:' + eventID);\n var defCalendar = Ti.Calendar.getCalendarById(selectedid);\n var eventFromCalendar = defCalendar.getEventById(eventID);\n if (eventFromCalendar) {\n Ti.API.info('Printing event values ::');\n Ti.API.info('title: '+ eventFromCalendar.title);\n Ti.API.info('notes: ' + eventFromCalendar.notes);\n Ti.API.info('location: ' + eventFromCalendar.location);\n Ti.API.info('allDay?:' + eventFromCalendar.allDay);\n Ti.API.info('status: '+ eventFromCalendar.status);\n Ti.API.info('availability: '+ eventFromCalendar.availability);\n Ti.API.info('hasAlarm?: '+ eventFromCalendar.hasAlarm);\n Ti.API.info('id: '+ eventFromCalendar.id);\n Ti.API.info('isDetached?: '+ eventFromCalendar.isDetached);\n Ti.API.info('begin: '+ eventFromCalendar.begin);\n Ti.API.info('end: '+ eventFromCalendar.end);\n var eventRule = eventFromCalendar.recurrenceRules;\n Ti.API.info('recurrenceRules : ' + eventRule);\n for (var i = 0; i < eventRule.length; i++) {\n Ti.API.info('Rule # ' + i);\n Ti.API.info('frequency: ' + eventRule[i].frequency);\n Ti.API.info('interval: ' + eventRule[i].interval);\n Ti.API.info('daysofTheWeek: ' );\n var daysofTheWeek = eventRule[i].daysOfTheWeek;\n for (var j = 0; j < daysofTheWeek.length; j++) {\n Ti.API.info('{ dayOfWeek: ' + daysofTheWeek[j].dayOfWeek + ', weekNumber: ' + daysofTheWeek[j].week + ' }, ');\n }\n Ti.API.info('firstDayOfTheWeek: ' + eventRule[i].firstDayOfTheWeek);\n Ti.API.info('daysOfTheMonth: ');\n var daysOfTheMonth = eventRule[i].daysOfTheMonth;\n for(var j = 0; j < daysOfTheMonth.length; j++) {\n Ti.API.info(' ' + daysOfTheMonth[j]);\n }\n Ti.API.info('daysOfTheYear: ');\n var daysOfTheYear = eventRule[i].daysOfTheYear;\n for(var j = 0; j < daysOfTheYear.length; j++) {\n Ti.API.info(' ' + daysOfTheYear[j]);\n }\n Ti.API.info('weeksOfTheYear: ');\n var weeksOfTheYear = eventRule[i].weeksOfTheYear;\n for(var j = 0; j < weeksOfTheYear.length; j++) {\n Ti.API.info(' ' + weeksOfTheYear[j]);\n }\n Ti.API.info('monthsOfTheYear: ');\n var monthsOfTheYear = eventRule[i].monthsOfTheYear;\n for(var j = 0; j < monthsOfTheYear.length; j++) {\n Ti.API.info(' ' + monthsOfTheYear[j]);\n }\n Ti.API.info('daysOfTheYear: ');\n if (osname !== 'android') {\n var setPositions = eventRule[i].setPositions;\n for(var j = 0; j < setPositions.length; j++) {\n Ti.API.info(' ' + setPositions[j]);\n }\n }\n };\n Ti.API.info('alerts: ' + eventFromCalendar.alerts);\n var newAlerts = eventFromCalendar.alerts;\n\n for(var i = 0 ; i < newAlerts.length ; i++) {\n Ti.API.info('*****Alert ' + i);\n Ti.API.info('absoluteDate: ' + newAlerts[i].absoluteDate);\n Ti.API.info('relativeOffset: ' + newAlerts[i].relativeOffset);\n }\n }\n}\nfunction performCalendarWriteFunctions(){\n var defCalendar = Ti.Calendar.getCalendarById(selectedid);\n var date1 = new Date(new Date().getTime() + 3000),\n date2 = new Date(new Date().getTime() + 900000);\n Ti.API.info('Date1: ' + date1 + ', Date2: ' + date2);\n var event1 = defCalendar.createEvent({\n title: 'Sample Event',\n notes: 'This is a test event which has some values assigned to it.',\n location: 'Appcelerator Inc',\n begin: date1,\n end: date2,\n availability: Ti.Calendar.AVAILABILITY_FREE,\n allDay: false,\n });\n var alert1;\n var alert2;\n if (osname === 'android') {\n alert1 = event1.createAlert({\n minutes: 60\n })\n } else {\n alert1 = event1.createAlert({\n absoluteDate: new Date(new Date().getTime() - (1000*60*20))\n });\n alert2 = event1.createAlert({\n relativeOffset:-(60*15)\n })\n }\n\n var allAlerts = new Array(alert1,alert2);\n event1.alerts = allAlerts;\n var newRule = event1.createRecurrenceRule({\n frequency: Ti.Calendar.RECURRENCEFREQUENCY_MONTHLY,\n interval: 1,\n daysOfTheWeek: [ { dayOfWeek: 1, week: 2 }, { dayOfWeek: 2 } ],\n end: { occurrenceCount: 10 }\n });\n Ti.API.info('newRule: '+ newRule);\n event1.recurrenceRules = [newRule];\n Ti.API.info('Going to save event now');\n event1.save(Ti.Calendar.SPAN_THISEVENT);\n Ti.API.info('Done with saving event,\\n Now trying to retrieve it.');\n printEventDetails(event1.id);\n}\n\nvar button2 = Ti.UI.createButton({\n title: 'Create a recurring event',\n top: 20\n});\nwin.add(button2);\nbutton2.addEventListener('click', function () {\n performCalendarWriteFunctions();\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getCalendarById", - "summary": "Gets the calendar with the specified identifier.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Identifier of the calendar.", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Calendar.Calendar" - } - }, - { - "name": "hasCalendarPermissions", - "summary": "Returns `true` if the app has calendar access.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestCalendarPermissions", - "summary": "Requests for calendar access.", - "description": "On Android, the request view will show if the permission is not accepted by the user, and the user did\nnot check the box \"Never ask again\" when denying the request. If the user checks the box \"Never ask again,\"\nthe user has to manually enable the permission in device settings. This method requests `Manifest.permission.READ_CALENDAR`\nand `Manifest.permission.WRITE_CALENDAR` on Android. If you require other permissions, you can also use\n.\n\nIn iOS 6, Apple introduced the Info.plist key `NSCalendarsUsageDescription` that is used to display an\nown description while authorizing calendar permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html) for more information.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call upon user decision to grant calendar access.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "METHOD_ALERT", - "summary": "Reminder alert delivery method.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[METHOD_ALERT](Titanium.Calendar.METHOD_ALERT),\n[METHOD_DEFAULT](Titanium.Calendar.METHOD_DEFAULT),\n[METHOD_EMAIL](Titanium.Calendar.METHOD_EMAIL),\nand [METHOD_SMS](Titanium.Calendar.METHOD_SMS).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "METHOD_DEFAULT", - "summary": "Reminder default delivery method.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[METHOD_ALERT](Titanium.Calendar.METHOD_ALERT),\n[METHOD_DEFAULT](Titanium.Calendar.METHOD_DEFAULT),\n[METHOD_EMAIL](Titanium.Calendar.METHOD_EMAIL),\nand [METHOD_SMS](Titanium.Calendar.METHOD_SMS).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "METHOD_EMAIL", - "summary": "Reminder email delivery method.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[METHOD_ALERT](Titanium.Calendar.METHOD_ALERT),\n[METHOD_DEFAULT](Titanium.Calendar.METHOD_DEFAULT),\n[METHOD_EMAIL](Titanium.Calendar.METHOD_EMAIL),\nand [METHOD_SMS](Titanium.Calendar.METHOD_SMS).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "METHOD_SMS", - "summary": "Reminder SMS delivery method.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[METHOD_ALERT](Titanium.Calendar.METHOD_ALERT),\n[METHOD_DEFAULT](Titanium.Calendar.METHOD_DEFAULT),\n[METHOD_EMAIL](Titanium.Calendar.METHOD_EMAIL),\nand [METHOD_SMS](Titanium.Calendar.METHOD_SMS).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_DISMISSED", - "summary": "Alert dismissed state.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[STATE_DISMISSED](Titanium.Calendar.STATE_DISMISSED),\n[STATE_FIRED](Titanium.Calendar.STATE_FIRED),\nand [STATE_SCHEDULED](Titanium.Calendar.STATE_SCHEDULED).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_FIRED", - "summary": "Alert fired state.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[STATE_DISMISSED](Titanium.Calendar.STATE_DISMISSED),\n[STATE_FIRED](Titanium.Calendar.STATE_FIRED),\nand [STATE_SCHEDULED](Titanium.Calendar.STATE_SCHEDULED).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_SCHEDULED", - "summary": "Alert scheduled status.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[STATE_DISMISSED](Titanium.Calendar.STATE_DISMISSED),\n[STATE_FIRED](Titanium.Calendar.STATE_FIRED),\nand [STATE_SCHEDULED](Titanium.Calendar.STATE_SCHEDULED).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATUS_NONE", - "summary": "Event has no status.", - "description": "An [event's status](Titanium.Calendar.Event.status) value.\n\nOne of the group of event \"status\" constants,\n[STATUS_CANCELED](Titanium.Calendar.STATUS_CANCELED),\n[STATUS_CONFIRMED](Titanium.Calendar.STATUS_CONFIRMED),\nand [STATUS_TENTATIVE](Titanium.Calendar.STATUS_TENTATIVE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATUS_CANCELED", - "summary": "Event canceled status.", - "description": "An [event's status](Titanium.Calendar.Event.status) value.\n\nOne of the group of event \"status\" constants,\n[STATUS_NONE](Titanium.Calendar.STATUS_NONE),\n[STATUS_CANCELED](Titanium.Calendar.STATUS_CANCELED),\n[STATUS_CONFIRMED](Titanium.Calendar.STATUS_CONFIRMED),\nand [STATUS_TENTATIVE](Titanium.Calendar.STATUS_TENTATIVE).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATUS_CONFIRMED", - "summary": "Event confirmed status.", - "description": "An [event's status](Titanium.Calendar.Event.status) value.\n\nOne of the group of event \"status\" constants,\n[STATUS_NONE](Titanium.Calendar.STATUS_NONE),\n[STATUS_CANCELED](Titanium.Calendar.STATUS_CANCELED),\n[STATUS_CONFIRMED](Titanium.Calendar.STATUS_CONFIRMED),\nand [STATUS_TENTATIVE](Titanium.Calendar.STATUS_TENTATIVE).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATUS_TENTATIVE", - "summary": "Event tentative status.", - "description": "An [event's status](Titanium.Calendar.Event.status) value.\n\nOne of the group of event \"status\" constants,\n[STATUS_NONE](Titanium.Calendar.STATUS_NONE),\n[STATUS_CANCELED](Titanium.Calendar.STATUS_CANCELED),\n[STATUS_CONFIRMED](Titanium.Calendar.STATUS_CONFIRMED),\nand [STATUS_TENTATIVE](Titanium.Calendar.STATUS_TENTATIVE).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AVAILABILITY_NOTSUPPORTED", - "summary": "Availability settings are not supported by the event's calendar.", - "description": "An [event's availability](Titanium.Calendar.Event.availability) value.\n\nOne of the group of event method constants,\n[AVAILABILITY_NOTSUPPORTED](Titanium.Calendar.AVAILABILITY_NOTSUPPORTED),\n[AVAILABILITY_BUSY](Titanium.Calendar.AVAILABILITY_BUSY),\n[AVAILABILITY_FREE](Titanium.Calendar.AVAILABILITY_FREE),\n[AVAILABILITY_TENTATIVE](Titanium.Calendar.AVAILABILITY_TENTATIVE),\nand [AVAILABILITY_UNAVAILABLE](Titanium.Calendar.AVAILABILITY_UNAVAILABLE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AVAILABILITY_BUSY", - "summary": "Event has a busy availability setting.", - "description": "An [event's availability](Titanium.Calendar.Event.availability) value.\n\nOne of the group of event method constants,\n[AVAILABILITY_NOTSUPPORTED](Titanium.Calendar.AVAILABILITY_NOTSUPPORTED),\n[AVAILABILITY_BUSY](Titanium.Calendar.AVAILABILITY_BUSY),\n[AVAILABILITY_FREE](Titanium.Calendar.AVAILABILITY_FREE),\n[AVAILABILITY_TENTATIVE](Titanium.Calendar.AVAILABILITY_TENTATIVE),\nand [AVAILABILITY_UNAVAILABLE](Titanium.Calendar.AVAILABILITY_UNAVAILABLE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AVAILABILITY_FREE", - "summary": "Event has a free availability setting.", - "description": "An [event's availability](Titanium.Calendar.Event.availability) value.\n\nOne of the group of event method constants,\n[AVAILABILITY_NOTSUPPORTED](Titanium.Calendar.AVAILABILITY_NOTSUPPORTED),\n[AVAILABILITY_BUSY](Titanium.Calendar.AVAILABILITY_BUSY),\n[AVAILABILITY_FREE](Titanium.Calendar.AVAILABILITY_FREE),\n[AVAILABILITY_TENTATIVE](Titanium.Calendar.AVAILABILITY_TENTATIVE),\nand [AVAILABILITY_UNAVAILABLE](Titanium.Calendar.AVAILABILITY_UNAVAILABLE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AVAILABILITY_TENTATIVE", - "summary": "Event has a tentative availability setting.", - "description": "An [event's availability](Titanium.Calendar.Event.availability) value.\n\nOne of the group of event method constants,\n[AVAILABILITY_NOTSUPPORTED](Titanium.Calendar.AVAILABILITY_NOTSUPPORTED),\n[AVAILABILITY_BUSY](Titanium.Calendar.AVAILABILITY_BUSY),\n[AVAILABILITY_FREE](Titanium.Calendar.AVAILABILITY_FREE),\n[AVAILABILITY_TENTATIVE](Titanium.Calendar.AVAILABILITY_TENTATIVE),\nand [AVAILABILITY_UNAVAILABLE](Titanium.Calendar.AVAILABILITY_UNAVAILABLE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AVAILABILITY_UNAVAILABLE", - "summary": "Event has a tentative availability setting.", - "description": "An [event's availability](Titanium.Calendar.Event.availability) value.\n\nOne of the group of event method constants,\n[AVAILABILITY_NOTSUPPORTED](Titanium.Calendar.AVAILABILITY_NOTSUPPORTED),\n[AVAILABILITY_BUSY](Titanium.Calendar.AVAILABILITY_BUSY),\n[AVAILABILITY_FREE](Titanium.Calendar.AVAILABILITY_FREE),\n[AVAILABILITY_TENTATIVE](Titanium.Calendar.AVAILABILITY_TENTATIVE),\nand [AVAILABILITY_UNAVAILABLE](Titanium.Calendar.AVAILABILITY_UNAVAILABLE).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_AUTHORIZED", - "summary": "An [calendarAuthorization](Titanium.Calendar.calendarAuthorization) value\nindicating that the application is authorized to use events in the Calendar.\n", - "description": "This value is always returned if the device is running an iOS release prior to 6.0.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_DENIED", - "summary": "An [calendarAuthorization](Titanium.Calendar.calendarAuthorization) value\nindicating that the application is not authorized to use events in the Calendar.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_RESTRICTED", - "summary": "An [calendarAuthorization](Titanium.Calendar.calendarAuthorization) value\nindicating that the application is not authorized to use events in the Calendar.\nthe user cannot change this application's status.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_UNKNOWN", - "summary": "An [calendarAuthorization](Titanium.Calendar.calendarAuthorization) value\nindicating that the authorization state is unknown.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SPAN_THISEVENT", - "summary": "A [save](Titanium.Calendar.Event.save)/[remove](Titanium.Calendar.Event.remove) event value,\nindicating modifications to this event instance should affect only this instance.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SPAN_FUTUREEVENTS", - "summary": "A [save](Titanium.Calendar.Event.save)/[remove](Titanium.Calendar.Event.remove) event value,\nindicating modifications to this event instance should also affect future instances of this event.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RECURRENCEFREQUENCY_DAILY", - "summary": "Indicates a daily recurrence rule for a events recurrence frequency.", - "description": "Used with the property.\n\nOne of the group of event \"frequency\" constants\n[RECURRENCEFREQUENCY_DAILY](Titanium.Calendar.RECURRENCEFREQUENCY_DAILY),\n[RECURRENCEFREQUENCY_WEEKLY](Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY),\n[RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY),\nand [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RECURRENCEFREQUENCY_WEEKLY", - "summary": "Indicates a weekly recurrence rule for a events recurrence frequency.", - "description": "Used with the property.\n\nOne of the group of event \"frequency\" constants\n[RECURRENCEFREQUENCY_DAILY](Titanium.Calendar.RECURRENCEFREQUENCY_DAILY),\n[RECURRENCEFREQUENCY_WEEKLY](Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY),\n[RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY),\nand [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RECURRENCEFREQUENCY_MONTHLY", - "summary": "Indicates a monthly recurrence rule for a events recurrence frequency.", - "description": "Used with the property.\n\nOne of the group of event \"frequency\" constants\n[RECURRENCEFREQUENCY_DAILY](Titanium.Calendar.RECURRENCEFREQUENCY_DAILY),\n[RECURRENCEFREQUENCY_WEEKLY](Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY),\n[RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY),\nand [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RECURRENCEFREQUENCY_YEARLY", - "summary": "Indicates a yearly recurrence rule for a events recurrence frequency.", - "description": "Used with the property.\n\nOne of the group of event \"frequency\" constants\n[RECURRENCEFREQUENCY_DAILY](Titanium.Calendar.RECURRENCEFREQUENCY_DAILY),\n[RECURRENCEFREQUENCY_WEEKLY](Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY),\n[RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY),\nand [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_CONFIDENTIAL", - "summary": "Event confidential visibility.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[VISIBILITY_CONFIDENTIAL](Titanium.Calendar.VISIBILITY_CONFIDENTIAL),\n[VISIBILITY_DEFAULT](Titanium.Calendar.VISIBILITY_DEFAULT),\n[VISIBILITY_PRIVATE](Titanium.Calendar.VISIBILITY_PRIVATE),\nand [VISIBILITY_PUBLIC](Titanium.Calendar.VISIBILITY_PUBLIC).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_DEFAULT", - "summary": "Event default visibility.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[VISIBILITY_CONFIDENTIAL](Titanium.Calendar.VISIBILITY_CONFIDENTIAL),\n[VISIBILITY_DEFAULT](Titanium.Calendar.VISIBILITY_DEFAULT),\n[VISIBILITY_PRIVATE](Titanium.Calendar.VISIBILITY_PRIVATE),\nand [VISIBILITY_PUBLIC](Titanium.Calendar.VISIBILITY_PUBLIC).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_PRIVATE", - "summary": "Event private visibility.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[VISIBILITY_CONFIDENTIAL](Titanium.Calendar.VISIBILITY_CONFIDENTIAL),\n[VISIBILITY_DEFAULT](Titanium.Calendar.VISIBILITY_DEFAULT),\n[VISIBILITY_PRIVATE](Titanium.Calendar.VISIBILITY_PRIVATE),\nand [VISIBILITY_PUBLIC](Titanium.Calendar.VISIBILITY_PUBLIC).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VISIBILITY_PUBLIC", - "summary": "Event public visibility.", - "description": "Used with .\n\nOne of the group of reminder method constants,\n[VISIBILITY_CONFIDENTIAL](Titanium.Calendar.VISIBILITY_CONFIDENTIAL),\n[VISIBILITY_DEFAULT](Titanium.Calendar.VISIBILITY_DEFAULT),\n[VISIBILITY_PRIVATE](Titanium.Calendar.VISIBILITY_PRIVATE),\nand [VISIBILITY_PUBLIC](Titanium.Calendar.VISIBILITY_PUBLIC).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_UNKNOWN", - "summary": "Attendee status is unknown.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_PENDING", - "summary": "Attendee status is pending.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_ACCEPTED", - "summary": "Attendee status is accepted.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_DECLINED", - "summary": "Attendee status is declined.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_TENTATIVE", - "summary": "Attendee status is tentative.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_INVITED", - "summary": "Attendee status is invited.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_NONE", - "summary": "There is no Attendee status.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_DELEGATED", - "summary": "Attendee status is delegated.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_STATUS_IN_PROCESS", - "summary": "Attendee status is in process.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_ATTENDEE", - "summary": "Relationship is attendee.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_NONE", - "summary": "There is no relationship.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_ORGANIZER", - "summary": "Attendee is organizer.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_PERFORMER", - "summary": "Attendee is performer.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_SPEAKER", - "summary": "Attendee is speaker.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "RELATIONSHIP_UNKNOWN", - "summary": "Relationship is unknown.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_ROLE_UNKNOWN", - "summary": "Attendee role is unknown.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_ROLE_OPTIONAL", - "summary": "Attendee role is optional.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_ROLE_REQUIRED", - "summary": "Attendee role is required.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_ROLE_CHAIR", - "summary": "Attendee role is chair.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_ROLE_NON_PARTICIPANT", - "summary": "Attendee is not a participant.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_UNKNOWN", - "summary": "Attendee type is unknown.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_PERSON", - "summary": "Attendee type is person.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_ROOM", - "summary": "Attendee type is room.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_RESOURCE", - "summary": "Attendee type is resource.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_NONE", - "summary": "There is not attendee type.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_REQUIRED", - "summary": "Attendee type is required.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ATTENDEE_TYPE_GROUP", - "summary": "Attendee type is group.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_LOCAL", - "summary": "A local calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_EXCHANGE", - "summary": "A microsoft exchange calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_CALDAV", - "summary": "A calDev calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_MOBILEME", - "summary": "A mobileMe calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_SUBSCRIBED", - "summary": "A subscribed calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOURCE_TYPE_BIRTHDAYS", - "summary": "A birthday calendar source.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "calendarAuthorization", - "summary": "Returns an authorization constant indicating if the application has access to the events in the EventKit.", - "description": "Always returns `AUTHORIZATION_AUTHORIZED` on iOS pre-6.0.\ntype: Number\n", - "platforms": [ - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.AUTHORIZATION_AUTHORIZED", - "Titanium.Calendar.AUTHORIZATION_DENIED", - "Titanium.Calendar.AUTHORIZATION_RESTRICTED", - "Titanium.Calendar.AUTHORIZATION_UNKNOWN" - ] - }, - { - "name": "allAlerts", - "summary": "All alerts in selected calendars.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "allCalendars", - "summary": "All calendars known to the native calendar app.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "allEditableCalendars", - "summary": "All calendars known to the native calendar app that can add, edit, and\ndelete items in the calendar.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "selectableCalendars", - "summary": "All calendars selected within the native calendar app, which may be a subset of `allCalendars`.\n", - "description": "The native calendar application may know via the registered web services, such as Google or\nFacebook accounts about calendars that it has access to but have not been selected to be\ndisplayed in the native calendar app.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "defaultCalendar", - "summary": "Calendar that events are added to by default, as specified by user settings.\n", - "description": "Will return the default calendar of your phone. On Android it will return the first primary\ncalendar in case you have multiple accounts on your phone.\n", - "platforms": [ - { - "since": "11.0.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Calendar.Calendar", - "permission": "read-only" - } - ] - }, - "EventsAuthorizationResponse": { - "name": "EventsAuthorizationResponse", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "Object", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Calendar.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates whether the request succeeded.", - "description": "Returns `true` if request succeeded.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "May be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code, if any returned.", - "description": "May be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Calendar.Calendar": { - "name": "Titanium.Calendar.Calendar", - "summary": "An object that represents a single calendar.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/CalendarProxy.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createEvent", - "summary": "Creates an event in this calendar.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "properties", - "summary": "Properties of the event", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.Calendar.Event" - } - }, - { - "name": "createEvents", - "summary": "Creates multiple events at once in this calendar.", - "description": "Use this method to bulk-create events for faster performance.\nSuccessful or failed results are returned at the same position as passed in the parameters list.\nFor failed events, it will return `null` and for successful events.\n", - "platforms": [ - { - "since": "12.6.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "propertiesArray", - "summary": "Array of the event properties", - "type": "Array>" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getEventById", - "summary": "Gets the event with the specified identifier.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Identifier of the event.", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Calendar.Event" - } - }, - { - "name": "getEventsById", - "summary": "Gets multiple events with their specified identifier(s).", - "description": "Use this method to bulk-fetch events for faster performance.\nOnly successful events are returned, so the identifier of events\nshould be used to compare which events were not fetched successfully.\n", - "platforms": [ - { - "since": "12.6.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "ids", - "summary": "Array of identifiers of events.", - "type": [ - "Array", - "Array" - ] - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "deleteEvents", - "summary": "Deletes multiple events with their specified identifier(s).", - "description": "Use this method to bulk-delete events for faster performance.\nThis method only returns the count of successfully deleted events.\nIf it is important for apps to know whether the event was deleted or not,\neither use the [remove()](Titanium.Calendar.Event.remove) method, or \na single identifier that is passed as an array to this method.\nIf a specified identifier event does not exist, it will not be treated as a count,\nso the count range can be in `0 <= count <= ids.length`.\n", - "platforms": [ - { - "since": "12.6.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "ids", - "summary": "Array of identifiers of events.", - "type": [ - "Array", - "Array" - ] - } - ], - "returns": { - "summary": "Count of successfully deleted events.", - "type": "Number" - } - }, - { - "name": "getEventsBetweenDates", - "summary": "Gets events that occur between two dates.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "date1", - "summary": "Start date.", - "type": [ - "Date", - "String" - ] - }, - { - "name": "date2", - "summary": "End date.", - "type": [ - "Date", - "String" - ] - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getEventsInDate", - "deprecated": { - "notes": "Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.", - "since": "7.0.0" - }, - "summary": "Gets events that occur on a specified date.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "year", - "summary": "Year of the events.", - "type": "Number" - }, - { - "name": "month", - "summary": "Month of the events, as a zero-based integer with January at 0 and December at 11.", - "type": "Number" - }, - { - "name": "day", - "summary": "Day of the month of the events.", - "type": "Number" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getEventsInMonth", - "deprecated": { - "notes": "Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.", - "since": "7.0.0" - }, - "summary": "Gets events that occur during a specified month.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "year", - "summary": "Year of the events.", - "type": "Number" - }, - { - "name": "month", - "summary": "Month of the events, as a zero-based integer with January at 0 and December at 11.", - "type": "Number" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getEventsInYear", - "deprecated": { - "notes": "Use [Titanium.Calendar.Calendar.getEventsBetweenDates](Titanium.Calendar.Calendar.getEventsBetweenDates) instead.", - "since": "7.0.0" - }, - "summary": "Gets all events that occur during a specified year.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "year", - "summary": "Year of the events.", - "type": "Number" - } - ], - "returns": { - "type": "Array" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "hidden", - "summary": "Indicates whether this calendar can be edited or deleted.", - "description": "This property is `true` when this calendar is editable.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "id", - "summary": "Identifier of this calendar.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "name", - "summary": "Display name of this calendar.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "selected", - "summary": "Indicates whether the calendar is selected.", - "description": "Set to `true` when this calendar is selected.\n\nSee for examples.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "sourceTitle", - "summary": "Displays the source title.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "sourceType", - "summary": "Displays the source type.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.SOURCE_TYPE_LOCAL", - "Titanium.Calendar.SOURCE_TYPE_EXCHANGE", - "Titanium.Calendar.SOURCE_TYPE_CALDAV", - "Titanium.Calendar.SOURCE_TYPE_MOBILEME", - "Titanium.Calendar.SOURCE_TYPE_SUBSCRIBED", - "Titanium.Calendar.SOURCE_TYPE_BIRTHDAYS" - ] - }, - { - "name": "sourceIdentifier", - "summary": "Displays the source identifier.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Calendar.Event": { - "name": "Titanium.Calendar.Event", - "summary": "An object that represents a single event in a calendar.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Event.yml", - "description": "The API supports retrieving information about existing events and creating new events.\nOn iOS, existing events can be modified or deleted. On Android, only recurrence rules\ncan be modified.\n\nSee for examples of retrieving event information and creating events.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createAlert", - "summary": "Creates an alert for this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Properties for the alert.", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.Calendar.Alert" - } - }, - { - "name": "createReminder", - "summary": "Creates a reminder for this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Properties for the reminder.", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.Calendar.Reminder" - } - }, - { - "name": "getExtendedProperty", - "summary": "Gets the value of the specified extended property.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of an existing extended property.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "setExtendedProperty", - "summary": "Sets the value of the specified extended property.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Property name.", - "type": "String" - }, - { - "name": "value", - "summary": "Property value.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createRecurrenceRule", - "summary": "Creates an recurrence pattern for a recurring event.\nAll of the properties for the recurrence rule must be set during creation.\nThe recurrence rule properties cannot be modified.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Properties for the recurrence rule.", - "type": "Dictionary" - } - ], - "returns": { - "type": "Titanium.Calendar.RecurrenceRule" - } - }, - { - "name": "save", - "summary": "Saves changes to an event permanently.", - "description": "This method raises an exception if it is passed an event from another calendar.\n\nWhen an event is saved, it is updated in the Calendar database. Any fields you did\nnot modify are updated to reflect the most recent value in the database. If the\nevent has been deleted from the database, it is re-created as a new event.\n\nOn Android, this method only updates the recurrence rule (if set). See [TIMOB-24248](https://jira-archive.titaniumsdk.com/TIMOB-24248)\nto track this new feature.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "span", - "summary": "The span to use. Indicates whether the save affects future instances of the\nevent in the case of a recurring event.\n", - "type": "Number" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "remove", - "summary": "Removes an event from the calendar.", - "description": "This method raises an exception on iOS if an event from another calendar is used.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "span", - "summary": "iOS-only: The span to use. Indicates whether to remove future instances of the event in\nthe case of a recurring event.\n", - "type": "Number" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "refresh", - "summary": "Updates the event's data with the current information in the Calendar database.", - "description": "This method should be only used on events that your application is editing, and only\nwhen your application receives the [change](Titanium.Calendar.change) notification.\nIf this method returns NO, the event has been deleted or otherwise invalidated,\nand you should not continue to use it.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "addRecurrenceRule", - "summary": "Adds a recurrence rule to the recurrence rule array.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "rule", - "summary": "The recurrence rule to be added.", - "type": "Titanium.Calendar.RecurrenceRule" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeRecurrenceRule", - "summary": "Removes a recurrence rule to the recurrence rule array.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "rule", - "summary": "The recurrence rule to be removed.", - "type": "Titanium.Calendar.RecurrenceRule" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "alerts", - "summary": "Alarms associated with the calendar item, as an array of objects.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "allDay", - "summary": "Indicates whether this event is all day.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "begin", - "summary": "Start date/time of this event.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "notes", - "summary": "Notes for this event.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "description", - "summary": "Description of this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "end", - "summary": "End date/time of this event.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "extendedProperties", - "summary": "Extended properties of this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Dictionary", - "permission": "read-only" - }, - { - "name": "hasAlarm", - "summary": "Indicates whether an alarm is scheduled for this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "id", - "summary": "Identifier of this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "location", - "summary": "Location of this event.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "reminders", - "summary": "Existing reminders for this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "status", - "summary": "Status of this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.STATUS_NONE", - "Titanium.Calendar.STATUS_CANCELED", - "Titanium.Calendar.STATUS_CONFIRMED", - "Titanium.Calendar.STATUS_TENTATIVE" - ] - }, - { - "name": "availability", - "summary": "Availability of this event.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Calendar.AVAILABILITY_NOTSUPPORTED", - "Titanium.Calendar.AVAILABILITY_BUSY", - "Titanium.Calendar.AVAILABILITY_FREE", - "Titanium.Calendar.AVAILABILITY_TENTATIVE", - "Titanium.Calendar.AVAILABILITY_UNAVAILABLE" - ] - }, - { - "name": "isDetached", - "summary": "Boolean value that indicates whether an event is a detached instance of a\nrepeating event.\n", - "description": "This value is `YES` if and only if the event is part of a repeating event\nand one or more of its attributes have been modified from the repeating event's\ndefault attributes.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "title", - "summary": "Title of this event.", - "description": "This property is read-only on Android.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "recurrenceRules", - "summary": "The recurrence rules for the calendar item.", - "description": "On Android, only the first element of the recurrenceRules is taken into account\ndue to the way it handles conditions for recurrence rules.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "visibility", - "summary": "Visibility of this event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.VISIBILITY_CONFIDENTIAL", - "Titanium.Calendar.VISIBILITY_DEFAULT", - "Titanium.Calendar.VISIBILITY_PRIVATE", - "Titanium.Calendar.VISIBILITY_PUBLIC" - ] - }, - { - "name": "attendees", - "summary": "The list of event attendees. This list will be empty if the event has no attendees.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Calendar.RecurrenceRule": { - "name": "Titanium.Calendar.RecurrenceRule", - "summary": "An object that is used to describe the recurrence pattern for a recurring event.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml", - "description": "On Android there is no option to have multiple recurrence rules set for the same event.\nAndroid always uses only the first element in the array passed to [recurrenceRules](Titanium.Calendar.Event.recurrenceRules).\n\nIn case of having [daysOfTheWeek](Titanium.Calendar.RecurrenceRule.daysOfTheWeek) and [daysOfTheMonth](Titanium.Calendar.RecurrenceRule.daysOfTheWeek)\nfor an event with a recurrence rule of type [RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY) only\n[daysOfTheWeek] will be used.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "calendarID", - "summary": "Identifier for the recurrence rule's calendar.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "frequency", - "summary": "Frequency of the recurrence rule.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.RECURRENCEFREQUENCY_DAILY", - "Titanium.Calendar.RECURRENCEFREQUENCY_WEEKLY", - "Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY", - "Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY" - ] - }, - { - "name": "interval", - "summary": "The interval between instances of this recurrence. For example, a weekly\nrecurrence rule with an interval of 2 occurs every other week. Must be greater than 0.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 1, - "permission": "read-only" - }, - { - "name": "daysOfTheWeek", - "summary": "The days of the week that the event occurs, as an array of objects `daysOfWeek` and `Week`.\n", - "description": "On Android daysOfTheWeek is not valid for recurrence rules of type\n[RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "daysOfTheMonth", - "summary": "The days of the month that the event occurs, as an array of number objects.\nValues can be from 1 to 31 and from -1 to -31. This parameter is only valid for\nrecurrence rules of type\n[RECURRENCEFREQUENCY_MONTHLY](Titanium.Calendar.RECURRENCEFREQUENCY_MONTHLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "monthsOfTheYear", - "summary": "The months of the year that the event occurs, as an array of Number objects.\nValues can be from 1 to 12. This parameter is only valid for recurrence rules of\ntype [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "weeksOfTheYear", - "summary": "The weeks of the year that the event occurs, as an array of number objects.\nValues can be from 1 to 53 and from -1 to -53. This parameter is only valid for\nrecurrence rules of type [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "daysOfTheYear", - "summary": "The days of the year that the event occurs, as an array of number objects.\nValues can be from 1 to 366 and from -1 to -366. This parameter is only valid for\nrecurrence rules of type [RECURRENCEFREQUENCY_YEARLY](Titanium.Calendar.RECURRENCEFREQUENCY_YEARLY).\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "setPositions", - "summary": "An array of ordinal numbers that filters which recurrences to include in the\nrecurrence rule's frequency. For example, a yearly recurrence rule that has a\n[daysOfTheWeek](Titanium.Calendar.RecurrenceRule.daysOfTheWeek) value that specifies\nMonday through Friday, and a `setPositions` array containing 2 and -1, occurs only\non the second weekday and last weekday of every year.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "end", - "summary": "End of a recurrence rule.", - "description": "The recurrence end can be specified by a date (date-based) or by a maximum count\nof occurrences (count-based). An event which is set to never end **should not**\nhave its `recurrenceEnd set. Either `endDate` or `occurrenceCount` property will be\npresent.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "recurrenceEndDictionary", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "daysOfTheWeekDictionary": { - "name": "daysOfTheWeekDictionary", - "summary": "Dictionary containing `daysOfWeek` and `week`.", - "extends": "Object", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml", - "properties": [ - { - "name": "daysOfWeek", - "summary": "The day of the week. Values are from 1 to 7, with Sunday being 1.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "week", - "summary": "The week number of the day of the week.\nValues range from -53 to 53. A negative value indicates a value from the end of\nthe range. 0 indicates the week number is irrelevant.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "recurrenceEndDictionary": { - "name": "recurrenceEndDictionary", - "summary": "Dictionary containing either `endDate` or `occurrenceCount` property.", - "extends": "Object", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/RecurrenceRule.yml", - "properties": [ - { - "name": "endDate", - "summary": "End date of the recurrence end, or undefined if the recurrence end is count-based.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date" - }, - { - "name": "occurrenceCount", - "summary": "Occurrence count of the recurrence end, or 0 if the recurrence end is date-based.", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Calendar.Reminder": { - "name": "Titanium.Calendar.Reminder", - "summary": "An object that represents a single reminder for an event in a calendar.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Calendar/Reminder.yml", - "description": "Reminders should be created using the method \nrather than directly.\n\nSee for examples of retrieving reminder information and creating \nreminders for events.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "id", - "summary": "Identifier of this reminder.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "method", - "summary": "Method by which this reminder will be delivered.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Calendar.METHOD_ALERT", - "Titanium.Calendar.METHOD_DEFAULT", - "Titanium.Calendar.METHOD_EMAIL", - "Titanium.Calendar.METHOD_SMS" - ] - }, - { - "name": "minutes", - "summary": "Reminder notice period in minutes, that determines how long prior to the event this reminder \nshould trigger.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Codec": { - "name": "Titanium.Codec", - "summary": "A module for translating between primitive types and raw byte streams.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml", - "description": "The `Codec` module can be used for encoding strings and numbers into [Buffer](Titanium.Buffer)\nobjects, and decoding primitive types from buffers.\n\n#### Byte Order\n\nMulti-byte data can be stored in two different byte orders: big-endian or\nlittle-endian. In big-endian byte order, the most significant or highest-value\nbyte is stored first. For example, the 4-byte integer 0xFEDCBA98 is made up of the\nbytes 0xFE, 0xDC, 0xBA and 0x98, from most-significant to least-significant.\n\nIf we represent a buffer as an array of byte values, a big-endian encoding of\n0xFEDCBA98 would look like this:\n\n``` js\n[ 0xFE, 0xDC, 0xBA, 0x98 ]\n```\n\nIn little-endian order, the bytes would be stored in this order:\n\n``` js\n[ 0x98, 0xBA, 0xDC, 0xFE ]\n```\n\nFor 8-bit character encodings, including ASCII, Latin-1 and UTF-8, byte order is not\nsignificant: the text is a sequence of individual bytes.\n\nFor UTF-16, text is represented as a sequence of 16-bit values. For example,\na capital T in UTF-16 is 0x0054, and lowercase i is 0x0069. If we encode the string\n\"Ti\" with UTF-16 in big-endian byte order, we get:\n\n``` js\n[ 0x00, 0x54, 0x00, 0x69 ]\n```\n\nIn UTF-16 with little-endian byte order, \"Ti\" is encoded as:\n\n``` js\n[ 0x54, 0x00, 0x69, 0x00 ]\n```\n\nNote that the bytes for each character are stored least-significant byte first, but\nthe order of the characters is unchanged.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getNativeByteOrder", - "summary": "Get the OS native byte order (either or\n).\n", - "description": "See \"Byte Order\" in the main discussion of for more information.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "OS native byte order.", - "type": "Number" - } - }, - { - "name": "encodeNumber", - "summary": "Encodes a number and writes it to a buffer.", - "description": "Takes a set of named parameters passed in the `options` argument.\n\nEncodes the number `source` into `dest` using the passed in data `type`.\n\nTwo optional parameters can also be specified in `options`:\n\n* If `position` is included in the `options` dictionary, writes the encoded number\n to the buffer starting at `position`.\n\n* If `byteOrder` is included in the `options` dictionary, the specified byte order\n is used -- otherwise, the native byte order is assumed.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Encode a Double-Precision Floating Point Value", - "code": "This example encodes a double-precision floating point value in 8 bytes using the OS byte\norder.\n\n``` js\nvar buffer = Ti.createBuffer({ length: 8 });\nTi.Codec.encodeNumber({\n source: 1.23456789,\n dest: buffer,\n type: Ti.Codec.TYPE_DOUBLE\n});\n```\n" - }, - { - "description": "Encode an Integer Specifying Start Position and Byte Order", - "code": "This example encodes a 4-byte integer using big endian encoding, and\nwrites it to the supplied buffer starting at index position 10.\n\n``` js\nvar buffer = Ti.createBuffer({ length: 100 });\nTi.Codec.encodeNumber({\n source: 0x3456789a,\n dest: buffer,\n position: 10,\n type: Ti.Codec.TYPE_INT,\n byteOrder: Ti.Codec.BIG_ENDIAN\n});\n```\n" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Named parameters.", - "type": "EncodeNumberDict" - } - ], - "returns": { - "summary": "Position _after_ the encoded number in `dest`.", - "type": "Number" - } - }, - { - "name": "decodeNumber", - "summary": "Decodes a number from the `source` buffer using the specified data type.\n", - "description": "Takes a set of named parameters in the `options` argument.\n\nBytes are read from the `source` buffer and decoded as the specified data type, `type`.\n\nTwo optional parameters can also be specified in `options`:\n\n* If `position` is included in the `options` dictionary, reads data from the\n buffer starting at `position`.\n\n* If `byteOrder` is included in the `options` dictionary, the specified byte order\n is used -- otherwise, the native byte order is assumed.\n\nThrows an exception if `source` is null, or `position` is greater than `source.length`\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Decode a Double-Precision Floating Point Number", - "code": "This sample decodes an 8-byte double-precision floating point number using the\nOS byte order.\n\n``` js\nvar buffer = // a buffer containing (at least) one 8-byte floating-point number\nvar value = Ti.Codec.decodeNumber({\n source: buffer,\n type: Ti.Codec.TYPE_DOUBLE\n});\n```\n" - }, - { - "description": "Decode an Integer Specifying Start Position and Byte Order", - "code": "This sample decodes a 4-byte integer starting at index position 10 in the\nbuffer, using big endian encoding.\n\n``` js\nvar buffer = // a buffer containing a 4-byte integer at position 10.\nvar value = Ti.Codec.decodeNumber({\n source: buffer,\n position: 10,\n type: Ti.Codec.TYPE_INT,\n byteOrder: Ti.Codec.BIG_ENDIAN\n});\n```\n" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Named parameters.", - "type": "DecodeNumberDict" - } - ], - "returns": { - "summary": "Number decoded from `source`.", - "type": "Number" - } - }, - { - "name": "encodeString", - "summary": "Encodes a string into a series of bytes in a buffer using the specified character set.\n", - "description": "Takes a set of named parameters in the `options` argument.\n\nThe string is read from `source` and written to the buffer `dest`.\n\nSeveral optional parameters can also be specified in `options`:\n\n* If `charset` is included, the string is encoded using the specified character\n encoding.\n\n* If `destPosition` is included, data is written into the buffer starting at\n the specified position.\n\n* If `sourcePosition` is included, a substring of the source string starting at the\n specified position is encoded.\n\n* If `sourceLength` is included, at most the specified number of characters\n are encoded.\n\nThrows an exception if `charset` is not a valid character set,\n`source` is null, or either `sourcePosition`, `sourceLength`, or\n`sourcePosition`+`sourceLength` is greater than `source.length`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Encode String with Default Character Encoding", - "code": "This sample encodes a string using the default character encoding (UTF-8), then trims the\nbuffer to the length of the encoded string.\n\n``` js\nvar buffer = Ti.createBuffer({ length: 1024 });\nvar length = Ti.Codec.encodeString({\n source: \"hello world\",\n dest: buffer\n});\nbuffer.length = length;\n```\n" - }, - { - "description": "Encode Substring with Specified Character Encoding", - "code": "This sample encodes the first 10 characters of a string using UTF-16 character encoding.\n\n``` js\n// (10 * 2) + BOM = 22\nvar buffer = Ti.createBuffer({ length: 22 });\nTi.Codec.encodeString({\n source: \"jack jumped over the candle stick\",\n sourceLength: 10,\n dest: buffer,\n charset: Ti.Codec.CHARSET_UTF16\n});\n```\n" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Named parameters.", - "type": "Dictionary" - } - ], - "returns": { - "summary": "An index indicating the first byte in the destination buffer _after_ the\nencoded string.\n", - "type": "Number" - } - }, - { - "name": "decodeString", - "summary": "Decodes the source buffer into a String using the supplied character set.\n", - "description": "Takes a set of named parameters in the `options` argument.\n\nBytes are read from the `source` buffer and decoded as a string.\n\nSeveral optional parameters can also be specified in `options`:\n\n* If `position` is specified, bytes are read from `source` starting at `position`.\n\n* If `length` is specified, no more than `length` bytes are read.\n\n* If `charset` is specified, it determines the character encoding used to decode the\n string. Otherwise, UTF-8 is assumed.\n\nThrows an exception if `charset` is not a valid character set, `source` is null,\nor either `position`, `length`, or `position`+`length` is greater than `source.length`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Decode a String", - "code": "This sample decodes a string using the default character encoding.\n\n``` js\nvar buffer = // a buffer containing an encoded string\nvar string = Ti.Codec.decodeString({ source: buffer });\n```\n" - }, - { - "description": "Decode a String with a Specified Character Encoding", - "code": "This sample decodes a string using the UTF-16 character encoding.\n\n``` js\nvar buffer = // a buffer containing a UTF-16 encoded string\nvar string = Ti.Codec.decodeString({\n source: buffer,\n charset: Ti.Codec.CHARSET_UTF16\n});\n```\n" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Named parameters.", - "type": "DecodeStringDict" - } - ], - "returns": { - "summary": "The decoded string", - "type": "String" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "CHARSET_ASCII", - "summary": "ASCII character encoding..", - "description": "See also: [ASCII](http://en.wikipedia.org/wiki/ASCII) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "ascii" - }, - { - "name": "CHARSET_ISO_LATIN_1", - "summary": "ISO 8859-1 (Latin-1) character encoding.", - "description": "See also: [ISO/IEC 8859-1](http://en.wikipedia.org/wiki/ISO/IEC_8859-1) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "latin1" - }, - { - "name": "CHARSET_UTF8", - "summary": "UTF-8 character encoding.", - "description": "See also: [UTF-8](http://en.wikipedia.org/wiki/UTF-8) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "utf8" - }, - { - "name": "CHARSET_UTF16", - "summary": "UTF-16 character encoding with default byte order.", - "description": "See also: [UTF-16/UCS2](http://en.wikipedia.org/wiki/UTF-16/UCS-2) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "utf16" - }, - { - "name": "CHARSET_UTF16BE", - "summary": "UTF-16 character encoding with big endian byte order.", - "description": "See also: [UTF-16/UCS2](http://en.wikipedia.org/wiki/UTF-16/UCS-2) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "utf16be" - }, - { - "name": "CHARSET_UTF16LE", - "summary": "UTF-16 character encoding with little endian byte order.", - "description": "See also: [UTF-16/UCS2](http://en.wikipedia.org/wiki/UTF-16/UCS-2) on Wikipedia.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "utf16le" - }, - { - "name": "TYPE_BYTE", - "summary": "8-bit integer encoding type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "byte" - }, - { - "name": "TYPE_SHORT", - "summary": "16-bit integer encoding type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "short" - }, - { - "name": "TYPE_INT", - "summary": "32-bit integer encoding type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "int" - }, - { - "name": "TYPE_FLOAT", - "summary": "32-bit single precision floating-point type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "float" - }, - { - "name": "TYPE_LONG", - "summary": "64-bit integer encoding type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "long" - }, - { - "name": "TYPE_DOUBLE", - "summary": "64-bit double precision floating-point type.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "double" - }, - { - "name": "BIG_ENDIAN", - "summary": "Big endian (network) byte order -- that is, the most significant byte first.", - "description": "See \"Byte Order\" in the main discussion of for more information.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LITTLE_ENDIAN", - "summary": "Little endian byte order -- that is, the least significant byte first.", - "description": "See \"Byte Order\" in the main discussion of for more information.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "EncodeNumberDict": { - "name": "EncodeNumberDict", - "summary": "Named parameters for .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml", - "properties": [ - { - "name": "source", - "summary": "Number to encode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "optional": false - }, - { - "name": "dest", - "summary": "Destination buffer.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Buffer", - "optional": false - }, - { - "name": "type", - "summary": "Encoding type to use.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false, - "constants": [ - "Titanium.Codec.TYPE_BYTE", - "Titanium.Codec.TYPE_SHORT", - "Titanium.Codec.TYPE_INT", - "Titanium.Codec.TYPE_FLOAT", - "Titanium.Codec.TYPE_LONG", - "Titanium.Codec.TYPE_DOUBLE" - ] - }, - { - "name": "position", - "summary": "Index in the `dest` buffer of the first byte of encoded data.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "byteOrder", - "summary": "Byte order to encode with.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Native byte order.", - "optional": true - } - ] - }, - "DecodeNumberDict": { - "name": "DecodeNumberDict", - "summary": "Named parameters for .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml", - "properties": [ - { - "name": "source", - "summary": "Buffer to decode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Buffer", - "optional": false - }, - { - "name": "type", - "summary": "The encoding type to use.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false, - "constants": [ - "Titanium.Codec.TYPE_BYTE", - "Titanium.Codec.TYPE_SHORT", - "Titanium.Codec.TYPE_INT", - "Titanium.Codec.TYPE_FLOAT", - "Titanium.Codec.TYPE_LONG", - "Titanium.Codec.TYPE_DOUBLE" - ] - }, - { - "name": "position", - "summary": "Index in the `source` buffer of the first byte of data to decode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "byteOrder", - "summary": "byte order to decode with.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Native byte order.", - "optional": true - } - ] - }, - "EncodeStringDict": { - "name": "EncodeStringDict", - "summary": "Named parameters for .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml", - "properties": [ - { - "name": "source", - "summary": "Source string to encode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": false - }, - { - "name": "dest", - "summary": "Destination buffer.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Buffer", - "optional": false - }, - { - "name": "destPosition", - "summary": "Index in the `dest` buffer of the first byte of the encoded string.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "sourcePosition", - "summary": "Position in `source` to start encoding.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "sourceLength", - "summary": "Number of characters in `source` to encode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "The length of `source`", - "optional": true - }, - { - "name": "charset", - "summary": "Character encoding to use when encoding this string to bytes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "", - "optional": true, - "constants": [ - "Titanium.Codec.CHARSET_ASCII", - "Titanium.Codec.CHARSET_ISO_LATIN_1", - "Titanium.Codec.CHARSET_UTF8", - "Titanium.Codec.CHARSET_UTF16", - "Titanium.Codec.CHARSET_UTF16BE", - "Titanium.Codec.CHARSET_UTF16LE" - ] - } - ] - }, - "DecodeStringDict": { - "name": "DecodeStringDict", - "summary": "Named parameters for .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Codec/Codec.yml", - "properties": [ - { - "name": "source", - "summary": "Buffer to decode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Buffer", - "optional": false - }, - { - "name": "position", - "summary": "Index in the `source` buffer of the first byte of data to decode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "optional": true - }, - { - "name": "length", - "summary": "Number of bytes to decode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Length of `source`", - "optional": true - }, - { - "name": "charset", - "summary": "Character set to use when encoding this string to bytes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "", - "optional": true, - "constants": [ - "Titanium.Codec.CHARSET_ASCII", - "Titanium.Codec.CHARSET_ISO_LATIN_1", - "Titanium.Codec.CHARSET_UTF8", - "Titanium.Codec.CHARSET_UTF16", - "Titanium.Codec.CHARSET_UTF16BE", - "Titanium.Codec.CHARSET_UTF16LE" - ] - } - ] - }, - "Titanium.Contacts": { - "name": "Titanium.Contacts", - "summary": "The top-level Contacts module, used for accessing and modifying the system contacts address book.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml", - "description": "See examples for more information.\n\n#### iOS Platform Notes\n\nOn iOS, the contacts database may be modified by an external application, causing any `Person` or\n`Group` objects you've retrieved to be out of sync with the database. The IDs of these objects are\nnot guaranteed to remain the same, so updating an object when it is out of sync may have\nunpredictable results.\n\nTo avoid this, listen for the [reload](Titanium.Contacts.reload) event. When you receive a\n`reload` event, you should assume that any existing `Person` or `Group` objects are invalid and\nreload them from the `Contacts` module before modifying them.\n\nSee the examples for a sample use of the `reload` event.\n\nIf 'ABAddressBookErrorDomain error 0' occurs, it implies that you are not allowed to add or edit\ncertain fields. Check your default account in the iOS settings under contacts. If it's not 'iCloud',\nmost likely it will not support fields such as alternateBirthday or socialProfile.\n\nThese APIs are unavailable on macOS if the app is built on a version of Xcode < 12.\n", - "events": [ - { - "name": "reload", - "summary": "Fired when the database backing the contacts module is modified externally.", - "description": "If you have an existing reference to a `Person` or `Group` object, you should obtain\na new reference from the `Contacts` module. Using the existing object may result\nin unpredictable behavior, such as updating the wrong contact.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "Request access to the address book", - "code": "``` js\nvar performAddressBookFunction = function(){...};\nvar addressBookDisallowed = function(){...};\nif (Ti.Contacts.hasContactsPermissions()) {\n performAddressBookFunction();\n} else {\n Ti.Contacts.requestContactsPermissions(function(e) {\n if (e.success) {\n performAddressBookFunction();\n } else {\n addressBookDisallowed();\n }\n });\n}\n```\n" - }, - { - "description": "Query Existing System Address Book Records", - "code": "Output to the console all properties of all people.\n\n``` js\nvar singleValue = [\n 'recordId', 'firstName', 'middleName', 'lastName', 'fullName', 'prefix', 'suffix',\n 'nickname', 'firstPhonetic', 'middlePhonetic', 'lastPhonetic', 'organization',\n 'jobTitle', 'department', 'note', 'birthday', 'created', 'modified', 'kind'\n];\nvar multiValue = [\n 'email', 'address', 'phone', 'instantMessage', 'relatedNames', 'date', 'url'\n];\nvar people = Ti.Contacts.getAllPeople();\nTi.API.info('Total contacts: ' + people.length);\nfor (var i=0, ilen=people.length; i\nobject is queried in the same way that it is created (as shown in the previous example.)\n\n``` js\nTi.API.info('Saving contact...');\nTi.Contacts.createPerson({\n firstName: 'Paul',\n lastName: 'Dowsett',\n address:{\n work:[\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '200 Brook Drive\\nGreen Park',\n City: 'Reading',\n County: 'Berkshire',\n Country: 'England',\n ZIP: 'RG2 6UB'\n },\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '1 St Pauls Road\\nClerkenwell',\n City: 'City of London',\n State: 'London',\n Country: 'England',\n ZIP: 'EC1 1AA'\n }\n ],\n home:[\n {\n CountryCode: 'gb', // determines how the address is displayed\n Street: '2 Boleyn Court',\n City: 'London',\n State: 'Greenwich',\n Country: 'England',\n ZIP: 'SE10'\n }\n ]\n },\n birthday: '2012-01-01T12:00:00.000+0000',\n instantMessage:{\n home:[\n {\n service: 'AIM',\n username: 'leisureAIM'\n },\n {\n service: 'MSN',\n username: 'no_paul_here@msn.com'\n }\n ],\n work:[\n {\n service: 'AIM',\n username: 'seriousAIM'\n }\n ]\n },\n organization: 'Appcelerator',\n phone:{\n mobile: ['07900 000001', '07900 000002'],\n work: ['+44 (0)118 925 6128', '+44 (0)118 000 0000']\n },\n url:{\n homepage: ['www.google.com'],\n work: ['www.titaniumsdk.com', 'www.example.com']\n }\n});\nTi.API.info('Contact saved');\n\nTi.API.info('Saving contact...');\nvar workAddress1 = {\n 'CountryCode': 'us',\n 'Street': '440 N. Bernardo Avenue',\n 'City': 'Mountain View',\n 'State': 'California',\n 'Country': 'United States',\n 'ZIP': '94043'\n};\n\nTi.Contacts.createPerson({\n firstName:'Arthur',\n lastName:'Evans',\n address:{\n 'work':[workAddress1]\n }\n});\nTi.API.info('Contact saved');\n```\n" - }, - { - "description": "Repopulate contact data if it was modified externally", - "code": "Listen for the `reload` event to repopulate the contact data\nif it was modified externally, for example, in the iOS Contacts app.\n\n``` js\nvar win = Ti.UI.createWindow();\nvar table = Ti.UI.createTableView();\n\n// Repopulate contact data\nfunction reloadContacts() {\n var contacts = Ti.Contacts.getAllPeople();\n var data = [];\n for (var i = 0; i < contacts.length; i++) {\n var title = contacts[i].fullName;\n if (!title || title.length === 0) {\n title = \"(no name)\";\n }\n var row = Ti.UI.createTableViewRow({\n title: title\n });\n data.push(row);\n }\n table.data = data;\n}\n\nTi.Contacts.addEventListener('reload', function(e){\n alert('Reloading contacts. Your contacts were changed externally!');\n reloadContacts();\n});\n\n// initial call to populate contact data\nreloadContacts();\n\nwin.add(table);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createGroup", - "summary": "Creates and returns an instance of .", - "description": "This method must be followed by to commit its changes.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any in except\nthose marked as non-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Contacts.Group" - } - }, - { - "name": "createPerson", - "summary": "Creates and returns an instance of , and commits all pending\nchanges to the underlying contacts database.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any in except\nthose marked as non-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Contacts.Person" - } - }, - { - "name": "getAllGroups", - "summary": "Gets all groups.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getAllPeople", - "summary": "Gets all people, unless a limit is specified.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "limit", - "summary": "Maximum number of people. Android only.", - "type": "Number" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getGroupByIdentifier", - "summary": "Gets the group with the specified identifier.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Group identifier.", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Contacts.Group" - } - }, - { - "name": "getPeopleWithName", - "summary": "Gets people with a `firstName`, `middleName` or `lastName` field, or a combination\nof these fields, that match the specified name.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name to match.", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getPersonByIdentifier", - "summary": "Gets the person with the specified identifier.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - }, - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "id", - "summary": "Contact identifier.", - "type": "Number" - } - ], - "returns": { - "type": "Titanium.Contacts.Person" - } - }, - { - "name": "removeGroup", - "summary": "Removes a group from the address book.", - "description": "This method must be followed by to commit its changes.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "group", - "summary": "Contact group.", - "type": "Titanium.Contacts.Group" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removePerson", - "summary": "Removes a contact from the address book.", - "description": "On iOS:\n\nThis method must be followed by a save action to commit the data to the underlying database,\nwhich can be done explicitly using or implicitly using\n. Although the object will still\nexist once committed, it will no longer be valid. Continuing to use it will result in\nunpredictable behavior, including crashes.\n\nOn Android:\n\nThis method will remove the person from the Contacts book automatically.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "person", - "summary": "Contact.", - "type": "Titanium.Contacts.Person" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "save", - "summary": "Commits all pending changes to the underlying contacts database.", - "description": "On Android:\n\nTakes an array of objects and saves changes for\nthe specified contacts only.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "contacts", - "summary": "List of contacts to save. Used on Android only.", - "type": "Array" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "showContacts", - "summary": "Displays a picker that allows a person to be selected.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Argument containing parameters for this method. Optional on Android.", - "type": "showContactsParams" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hasContactsPermissions", - "summary": "Returns `true` if the app has contacts access.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestContactsPermissions", - "summary": "Requests for contacts access.", - "description": "On Android, the request view will show if the permission is not accepted by the user, and the user did\nnot check the box \"Never ask again\" when denying the request. If the user checks the box \"Never ask again,\"\nthe user has to manually enable the permission in device settings.\n\nThis method requests `Manifest.permission.READ_CONTACTS` and `Manifest.permission.WRITE_CONTACTS` on Android.\nIf you require other permissions, you can also use .\n\nIn iOS 6, Apple introduced the Info.plist key `NSContactsUsageDescription` that is used to display an\nown description while authorizing contacts permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html) for more information.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call upon user decision to grant contacts access.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "includeNote", - "summary": "A boolean value that indicates whether to fetch the notes stored in contacts or not.", - "description": "This property need to be set before calling contacts APIs.\nFrom iOS 13 or later if your app fetch note field from contact, the app must have to set key 'com.apple.developer.contacts.notes' to 'true' in entitlements section of tiapp.xml.\n\n``` xml\ncom.apple.developer.contacts.notes\n\n```\n\nSee more details at https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_developer_contacts_notes and https://developer.apple.com/contact/request/contact-note-field.\n", - "platforms": [ - { - "since": "8.2.1", - "name": "iphone" - }, - { - "since": "8.2.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "CONTACTS_KIND_ORGANIZATION", - "summary": "Specifies that a contact is an organization.", - "description": "Used with the property.\n\nOne of the group of contact \"kind\" constants\n[CONTACTS_KIND_ORGANIZATION](Titanium.Contacts.CONTACTS_KIND_ORGANIZATION),\nand [CONTACTS_KIND_PERSON](Titanium.Contacts.CONTACTS_KIND_PERSON).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CONTACTS_KIND_PERSON", - "summary": "Specifies that a contact is a person.", - "description": "Used with the property.\nOne of the group of contact \"kind\" constants [CONTACTS_KIND_ORGANIZATION](Titanium.Contacts.CONTACTS_KIND_ORGANIZATION), and [CONTACTS_KIND_PERSON](Titanium.Contacts.CONTACTS_KIND_PERSON).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CONTACTS_SORT_FIRST_NAME", - "summary": "Specifies that group members will be sorted by first name.", - "description": "Used with the method.\nOne of the group of contact group \"sort\" constants [CONTACTS_SORT_FIRST_NAME](Titanium.Contacts.CONTACTS_SORT_FIRST_NAME), and [CONTACTS_SORT_LAST_NAME](Titanium.Contacts.CONTACTS_SORT_LAST_NAME).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CONTACTS_SORT_LAST_NAME", - "summary": "Specifies that group members will be sorted by last name.", - "description": "Used with the method.\nOne of the group of contact group \"sort\" constants [CONTACTS_SORT_FIRST_NAME](Titanium.Contacts.CONTACTS_SORT_FIRST_NAME), and [CONTACTS_SORT_LAST_NAME](Titanium.Contacts.CONTACTS_SORT_LAST_NAME).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_AUTHORIZED", - "summary": "A [contactsAuthorization](Titanium.Contacts.contactsAuthorization) value\nindicating that the application is authorized to use the address book.\n", - "description": "This value is always returned on Android devices, as well as on iOS versions earlier than 6.0.\n", - "platforms": [ - { - "since": "2.1.3", - "name": "android" - }, - { - "since": "2.1.3", - "name": "iphone" - }, - { - "since": "2.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_DENIED", - "summary": "A [contactsAuthorization](Titanium.Contacts.contactsAuthorization) value\nindicating that the application is not authorized to use the address book.\n", - "platforms": [ - { - "since": "2.1.3", - "name": "android" - }, - { - "since": "2.1.3", - "name": "iphone" - }, - { - "since": "2.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_UNKNOWN", - "summary": "A [contactsAuthorization](Titanium.Contacts.contactsAuthorization) value\nindicating that the authorization state is unknown.\n", - "platforms": [ - { - "since": "2.1.3", - "name": "android" - }, - { - "since": "2.1.3", - "name": "iphone" - }, - { - "since": "2.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "contactsAuthorization", - "summary": "Returns an authorization constant indicating if the application has access to the address book.", - "description": "Always returns `AUTHORIZATION_AUTHORIZED` on iOS pre-6.0 and Android devices.\n\nIf `contactsAuthorization` is `AUTHORIZATION_RESTRICTED`, you should not\nattempt to re-authorize: this will lead to issues.\n", - "platforms": [ - { - "since": "2.1.3", - "name": "android" - }, - { - "since": "2.1.3", - "name": "iphone" - }, - { - "since": "2.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Contacts.AUTHORIZATION_AUTHORIZED", - "Titanium.Contacts.AUTHORIZATION_DENIED", - "Titanium.Contacts.AUTHORIZATION_UNKNOWN" - ] - } - ] - }, - "showContactsParams": { - "name": "showContactsParams", - "summary": "Dictionary of options for the method.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml", - "properties": [ - { - "name": "animated", - "summary": "Determines whether to animate the show/hide of the contacts picker (iPhone, iPad only.)", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true, - "optional": true - }, - { - "name": "fields", - "summary": "Field names to show when selecting properties. By default, shows all available.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "cancel", - "summary": "Function to call when selection is canceled.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback", - "optional": true - }, - { - "name": "selectedPerson", - "summary": "Function to call when a person is selected. Must not be used with `selectedProperty` property.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback", - "optional": true - }, - { - "name": "selectedProperty", - "summary": "Function to call when a property is selected. Must not be used with `selectedPerson`\nproperty.\nNote: If ringtone or texttone is selected, null values are returned, since these are unsupported\nby Apple.\nSince iOS 9.0, there is a native apple issue whereby it may return null if the birthday property\nis selected on certain device models.\nThe callback contains the selected property and a 'person' object of type .\nSince iOS 9.0, apple only returns the person object with partial information. Currently it is known to\nat least contain the selected property and fullName.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback", - "optional": true - } - ] - }, - "ContactsAuthorizationResponse": { - "name": "ContactsAuthorizationResponse", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Contacts.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "Titanium.Contacts.Group": { - "name": "Titanium.Contacts.Group", - "summary": "An object which represents a group in the system contacts address book.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Group.yml", - "description": "See examples in for more information.\n\nThese APIs are unavailable on macOS if the app is built on a version of Xcode < 12.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Adds a person to this group.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "person", - "summary": "Person to add. For >= iOS 9, it is not required to\ncall after calling this method.\n", - "type": "Titanium.Contacts.Person" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "members", - "summary": "Gets people that are members of this group.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "remove", - "summary": "Removes a person from this group. For >= iOS 9, it is not\nrequired to call after calling this method.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "person", - "summary": "Person to remove.", - "type": "Titanium.Contacts.Person" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "sortedMembers", - "summary": "Gets people that are members of this group, sorted in the specified order.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sortBy", - "summary": "Method for sorting.\n", - "type": "Number" - } - ], - "returns": { - "type": "Array" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "name", - "summary": "Name of this group.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "identifier", - "summary": "Identifier of the group.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Contacts.Person": { - "name": "Titanium.Contacts.Person", - "summary": "An object that represents a contact record for a person or organization in the system contacts \naddress book.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Contacts/Person.yml", - "description": "A person object is created using .\n\nThe following two kinds of properties exist for this object:\n\n* single value - contains either a `string` or `number` type value, an array of `string` type \nvalues, or `null` if unset.\n* multi-value - contains a dictionary with typical keys of `home`, `work` and/or `other`. Each \nkey contains either a `string` type value, an array of `string` type values, or a dictionary \ncontaining key/value pairs with `string` type values.\n\n#### Adding and Modifying Properties\n\nSupport for adding and modifying properties is currently supported on iOS and Android.\n\n#### Keys as Address Book UI Labels\n\nKeys act as labels in the address book user interface.\n\nAlthough there is limited support for custom, arbitrarily-named, keys when used with multi-value \nproperties, there is no support them with single value properties.\n\nOn iOS, creating custom keys is not recommended, and will lead to undefined results.\n\nIf a label has been created by the user of the device and used with a multi-value property, it \nwill exist as a key with the same name.\n\nSee examples in for more information.\n\nThese APIs are unavailable on macOS if the app is built on a version of Xcode < 12.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "address", - "summary": "Addresses for the person. Multi-value. Read-only on Android.", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `home`, `work`, and/or `other`.\n* Values: arrays of dictionary types with seven keys, `CountryCode`, `Street`, `City`, \n, `State`, `Country` and `PostalCode`, each with a `string` type value.\n\nOn Android:\n\n'CountryCode' and 'County' are currently not supported.\n\nOn iOS:\n\nThe `CountryCode` key value may be one of the recognized two-character ISO 3166-1 country \ncodes, and determines the format in which the contact is presented by the address book \nuser interface. See the wikipedia section \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nfor a comprehensive list of codes.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "birthday", - "summary": "Date of birth of the person. Single value.", - "description": "Date format is \"_yyyy_-_MM_-_dd_**T**_HH_**:**_mm_**:**_ss_**.**_SSS_**+0000**\"\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "alternateBirthday", - "summary": "Alternate birthday of the person. Single Dictionary.\n", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: `calendarIdentifier`, `era`, `year`, `month`, `day` and `isLeapMonth`.\n* Values: Use `chinese`, `hebrew` and `islamic-civil` for `calendarIdentifier`.\nUse `number` type for `era`, `year`, `month` and `day`. These must be consistent with\ncorresponding `calendarIdentifier`.\nUse `boolean` type for `isLeapMonth`.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "date", - "summary": "Dates associated with the person. Multi-value.", - "description": "Adding or modifying this property is not currently supported.\n\nThe format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `anniversary` and/or `other`.\n* Values: array of `string` type.\n\nDate format is \"_yyyy_-_MM_-_dd_**T**_HH_**:**_mm_**:**_ss_**.**_SSS_**+0000**\"\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "department", - "summary": "Department of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "email", - "summary": "Email addresses for the person. Multi-value. Read-only on Android.", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `home`, `work`, and/or `other`.\n* Values: array of `string` type.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "firstName", - "summary": "First name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "firstPhonetic", - "summary": "Phonetic first name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "fullName", - "summary": "Localized full name of the person. Single value. Read-only on Android.", - "description": "The full name will be printed in the order of.\nPrefix,first name, middle name, family name, suffix.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "id", - "summary": "Record identifier of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "identifier", - "summary": "Identifier of the person.", - "description": "Prior to iOS 9, use the [recordId](Titanium.Contacts.Person.recordId) property.", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "image", - "summary": "Image for the person. Single value. Read-only for >= iOS 9", - "description": "Set to `null` to remove the image.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob" - }, - { - "name": "instantMessage", - "summary": "Instant messenger information of the person. Multi-value.\n", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `home`, `work` and/or `other`.\n* Values: arrays of dictionary types with two keys, `service` and `username`, each with a \n`string` type value.\n\nThe `service` key value may be one of `AIM`, `Facebook`, `GaduGadu`, `GoogleTalk`, `ICQ`, \n`Jabber`, `MSN`, `QQ`, `Skype`, or `Yahoo`. These values are key sensitive.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "socialProfile", - "summary": "Social profile information of the person. Multi-value.\n", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `home`, `work` and/or `other`.\n* Values: arrays of dictionary types with two keys, `service` and `username` each with a \n`string` type value.\n\nThe `service` key value may be one of `twitter`, `sinaweibo`, `gamecenter`, `facebook`, \n`myspace`, `linkedin`, or `flickr`. These values are key sensitive.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "jobTitle", - "summary": "Job title of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "kind", - "summary": "Determines the type of information the person record contains; either person or organization. \nRead-only on Android.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Contacts.CONTACTS_KIND_ORGANIZATION", - "Titanium.Contacts.CONTACTS_KIND_PERSON" - ] - }, - { - "name": "lastName", - "summary": "Last name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "lastPhonetic", - "summary": "Phonetic last name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "middleName", - "summary": "Middle name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "middlePhonetic", - "summary": "Phonetic middle name of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "nickname", - "summary": "Nickname of the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "note", - "summary": "Notes for the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "organization", - "summary": "Organization to which the person belongs. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "phone", - "summary": "Phone numbers for the person. Multi-value. Read-only on Android.", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `home`, `work`, `other`, `mobile`, `pager`, `workFax`, `homeFax`, `main`, \nand/or `iPhone`.\n* Values: array of `string` type.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "prefix", - "summary": "Prefix for the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "recordId", - "summary": "Record identifier of the person. Single value. Deprecated since iOS 9.", - "description": "For iOS 9 and later, use the [Titanium.Contacts.Person.identifier](Titanium.Contacts.Person.identifier) property. \nPreviously, a contact can be selected without requiring User permission. In such case this \nproperty returns -1. \n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "relatedNames", - "summary": "Names of people to which the person is related. Multi-value.", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `mother`, `father`, `parent`, `brother`, `sister`, `child`, `friend`, `spouse`, \n`partner`, `assistant`, `manager`, and/or `other`.\n* Values: array of `string` type.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "suffix", - "summary": "Suffix for the person. Single value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "url", - "summary": "URLs of webpages associated with the person. Multi-value.", - "description": "The format of the dictionary accepted by this property is as follows:\n\n* Keys: any of `homepage`, `home`, `work`, and/or `other`.\n* Values: array of `string` type.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - } - ], - "subtype": "proxy" - }, - "Titanium.Database.DB": { - "name": "Titanium.Database.DB", - "summary": "The `Database` instance returned by or .", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/DB.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "close", - "summary": "Closes the database and releases resources from memory. Once closed, this instance is no\nlonger valid and should not be used. On iOS, also closes all \ninstances that exist.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "execute", - "summary": "Executes an SQL statement against the database and returns a `ResultSet`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Executing a Query", - "code": "The following code will install a database using\n[Titanium.Database.install](Titanium.Database.install) and execute SQL statements that will\ncreate a table, insert data and query the table.\n\n``` js\nvar db = Ti.Database.install('mydb1', 'mydb1Installed');\ndb.execute('DELETE FROM people');\ndb.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)');\n\nvar thisName = 'Arthur';\nvar thisPhoneNo = '1-617-000-0000';\nvar thisCity = 'Mountain View';\ndb.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', thisName, thisPhoneNo, thisCity);\n\nvar personArray = ['Paul','020 7000 0000', 'London'];\ndb.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', personArray);\n\nvar rows = db.execute('SELECT rowid,name,phone_number,city FROM people');\ndb.close();\n\nwhile (rows.isValidRow()) {\n Ti.API.info('Person ---> ROWID: ' + rows.fieldByName('rowid') + ', name:' + rows.field(1) + ', phone_number: ' + rows.fieldByName('phone_number') + ', city: ' + rows.field(3));\n rows.next();\n}\nrows.close();\n```\n\nNote that the above `SELECT` query contains the [rowid](http://www.sqlite.org/lang_createtable.html#rowid)\ncolumn, which is a SQLite-specific column that stores the unique identifier for each row.\n" - } - ], - "parameters": [ - { - "name": "sql", - "summary": "SQL to execute. May include placeholders for parameter substitution.", - "type": "String" - }, - { - "name": "vararg", - "summary": "Either a variable ordered list of zero or more values, or an array of values,\nto be substituted with the respective `?` placeholder of the query.\n", - "type": [ - "String", - "Array", - "Object", - "Array" - ], - "optional": true, - "repeatable": true - } - ], - "returns": { - "type": "Titanium.Database.ResultSet" - } - }, - { - "name": "executeAsync", - "summary": "Asynchronously executes an SQL statement against the database and fires a callback with a possible `Error` argument, and a second argument holding a possible `ResultSet`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "query", - "summary": "SQL query to execute. May include placeholders for parameter substitution.", - "type": "String" - }, - { - "name": "vararg", - "summary": "Either a variable ordered list of zero or more values, or an array of values,\nto be substituted with the respective `?` placeholder of the query.\n", - "type": [ - "String", - "Array", - "Object", - "Array" - ], - "optional": true - }, - { - "name": "callback", - "summary": "Callback when query execution has completed.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "executeAll", - "summary": "Synchronously executes an array of SQL statements against the database and returns an array of `ResultSet`.\nOn failure, this will throw an [Error](BatchQueryError) that reports the failed index and partial results\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "queries", - "summary": "Array of SQL queries to execute.", - "type": "Array" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "executeAllAsync", - "summary": "Asynchronously executes an array of SQL statements against the database and fires a callback with a possible Error, and an array of `ResultSet`.\nOn failure, this will call the callback with an [Error](PossibleBatchQueryError) that reports the failed `index`, and a second argument with the partial `results`.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "queries", - "summary": "Array of SQL queries to execute.", - "type": "Array" - }, - { - "name": "callback", - "summary": "Callback when query execution has completed.", - "type": "Callback>", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.\nIf the `Promise` is rejected, the `Error` will have custom properties indicating the `index` of the failed query, and the partial `results` up to that failure. See .\n", - "type": "Promise>" - } - }, - { - "name": "remove", - "summary": "Removes the database files for this instance from disk. WARNING: this is a destructive\noperation and cannot be reversed. All data in the database will be lost; use with caution.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "file", - "summary": "A `File` object representing the file where this database is stored. Must only be used for\nsetting file properties.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Filesystem.File", - "permission": "read-only" - }, - { - "name": "lastInsertRowId", - "summary": "The identifier of the last populated row.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "name", - "summary": "The name of the database.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "rowsAffected", - "summary": "The number of rows affected by the last query.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "BatchQueryError": { - "name": "BatchQueryError", - "summary": "Simple `Error` instance thrown from the\n[executeAll](Titanium.Database.DB.executeAll) method in case of failure\n", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/DB.yml", - "properties": [ - { - "name": "index", - "summary": "Index of the failed query", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "results", - "summary": "partial `ResultSet`s of any successful queries before the failure", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ] - }, - "PossibleBatchQueryError": { - "name": "PossibleBatchQueryError", - "summary": "Simple `Error` argument provided to the callback from the\n[executeAllAsync](Titanium.Database.DB.executeAllAsync) method in case of failure\n", - "extends": "Object", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/DB.yml", - "properties": [ - { - "name": "index", - "summary": "Index of the failed query", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Database": { - "name": "Titanium.Database", - "summary": "The top-level `Database` module, used for creating and accessing the\nin-application SQLite database.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/Database.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "install", - "summary": "Installs an SQLite database to device's internal storage.", - "description": "Copies an SQLite database file to the device's internal storage (only) and\ncreates a persistent name that is available for the lifetime of the app. \nOn Android, if the source file does not exist, an empty database is created.\n\nReturns a reference to the opened database. If the destination file already\nexists, behaves as .\n\nThis method is primarily used for iOS.\n\nWith Android, as there is often minimal internal storage available, `install`\nmay only be appropriate for small databases or for prototyping. When database\nfiles are to be stored on external storage (for example, SD Card), a combination of\n and is required.\n\nWith Titanium 1.8.0.1 on iOS, the default database location changed in accordance\nwith Apple's guidelines. If a database file already exists in the old\nlocation, `install` will automatically move it to the new location\nrather than copying the file from the path provided in the first\nargument.\n\nFiles stored in the `Private Documents` directory on iOS 5 will be\nautomatically backed up to iCloud and removed from the device in low\nstorage situations. See\n[How do I prevent files from being backed up to iCloud?](https://developer.apple.com/library/ios/qa/qa1719/_index.html)\nfor details. To prevent this for database files, use the \nobject with the property. \n\nAlways [close](Titanium.Database.DB.close) the database after use.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Install a Database (iOS)", - "code": "A database, with a filename of `mydb1` and located in the same directory as the\nthe running script, is installed.\n\n``` js\nvar db1 = Ti.Database.install('mydb1', 'mydb1Installed');\n```\n\nThe file is copied to the default database location with a file\nextension of `sql`.\n\n**On simulator**\n\n* `/Users/user_name/Library/Application Support/iPhone Simulator/ios_version/Applications/apple_app_id/Library/Private Documents/mydb1Installed.sql` (Titanium 1.8.0.1)\n* `/Users/user_name/Library/Application Support/iPhone Simulator/ios_version/Applications/apple_app_id/Library/Application Support/database/mydb1Installed.sql` (earlier versions)\n\n**On device**\n\n* `/Applications/apple_app_id/Library/Private Documents/mydb1Installed.sql` (Titanium 1.8.0.1)\n* `/Applications/apple_app_id/Library/Application Support/database/mydb1Installed.sql` (earlier versions)\n\nTo prevent the database file being automatically backed up to iCloud, use [remoteBackup](Titanium.Filesystem.File.remoteBackup).\n\n``` js\ndb1.file.remoteBackup = false;\n```\n" - }, - { - "description": "Install a Database to Internal Storage (Android)", - "code": "A database, with a filename of `mydb1` and located in the same directory as the\nthe running script, is installed.\n\n``` js\nvar db1 = Ti.Database.install('mydb1', 'mydb1Installed');\n```\n\nUnlike on iOS, no file extension is added. The file is opened in the\nfollowing default database location, on both emulator and device.\n\n* `file:///data/data/appID/databases/mydb1Installed`\n" - }, - { - "description": "Install a Database to External Storage (Android)", - "code": "The device is checked for the presence of external storage and a\ndatabase, with a filename of `mydb2` and located in the same directory as the\nthe running script, is installed.\n\n``` js\nif (Ti.Platform.name === 'android' && Ti.Filesystem.isExternalStoragePresent()) {\n var db2 = Ti.Database.install('mydb2', Ti.Filesystem.externalStorageDirectory + 'path' + Ti.Filesystem.separator + 'to' + Ti.Filesystem.separator + 'mydb2Installed');\n}\n```\n\nUnlike on iOS, no file extension is added. The file is copied to the\nabsolute path provided.\n\n* `file:///sdcard/path/to/mydb2Installed`\n" - } - ], - "parameters": [ - { - "name": "path", - "summary": "Path and filename of the database file to copy to internal storage.\nFile location is relative to the script's context unless an absolute\npath, such as one constructed with a \nconstant, is used.\n", - "type": "String" - }, - { - "name": "dbName", - "summary": "Destination filename or absolute path, which will subsequently be passed to\n.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Database.DB" - } - }, - { - "name": "open", - "summary": "Opens an SQLite database.", - "description": "Opens an SQLite database and returns a reference to it. If the database does\nnot exist, creates an empty database file and returns a reference to this\nopened database.\n\nWith Titanium 1.8.0.1 on iOS, the default database location changed in accordance\nwith Apple's guidelines. If a database file already exists in the old\nlocation, `open` will automatically move it to the new location.\n\nAlways [close](Titanium.Database.DB.close) the database after use.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Open a Database from Internal Storage (iOS)", - "code": "A database, with a persistent name of `mydb1Installed` and located in the\ndefault database location on internal storage, is opened.\n\n``` js\nvar db = Ti.Database.open('mydb1Installed');\n```\n\nA file extension of `sql` is added, and the file is opened from the\nfollowing location.\n\nOn simulator\n\n* `/Users//Library/Application Support/iPhone Simulator//Applications//Library/Private Documents/mydb1Installed.sql` (Titanium 1.8.0.1)\n* `/Users//Library/Application Support/iPhone Simulator//Applications//Library/Application Support/database/mydb1Installed.sql` (earlier versions)\n\nOn device\n\n* `/Applications//Library/Private Documents/mydb1Installed.sql` (Titanium 1.8.0.1)\n* `/Applications//Library/Application Support/database/mydb1Installed.sql` (earlier versions)\n" - }, - { - "description": "Open a Database on Internal Storage (Android)", - "code": "A database, with a persistent name of `mydb1Installed` and located in the\ndefault database location on internal storage, is opened.\n\n``` js\nvar db1 = Ti.Database.open('mydb1Installed');\n```\n\nUnlike on iOS, no file extension is added. The file is opened in\nthe following location.\n\n* `file:///data/data/appID/databases/mydb1Installed`\n" - }, - { - "description": "Open a Database on External Storage (Android)", - "code": "A database, with a filename of `mydb2Installed` and located at the\nabsolute path provided, is opened.\n\n``` js\nif (Ti.Platform.name === 'android' && Ti.Filesystem.isExternalStoragePresent()) {\n var db2 = Ti.Database.open(Ti.Filesystem.externalStorageDirectory + 'path' + Ti.Filesystem.separator + 'to' + Ti.Filesystem.separator + 'mydb2Installed');\n}\n```\n\nUnlike on iOS, no file extension is added. The file is copied to the\nabsolute path, as follows.\n\n* `file:///sdcard/path/to/mydb2Installed`\n" - }, - { - "description": "Open a Database in the shared directory of an application group (iOS)", - "code": "Opens a Database in a shared directory\n\n``` js\nvar suiteDir = Ti.Filesystem.directoryForSuite('group.appc.Sharing');\nif (!suiteDir) {\n logInApp('Suite Directory not found, check Entitlements.');\n return;\n}\nvar path = suiteDir + 'TestDB';\nvar db = Ti.Database.open(path);\ndb.close();\n```\n" - } - ], - "parameters": [ - { - "name": "dbName", - "summary": "The dbname previously passed to . An absolute path \nto the file, including one that is constructed with a \nconstant or method, may be used.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Database.DB" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "FIELD_TYPE_DOUBLE", - "summary": "Constant for requesting a column's value returned in double form.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FIELD_TYPE_FLOAT", - "summary": "Constant for requesting a column's value returned in float form.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FIELD_TYPE_INT", - "summary": "Constant for requesting a column's value returned in integer form.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FIELD_TYPE_STRING", - "summary": "Constant for requesting a column's value returned in string form.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "Titanium.Database.ResultSet": { - "name": "Titanium.Database.ResultSet", - "summary": "The ResultSet instance returned by .", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Database/ResultSet.yml", - "description": "A result set represents the results returned by a database query.\n\nThe [rowCount](Titanium.Database.ResultSet.rowCount) property identifies the number of\nrows in the result set. The `ResultSet` object maintains an internal record of the \ncurrent row. As shown in the example, you can use the \n[next](Titanium.Database.ResultSet.next) method to iterate through the rows in the set.\n\nUse the [field](Titanium.Database.ResultSet.field) or\n[fieldByName](Titanium.Database.ResultSet.fieldByName) methods to query the fields for\nthe current row.\n\nOn the iOS platform, closing the database also closes the result set, that is,\nyou can only access the result set if the database is currently open.\n", - "examples": [ - { - "description": "Using ResultSet", - "code": "The following code will create a database and execute SQL statements that will create a \ntable, insert data into it, query the table and iterate through the returned\n`ResultSet`.\n\n``` js\nvar db = Ti.Database.open('mydb1Installed');\ndb.execute('CREATE TABLE IF NOT EXISTS people (name TEXT, phone_number TEXT, city TEXT)');\ndb.execute('DELETE FROM people');\n\nvar thisName = 'Arthur';\nvar thisPhoneNo = '1-617-000-0000';\nvar thisCity = 'Mountain View';\ndb.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', thisName, thisPhoneNo, thisCity);\n\nvar personArray = ['Paul','020 7000 0000', 'London'];\ndb.execute('INSERT INTO people (name, phone_number, city) VALUES (?, ?, ?)', personArray);\n\nvar rows = db.execute('SELECT rowid,name,phone_number,city FROM people');\nTi.API.info('Row count: ' + rows.rowCount);\n\nvar fieldCount = rows.fieldCount;\nTi.API.info('Field count: ' + fieldCount);\n\nwhile (rows.isValidRow()){\n Ti.API.info('Person ---> ROWID: ' + rows.fieldByName('rowid') + ', name:' + rows.field(1) + ', phone_number: ' + rows.fieldByName('phone_number') + ', city: ' + rows.field(3));\n rows.next();\n}\nrows.close();\ndb.close();\n```\n\nNote that the above `SELECT` query contains the [rowid](http://www.sqlite.org/lang_createtable.html#rowid)\nfield, which contains an SQLite-specific unique identifier for each row.\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "close", - "summary": "Closes this result set and release resources. Once closed, the result set must no longer \nbe used.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "field", - "summary": "Retrieves the value for the specified field in the current row, \nand casts it to the specified type (String, Integer, Float or Double.)\n", - "description": "All of the numeric types (Integer, Float or Double) are returned as JavaScript Number objects. \n\nIf no `type` parameter is specified, the returned data type depends on the data in the column. \n\n* If the data in the column is TEXT, the data is returned as a String.\n* If the data in the column is any kind of number, the data is returned as a Number.\n* If the data in the column is a BLOB, the data is returned as a object. \n\nWhen a `type` is specified and the data cannot be converted to the specified type, an \nexception is thrown. \n\nReturns null if the value in the table is NULL.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "index", - "summary": "A zero-based column index.", - "type": "Number" - }, - { - "name": "type", - "summary": "Type to cast field value.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "return type varies based on the underlying data and optional `type` argument. If BLOB, we return a Titanium.Blob. If TEXT, we return String. If any kind of number, we return a Number.", - "type": [ - "String", - "Number", - "Titanium.Blob" - ] - } - }, - { - "name": "fieldByName", - "summary": "Retrieves the value for the specified field in the current row, \nand casts it to the specified type (String, Integer, Float or Double.)\n", - "description": "All of the numeric types (Integer, Float or Double) are returned as JavaScript Number objects. \n\nIf no `type` parameter is specified, the returned data type depends on the data in the column. \n\n* If the data in the column is TEXT, the data is returned as a String.\n* If the data in the column is any kind of number, the data is returned as a Number.\n* If the data in the column is a BLOB, the data is returned as a object. \n\nWhen a `type` is specified and the data cannot be converted to the specified type, an \nexception is thrown. \n\nReturns null if the value in the table is NULL. \n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "A column name or alias used in the SQL query.", - "type": "String" - }, - { - "name": "type", - "summary": "Type to cast for the field value.", - "type": "Number", - "optional": true - } - ], - "returns": { - "summary": "return type varies based on the underlying data and optional `type` argument. If BLOB, we return a Titanium.Blob. If TEXT, we return String. If any kind of number, we return a Number.", - "type": [ - "String", - "Number", - "Titanium.Blob" - ] - } - }, - { - "name": "fieldName", - "summary": "Returns the field name for the specified field index.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "index", - "summary": "A zero-based column index for the field.", - "type": "Number" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getFieldName", - "summary": "Returns the field name for the specified field index.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "parameters": [ - { - "name": "index", - "summary": "A zero-based column index for the field.", - "type": "Number" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "isValidRow", - "summary": "Returns whether the current row is valid.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "next", - "summary": "Advances to the next row in the result set and returns `true` if one exists, \nor `false` otherwise.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "fieldCount", - "summary": "The number of columns in this result set.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "rowCount", - "summary": "The number of rows in this result set.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "validRow", - "summary": "Indicates whether the current row is valid.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "ErrorResponse": { - "name": "ErrorResponse", - "summary": "Properties used in any event or callback which needs to report a success or failure.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "SuccessResponse": { - "name": "SuccessResponse", - "summary": "Properties used in any event or callback which needs to report a success.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `true`.", - "description": "Returns `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0.", - "description": "Error code will be 0.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "FailureResponse": { - "name": "FailureResponse", - "summary": "Properties used in any event or callback which needs to report a failure.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/ErrorResponse.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `false`.", - "description": "Returns `false`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "May be undefined.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns a non-zero value.", - "description": "If the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Event": { - "name": "Titanium.Event", - "summary": "The base type for all Titanium events.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Event.yml", - "properties": [ - { - "name": "source", - "summary": "Source object that fired the event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - } - ] - }, - "Titanium.Filesystem.File": { - "name": "Titanium.Filesystem.File", - "summary": "Object representing a path to a file or directory in the device's persistent storage.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/File.yml", - "description": "Use the method to get a handle to a `File` object,\nwhich represents a given path. There does not need to be an existing file or directory\ndoes not need to exist before `getFile` is called. If the file doesn't exist, and\nthe file path identifies a file in a writable directory, writing to the file\ncreates the file implicitly.\n\nSee for constants identifying commonly-used device directories.\n\nUse the [exists](Titanium.Filesystem.File.exists) method to test whether the file exists.\n\nA file object can point to an ordinary file, a directory or a symbolic link.\nUse [createDirectory](Titanium.Filesystem.File.createDirectory) to create a directory.\nUse the [getDirectoryListing](Titanium.Filesystem.File.getDirectoryListing) method to\nretrieve a list of the directory's contents.\n\nThe `File` object doesn't provide methods for random access into the file.\nThe `read` method reads the file's entire contents into a `Blob` object.\nThe `write` method can either overwrite the entire file or append to an\nexisting file.\n\nFor random access to a file, such as accessing a small portion of a larger file,\nyou can open a file as a [FileStream](Titanium.Filesystem.FileStream) object. Use the\n[open](Titanium.Filesystem.File.open) method to get a `FileStream` for an\nexisting `File` object, or use the method\nto get a `FileStream` directly without calling `getFile` first.\n\nThe module defines a number of properties and methods related to\nfilesystem access, including properties that specify paths for application-specific\ndirectories, and methods for creating temporary files and directories.\n\nOn Android, files may be stored on external storage (that is, removable media such as\nSD Cards).\n\nNote that once created with `getFile`, the path associated with a file object is\nimmutable. If you move the underlying file using [move](Titanium.Filesystem.File.move)\nor [rename](Titanium.Filesystem.File.rename), you can no longer access it with the\noriginal `File` object. You must use `getFile` to get a handle to the new path.\n\n#### Resource Files\n\nThe `Resources` directory and all the files in it are read-only. On Android, resource\nfiles are stored in the resource bundle and do not have all of the properties of\nnormal files. In particular, they do not have creation or modification timestamps.\n", - "examples": [ - { - "description": "Reading a File", - "code": "Data files shipped with the application are stored in the resources directory.\n\nThis example reads string data from a text file.\n\n``` js\n// resourcesDirectory is actually the default location, so the first\n// argument could be omitted here.\nfile = Ti.Filesystem.getFile(Ti.Filesystem.resourcesDirectory, \"textfile.txt\");\nvar blob = file.read();\nvar readText = blob.text;\n// dispose of file handle & blob.\nfile = null;\nblob = null;\n```\n" - }, - { - "description": "Creating a Subdirectory", - "code": "Files that the application writes to need to be stored outside of the\nresources directory, since that directory is read-only.\n\nThis example creates a subdirectory to store downloaded images.\nThe example assumes that two variables are defined elsewhere in the code:\nmyImageID, a string containing some kind of ID for the downloaded image,\nand myImageData, a `Blob` containing JPEG image data.\n\n``` js\nvar imageDir = Ti.Filesystem.getFile(Ti.Filesystem.applicationDataDirectory,\n 'downloaded_images');\nif (! imageDir.exists()) {\n imageDir.createDirectory();\n}\n\n// .resolve() provides the resolved native path for the directory.\nvar imageFile = Ti.Filesystem.getFile(imageDir.resolve(), myImageID + '.jpg');\nTi.API.info(\"ImageFile path is: \" + imageFile.resolve());\nif (imageFile.write(myImageData)===false) {\n // handle write error\n}\n// dispose of file handles\nimageFile = null;\nimageDir = null;\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "append", - "summary": "Appends data to the file identified by this file object.", - "description": "Data to append can be specified as a String, `Blob`, or `File`.\n\nIf the `data` argument is a `File` object, the file's contents\nare appended to this file.\n\nReturns `true` if the operation succeeds.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Data to append.", - "type": [ - "String", - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "copy", - "summary": "Copies the file identified by this file object to a new path.", - "description": "Returns `true` if the copy succeeds.", - "platforms": [ - { - "since": "0.9.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "destinationPath", - "summary": "Destination path to copy to.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "createDirectory", - "summary": "Creates a directory at the path identified by this file object.", - "description": "Returns `true` if the directory was created successfully.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "recursive", - "summary": "Toggles whether to recursively create the directory structure (like mkdir -p).\nPass `false` to avoid recursively creating the directory.\nDefaults to true on SDK 7.3.0+, defaults to false on older SDK versions.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "createFile", - "summary": "Creates a file at the path identified by this file object.", - "description": "Note that if you write to a file that doesn't exist, the file is created automatically,\nso it is not necessary to call this method unless you want to explicitly create the file\n(for example, to create an empty file).\n\nReturns `true` if the file was created successfully. Returns `false` if the\nfile already exists, or if the file couldn't be created for some other reason.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "createTimestamp", - "deprecated": { - "notes": "Use [createdAt](Titanium.Filesystem.File.createdAt) instead.", - "since": "7.3.0" - }, - "summary": "Returns the creation timestamp for the file identified by this file object.", - "description": "On Android, returns 0 for resource files.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "createdAt", - "summary": "Returns the creation Date for the file identified by this file object.", - "description": "On Android, returns a Date whose `getTime()` value is 0 for resource files.\n\n**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryFileTimestamp`\nproperty set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Date" - } - }, - { - "name": "deleteDirectory", - "summary": "Deletes the directory identified by this file object.", - "description": "Returns `true` if the operation was successful. Does nothing if the file\nobject does not identify a directory.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "recursive", - "summary": "Pass `true` to recursively delete any directory contents.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "deleteFile", - "summary": "Deletes the file identified by this file object.", - "description": "Returns `true` if the operation was successful.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "exists", - "summary": "Returns `true` if the file or directory identified by this file object exists on the device.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "extension", - "summary": "Returns the extension for the file identified by this file object.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getDirectoryListing", - "summary": "Returns a listing of the directory identified by this file object, or `null`\nif this object doesn't identify a directory.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getParent", - "deprecated": { - "notes": "Use the [Titanium.Filesystem.File.parent](Titanium.Filesystem.File.parent) property to receive a `File`\nreference instead. If you wish to receive the path, use the `nativePath`\nproperty of that reference instead.\n", - "since": "7.0.0" - }, - "summary": "Returns the path of the parent directory holding the file identified by this\nfile object, as a String (deprecated) **or** as a `File` object.\n", - "description": "Prior to Titanium SDK 7.0.0, on iOS this method returned the path of the parent\ndirectory as a String. Since Titanium SDK 7.0.0, this method has been deprecated\nin favor of the [parent](Titanium.Filesystem.File.parent) property and will return\na [File](Titanium.Filesystem.File) reference in the future as well.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "Returns a String on iOS, a `Titanium.Filesystem.File` on Android", - "type": [ - "String", - "Titanium.Filesystem.File" - ] - } - }, - { - "name": "getProtectionKey", - "summary": "Returns the protection key value of this file object.\nReturns `null` if there's an error.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "isDirectory", - "summary": "Returns `true` if this file object represents a directory.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isFile", - "summary": "Returns `true` if this file object represents an ordinary file.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "modificationTimestamp", - "deprecated": { - "notes": "Use [Titanium.Filesystem.File.modifiedAt](Titanium.Filesystem.File.modifiedAt) instead.", - "since": "7.3.0" - }, - "summary": "Returns the last modification time for this file.", - "description": "On Android, returns 0 for resource files.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "modifiedAt", - "summary": "Returns the last modification Date for the file identified by this file object.", - "description": "On Android, returns a Date whose `getTime()` value is 0 for resource files.\n\n**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryFileTimestamp`\nproperty set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Date" - } - }, - { - "name": "move", - "summary": "Moves the file identified by this file object to another path.", - "description": "Note that this method moves the stored file, but doesn't update this\nfile object to point to the new path. To access the file after moving it,\nyou must call [getFile](Titanium.Filesystem.getFile) using the destination\npath to obtain a new file handle.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "newpath", - "summary": "New location for the file.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "open", - "summary": "Opens the file identified by this file object for random access.", - "description": "You can open the file for reading, writing, or appending by specifying one of the\n`MODE` constants from :\n[MODE_READ](Titanium.Filesystem.MODE_READ), [MODE_WRITE](Titanium.Filesystem.MODE_WRITE),\nor [MODE_APPEND](Titanium.Filesystem.MODE_APPEND).\n\nThe `FileStream` object returned by this call can be used to read from, write to, or\nappend to the file, depending on what mode the file is opened in.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "mode", - "summary": "Mode to open the file in: `MODE_READ`, `MODE_WRITE`, or `MODE_APPEND`.\n", - "type": "Number" - } - ], - "returns": { - "type": "Titanium.Filesystem.FileStream" - } - }, - { - "name": "read", - "summary": "Returns the contents of the file identified by this file object as a `Blob`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "rename", - "summary": "Renames the file identified by this file object.", - "description": "Returns `true` if the file was successfully renamed.\n\nFails if the destination is in a different directory than the current file.\nUse [move](Titanium.Filesystem.File.move) to move a file to a different directory.\n\nNote that this method renames the stored file, but doesn't update this\nfile object to point to the new path. To access the file after renaming it,\nyou must call [getFile](Titanium.Filesystem.getFile) using the destination\npath to obtain a new file handle.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "newname", - "summary": "New name for the file.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "resolve", - "summary": "Returns the fully-resolved native path associated with this file object.", - "description": "On iOS, the path returned by this method is a plain file path, not a URL. It is suitable\nfor use in native modules that need to access the file using native APIs.\n\nOn Android, the return value of `resolve` is a `file://` URL, identical to the\n[nativePath](Titanium.Filesystem.File.nativePath) property.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "setProtectionKey", - "summary": "Sets the protection key as an attribute to the file identified by this file object.", - "description": "Returns `true` if successfully set. Returns `false` if failed.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "fileProtectionType", - "summary": "File protection type.\n", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "spaceAvailable", - "summary": "Returns the amount of free space available on the device where the file identified by this file object is stored.", - "description": "Free space is returned in bytes.\n\n**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategoryDiskSpace`\nproperty set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes the specified data to the file identified by this file object.", - "description": "If the `append` parameter is `false` or not specified, any existing data in\nthe file is overwritten.\n\nIf `append` is `true`, the specified data is appended to the end of the file.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Data to write, as a String, `Blob` or `File` object.", - "type": [ - "String", - "Titanium.Filesystem.File", - "Titanium.Blob" - ] - }, - { - "name": "append", - "summary": "If `true`, append the data to the end of the file.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "executable", - "summary": "`true` if the file is executable.\n", - "description": "On iOS, this property exists but is always `false`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "hidden", - "summary": "Set to `true` if the file is hidden.", - "description": "On iOS, this property exists but is always `false`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "name", - "summary": "Name of the file.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "nativePath", - "summary": "Native path associated with this file object, as a file URL.", - "description": "On iOS, use the [resolve](Titanium.Filesystem.File.resolve)\nmethod to obtain a plain file path for use with native modules.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "parent", - "summary": "A `File` object representing the parent directory of the file identified by this object.", - "description": "iOS platform-note: Prior to Titanium SDK 7.0.0, this method returned the\npath of the parent directory as a String. Since Titanium SDK 7.0.0 it\nreturns a reference for parity wih Android and Windows.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Titanium.Filesystem.File", - "permission": "read-only" - }, - { - "name": "readonly", - "summary": "`true` if the file identified by this object is read-only.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "size", - "summary": "Size, in bytes, of the file identified by this object.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "remoteBackup", - "summary": "Value indicating whether or not to back up to a cloud service.", - "description": "Some apps may be rejected by Apple for backing up specific files; if this\nis the case, ensure that this value is set to `false` for them. This\nvalue should only need to be set once by your app, but setting it\nmultiple times will not cause problems. For files distributed with your\napp, this will need to be set on boot. This flag will only affect iOS\nversions 5.0.1 and later, but is safe to set on earlier versions.\n\nNote that setting this property to `false` will also prevent the\nfile identified by this object from being backed up to iCloud.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "iphone" - }, - { - "since": "1.8.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "symbolicLink", - "summary": "`true` if the file identified by this object is a symbolic link.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "writable", - "summary": "`true` if the file identified by this object is writable.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Filesystem.FileStream": { - "name": "Titanium.Filesystem.FileStream", - "summary": "Wrapper around `Titanium.Filesystem.File` that implements the `Titanium.IOStream` interface", - "extends": "Titanium.IOStream", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/FileStream.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "read", - "summary": "Reads data from this stream into a buffer.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is written into the buffer starting at\nposition `offset`. Data is read from this stream until one of the following occurs:\n\n* the end of this stream is reached\n* the end of the buffer is reached\n* a total of `length` bytes have been read from the stream\n\nIf `offset` and `length` are omitted, data is written starting at the beginning\nof the buffer.\n\nWhen called synchronously: returns the number of bytes read, or -1 if the end of\nstream was reached before any data was read.\n\nReturns 0 when called asynchronously.\n\nThrows an exception on error. For example, if the `offset` value is past\nthe last byte of `buffer`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to read stream data into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset into the buffer to start writing stream data.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to read.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes read.", - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes data from a buffer to this stream.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is read from the buffer starting at\n`offset`. Bytes are read from the buffer and written to the stream until:\n\n* the end of the buffer is reached\n* `length` bytes have been written\n* the stream returns an error\n\nIf `offset` and `length` are omitted, all of the data in the buffer is written to\nthis stream.\n\nReturns the number of bytes actually written when called synchronously.\n\nReturns 0 when called asynchronously.\n\nThrows an exception if an error is encountered.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to write to this stream.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in the buffer of the first byte to write to the stream.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write to the stream.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "isWritable", - "summary": "Indicates whether this stream is writable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is writable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "isReadable", - "summary": "Indicates whether this stream is readable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is readable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "close", - "summary": "closes file stream, exception is thrown on error", - "description": "Throws an exception on error.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Filesystem": { - "name": "Titanium.Filesystem", - "summary": "The top level filesystem module, used to access files and directories on the device.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/Filesystem.yml", - "description": "For examples of using the Filesystem APIs, refer to the\n[Filesystem Access and Storage guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Local_Data_Sources/Filesystem_Access_and_Storage.html)\nas well as the other Filesystem submodule API documentation.\n", - "examples": [ - { - "description": "Getting a directory for an application group (iOS)", - "code": "This example writes a string to a text file in a shared directory\n\n``` js\nvar suiteDir = Ti.Filesystem.directoryForSuite('group.appc.Sharing');\nif (!suiteDir) {\n logInApp('Suite Directory not found, check Entitlements.');\n return;\n}\nvar f = Ti.Filesystem.getFile(suiteDir,'emptyfile.txt');\nf.write('The file is no longer empty!');\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createTempDirectory", - "summary": "Creates a temporary directory and returns a [File](Titanium.Filesystem.File) object representing the new directory.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Titanium.Filesystem.File" - } - }, - { - "name": "createTempFile", - "summary": "Creates a temporary file and returns a [File](Titanium.Filesystem.File) object representing the new file.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Titanium.Filesystem.File" - } - }, - { - "name": "getFile", - "summary": "Returns a `File` object representing the file identified by the path arguments.", - "description": "Note that `getFile` does not create a file if one does not exist at the specified\npath. It returns a new `File` object referring to the specified file path. The\napplication can create a file at that path by calling\n[write](Titanium.Filesystem.File.write) or create a directory by calling\n[createDirectory](Titanium.Filesystem.File.createDirectory) on the `File` object.\n\nThis method takes a variable number of arguments, where each argument is treated\nas a path component. All of the arguments are joined together using the\nplatform-specific path separator to make the final path.\n\nIf a relative path is passed, the full path should be interpreted relative\nto the current file. For example, if the file `Resources/login/login.js`\ncontains the following code:\n\n``` js\nvar icon = Titanium.Filesystem.getFile('icon.png');\n```\n\nThe path is interpreted as `Resources/login/icon.png`.\n\nOn iOS, all relative paths are currently interpreted as relative to the\n`Resources` directory, **not** to the current context. This is a known issue\nthat will be addressed in a future release.\n\nOn iOS 9, if app thinning is enabled, and the file of interest is an image file\nthat was bundled with the app (not downloaded during runtime), this will not return\nthe image file since it is already allocated inside the assets catalog. Please\nuse [getAsset](Titanium.Filesystem.getAsset) instead for this case.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "One or more path components. Path arguments are joined together using the platform specific path separator to form the full path.", - "type": [ - "String", - "Array" - ], - "repeatable": true - } - ], - "returns": { - "type": "Titanium.Filesystem.File" - } - }, - { - "name": "getAsset", - "summary": "Returns a `Blob` object representing the asset catalog image identified by the path arguments.", - "description": "This method is only applicable on images in assets catalogs for apps with app-thinning\nenabled on iOS. Since the bundled image has been reallocated into assets catalog, it is\nno longer accessible via the original file path. To obtain a `Blob` object representing\nthis image, use the original file path as the parameter in this method instead of using it in\n[getFile](Titanium.Filesystem.getFile)\n\nSimilar to [getFile](Titanium.Filesystem.getFile), this method takes a variable\nnumber of arguments, where each argument is treated as a path component.\nAll of the arguments are joined together using the platform-specific path separator\nto make the final path.\n\nIf a relative path is passed, the full path should be interpreted relative\nto the current file. For example, if the file `Resources/login/login.js`\ncontains the following code:\n\n``` js\nvar icon = Titanium.Filesystem.getAsset('icon.png');\n```\n\nThe path is interpreted as `Resources/login/icon.png`.\n\nOn iOS, all relative paths are currently interpreted as relative to the\n`Resources` directory, **not** to the current context. This is a known issue\nthat will be addressed in a future release.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "path", - "summary": "One or more path components. Path arguments are joined together using the platform specific path separator to form the full path.", - "type": "String", - "repeatable": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "isExternalStoragePresent", - "summary": "Returns `true` if the device supports external storage *and* the external storage device is mounted.", - "description": "Returns `true` on Android if an external storage device, such as an SD card, is\navailable for reading and writing.\n\nReturns `false` on iOS.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "hasStoragePermissions", - "summary": "Returns `true` if the app has storage permissions.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestStoragePermissions", - "summary": "Requests for storage permissions", - "description": "On Android, the dialog will only appear if the permission is not accepted by the user and the user did\nnot check the box \"Never ask again\" when denying the request. If the user checks the box \"Never ask again,\"\nthe user has to manually enable the permission in device settings.\n\nThis method requests `Manifest.permission.READ_EXTERNAL_STORAGE` and `Manifest.permission.WRITE_EXTERNAL_STORAGE`.\nIf you require other permissions, you can also use .\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call upon user decision to grant storage access.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "openStream", - "summary": "Opens file using the interface.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "mode", - "summary": "Access mode.\n", - "type": "Number" - }, - { - "name": "path", - "summary": "One or more path components. Path arguments are joined together using the\nplatform-specific path separator to form the full path.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.Filesystem.FileStream" - } - }, - { - "name": "directoryForSuite", - "summary": "Returns the path to the container directory associated with the specified security application group ID.", - "description": "This is a writable directory used on iOS. Groups of sandboxed apps that need to share files\nand other information can request a container directory as part of their entitlements.\n\nWhen called with a valid group identifier, this method returns the location of that directory as a string.\nReturns null if the group identifier is invalid; check the app's entitlements.\n", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "suiteName", - "summary": "The name of the suite.\n", - "type": "String" - } - ], - "returns": { - "type": "String" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "MODE_APPEND", - "summary": "Constant for append mode for file operations.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MODE_READ", - "summary": "Constant for read mode for file operations.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MODE_WRITE", - "summary": "Constant for write mode for file operations.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IOS_FILE_PROTECTION_NONE", - "summary": "Constant used to set protection key to NSFileProtectionNone in file attributes.", - "description": "File will have no special protection associated with it. Can be read from or written\nto at any time.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "IOS_FILE_PROTECTION_COMPLETE", - "summary": "Constant used to set protection key to NSFileProtectionComplete in file attributes.", - "description": "File is stored in an encrypted format on disk. Cannot be read from or written to while\nthe device is locked or booting.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "IOS_FILE_PROTECTION_COMPLETE_UNLESS_OPEN", - "summary": "Constant used to set protection key to NSFileProtectionCompleteUnlessOpen in file attributes.", - "description": "File is stored in an encrypted format on disk. Can be created while the device is locked,\nbut once closed, cannot be opened again until the device is unlocked. If the file is opened when\nunlocked, you may continue to access the file normally, even if the user locks the device.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "IOS_FILE_PROTECTION_COMPLETE_UNTIL_FIRST_USER_AUTHENTICATION", - "summary": "Constant used to set protection key to NSFileProtectionCompleteUntilFirstUserAuthentication in file attributes.", - "description": "File is stored in an encrypted format on disk. Cannot be accessed until after the device has booted.\nAfter the user unlocks the device for the first time, your app can access the file and continue to\naccess it even if the user subsequently locks the device.\n", - "platforms": [ - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "applicationCacheDirectory", - "summary": "Path to the application's internal cache directory.", - "description": "Files stored in the cache directory remain after the application is closed but at the\ndiscretion of the operating system.\n\nOn the Android platform, the cache is limited to 25 MB and the files remain for the lifetime\nof the application, that is, until the application is uninstalled.\n\nOn the iOS platform, the cache does not have a size limit but the data remains until iOS\ncleans the directory to recover the disk space.\n", - "platforms": [ - { - "since": "1.8.3", - "name": "android" - }, - { - "since": "1.8.3", - "name": "iphone" - }, - { - "since": "1.8.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "applicationDataDirectory", - "summary": "Path to the application's data directory.", - "description": "This is a writable directory that can be used to store applications-specific files.\n\nOn iOS, this directory is specifically designated for user documents, and a\nseparate directory,\n[applicationSupportDirectory](Titanium.Filesystem.applicationSupportDirectory) is\nused for other application data.\n\nOn iOS, files in this directory are backed up unless the\n[remoteBackup](Titanium.Filesystem.File.remoteBackup) flag is set to false.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "applicationDirectory", - "summary": "Path to the iOS application directory.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "applicationSupportDirectory", - "summary": "Path to the application support directory.", - "description": "This is a writable directory used on iOS for application files that are *not*\nuser documents--including settings files, caches, and so on.\n\nOn iOS, files in this directory are backed up unless the\n[remoteBackup](Titanium.Filesystem.File.remoteBackup) flag is set to false.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "externalCacheDirectory", - "summary": "Path to the app's sandboxed cache folder on removable storage, such as SD card.", - "description": "This directory is intended to be used to store large temporary files since external storage\ntypically has a larger capacity than internal storage. This is a good place to store\nvideos and large photos.\n\nThe application should check\n[isExternalStoragePresent](Titanium.Filesystem.isExternalStoragePresent) before\naccessing this location. This is because external storage is sometimes removable\non same devices, such as an SD card.\n\nThis directory does not require the `Manifest.permission.READ_EXTERNAL_STORAGE` and\n`Manifest.permission.WRITE_EXTERNAL_STORAGE` permissions.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "externalStorageDirectory", - "summary": "Path to the app's sandboxed folder on removable storage, such as SD card.", - "description": "This directory is intended to be used to store large files since external storage\ntypically has a larger capacity than internal storage. This is a good place to store\nvideos and large photos.\n\nThe application should check\n[isExternalStoragePresent](Titanium.Filesystem.isExternalStoragePresent) before\naccessing this location. This is because external storage is sometimes removable\non same devices, such as an SD card.\n\nAs of Titanium 9.3.0, this directory does not require the `Manifest.permission.READ_EXTERNAL_STORAGE`\nand `Manifest.permission.WRITE_EXTERNAL_STORAGE` permissions. For older Titanium SDK versions,\nthese permission are required and you must call the\n[requestStoragePermissions()](Titanium.Filesystem.requestStoragePermissions) method\nto request the end-user's permission to read/write to external storage.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "lineEnding", - "summary": "Platform-specific line ending constant.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "resourcesDirectory", - "summary": "Path to the application's resource directory.", - "description": "This directory is read-only. If you need to modify any files in this directory,\nthey must first be copied to another directory, such as\n[applicationDataDirectory](Titanium.Filesystem.applicationDataDirectory) or\n[tempDirectory](Titanium.Filesystem.tempDirectory).\n\nOn iOS,\nwritable files can also be placed in the\n[applicationSupportDirectory](Titanium.Filesystem.applicationSupportDirectory).\nOn Android, writable files can also be placed in the\n[externalStorageDirectory](Titanium.Filesystem.externalStorageDirectory).\n\nNote that when running on the simulator, the resources directory may be writable,\nbut it is not writable on device.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "resRawDirectory", - "summary": "Path to the application's raw resource directory.", - "description": "On Android, the raw resources directory can be used for resources that need to be\naccessed as individual files, not included in the Android resources bundle. For\nexample, sound files placed in the raw resources directory can be accessed by\nnotifications, which cannot access sound files from the resource\ndirectory.\n\nTo use raw resources, place files in the `platform/android/res/raw` folder, where\n`platform` is at the top level of the project, not inside the `Resources` folder. You\nwill need to create the `platform` folder and subfolders.\n\nThis directory is read-only. If you need to modify any files in this directory,\nthey must first be copied to another directory, such as\n[applicationDataDirectory](Titanium.Filesystem.applicationDataDirectory) or\n[tempDirectory](Titanium.Filesystem.tempDirectory).\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "separator", - "summary": "Platform-specific path separator constant.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "tempDirectory", - "summary": "Path for the application's temporary directory.", - "description": "This directory can be used for storing temporary files. Files in this directory\nmay not persist when the application is shut down and restarted.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ] - }, - "RequestStorageAccessResult": { - "name": "RequestStorageAccessResult", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Filesystem/Filesystem.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "Titanium.Geolocation.Android": { - "name": "Titanium.Geolocation.Android", - "summary": "Module for Android-specific geolocation functionality.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/Android.yml", - "description": "This module is used for manually configuring geolocation settings on Android. \n\nManual configuration is recommended for applications that have more demanding \ngeolocation needs (for example, driving directions). However, for basic geolocation\ninformation, *simple mode* geolocation may be sufficient. For information on simple \nmode, see .\n\nManual configuration involves managing *providers* and *rules*:\n\n* *Location providers*, such as GPS, provide location updates.\n\n* *Location rules* filter the results returned by location providers. \n\nConfiguring geolocation manually involves three steps:\n\n1. Enabling manual mode.\n\n2. Enabling location providers.\n\n3. Adding location rules (optional).\n\nAs with the other modes, you register for location updates using the main\n module. Location updates are generated as long as \nan event listener is registered for the `location` event. When you are not \nusing location updates, you should remove any registered event listeners.\n\nIn manual mode, the application is responsible for dynamically updating the settings\nto achieve its required accuracy while limiting battery usage. For example, an\napplication might do any of the following:\n\n* If the application isn't getting updates frequently enough, it can adjust its\n provider settings to provide more updates, or relax its location rules to allow\n less accurate updates through. \n\n* If the application isn't receiving accurate enough updates from one provider, it \n can add another provider to try to improve results.\n\n* If the application is getting sufficiently accurate results from the network \n provider, it can disable the GPS provider to save power.\n\n#### Enabling Manual Configuration Mode\n\nTo enable manual configuration mode, set the [manualMode](Titanium.Geolocation.Android.manualMode) \nproperty to `true`. In manual configuration mode, the location providers and location\nrules set through this module control the generation of location updates.\n\nWhen `manualMode` is `true`, the following configuration settings in the\n module are ignored:\n\n* [Geolocation.accuracy](Titanium.Geolocation.accuracy)\n* [Geolocation.frequency](Titanium.Geolocation.frequency)\n* [Geolocation.preferredProvider](Titanium.Geolocation.preferredProvider)\n\nWhen `manualMode` is `false`, the `accuracy`, `frequency` and `preferredProvider`\nsettings from are used to configure location updates.\nAny location providers and location rules set in \nare retained, but they have no effect.\n\n#### Location Providers\n\nAndroid supports three kinds of location providers: GPS, network, and the \n\"passive\" location provider, which provides only cached information. \n\nEach location provider represents a different tradeoff between accuracy and\nbattery power. For most accurate results, you can use a combination of location\nproviders. Your application can also dynamically change providers to optimize\nbattery life (for example, if the network provider is providing good enough\nlocation updates, you can disable the GPS provider).\n\nLocation providers are represented by the\n[LocationProvider](Titanium.Geolocation.Android.LocationProvider) object. \nTo specify a location provider, create a new provider object, then register it\nwith [addLocationProvider](Titanium.Geolocation.Android.createLocationProvider):\n\n``` js\nvar gpsProvider = Ti.Geolocation.Android.createLocationProvider({\n name: Ti.Geolocation.Android.PROVIDER_GPS,\n minUpdateTime: 60, \n minUpdateDistance: 100\n});\nTi.Geolocation.Android.addLocationProvider(gpsProvider);\n```\n\nAs shown above, when you create a location provider, you can specify two\nproperties to limit update frequency:\n\n* `minUpdateTime`. Limits the frequency of location updates to no more \n than one per `minUpdateTime` seconds.\n\n* `minUpdateDistance`. Don't send location updates until the location changes\n at least `minUpdateDistance` meters.\n\nOnly one provider of each type (GPS, network, passive) can be registered at a\ntime. Adding a new location provider with the same `name` value replaces any\nexisting provider with the same `name`.\n\nOnce a location provider is added, changes made to the location provider object itself\n(such as changing its `minUpdateTime` value) change the active configuration of the \nlocation system.\n\n#### Location Rules\n\n*Location Rules* filter the results returned by location providers. You use\nlocation rules to reduce the number of location update events, and ensure that \nthe events you do receive are as accurate and recent as your application requires.\n\nYou are not required to set any location rules. However, by reducing the number of \nlocation events that are passed from the native code\nto the JavaScript layer, location rules can improve both performance and battery\nlife.\n\nLocation rules are represented by the\n[LocationRule](Titanium.Geolocation.Android.LocationProvider) object. To\nspecify a location rule, create a new rule object, then register it with \n[addLocationRule](Titanium.Geolocation.Android.createLocationProvider):\n\n``` js\nvar gpsRule = Ti.Geolocation.Android.createLocationRule({\n provider: Ti.Geolocation.PROVIDER_GPS,\n // Updates should be accurate to 100m\n accuracy: 100,\n // Updates should be no older than 5m\n maxAge: 300000\n // But no more frequent than once per 10 seconds\n minAge: 10000\n});\nTi.Geolocation.Android.addLocationRule(gpsRule);\n```\n\nEach rule can specify any combination of the following criteria:\n\n* `provider`. If specified, this rule only applies to updates generated\n by the specified provider. If not specified, this rule applies to all updates.\n\n* `accuracy`. Minimum accuracy required for a location update. Accuracy is\n expressed as the maximum allowable error, in meters. Updates with reported\n accuracy values greater than this are filtered out. \n\n* `minAge`. Controls the frequency of location updates. Do not forward an update unless\n at least `minAge` milliseconds have passed since the last good location\n update.\n\n* `maxAge`. Controls the freshness of location updates. Do not forward an update\n unless it is newer than `maxAge` milliseconds.\n\nYou can specify as many location rules as you like. The order in which location rules\nare added is not significant. For a `location` event to be generated, the location\nupdate must pass all of the active rules.\n\nNote that some combinations of rules may make it very difficult to get location\nupdates. In particular, very low values for either `accuracy` or `maxAge` may prevent \nresults from getting through. \n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addLocationProvider", - "summary": "Adds and enables the specified location provider, possibly replacing an existing one.", - "description": "If another location provider with the same `name` value is already active, the \nnew location provider replaces the exiting one.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "provider", - "summary": "The location provider to add.", - "type": "Titanium.Geolocation.Android.LocationProvider" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeLocationProvider", - "summary": "Disables and removes the specified location provider.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "provider", - "summary": "The location provider to remove.", - "type": "Titanium.Geolocation.Android.LocationProvider" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addLocationRule", - "summary": "Adds and enables the specified location rule.", - "description": "Only location updates that pass all of the active rules are passed on to the\napplication.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "rule", - "summary": "The location rule to add.", - "type": "Titanium.Geolocation.Android.LocationRule" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeLocationRule", - "summary": "Disables and removes the specified location rule.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "rule", - "summary": "The location rule to remove.", - "type": "Titanium.Geolocation.Android.LocationRule" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createLocationProvider", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Geolocation.Android.LocationProvider" - } - }, - { - "name": "createLocationRule", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Geolocation.Android.LocationRule" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "manualMode", - "summary": "Set to `true` to enable manual configuration of location updates through this module.", - "description": "If `true`, location updates are controlled by the location providers and location rules \nconfigured in this module.\n\nIf `false`, location updates are configured using the [accuracy](Titanium.Geolocation.accuracy),\n[frequency](Titanium.Geolocation.frequency) and [preferredProvider](Titanium.Geolocation.preferredProvider)\nproperties in the module.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "PROVIDER_GPS", - "summary": "Specifies the GPS location provider.\n", - "description": "Used with [LocationProvider.name](Titanium.Geolocation.Android.LocationProvider),\n[LocationRule.provider](Titanium.Geolocation.Android.LocationRule).\n In general, the GPS provider has the highest power consumption and the\nhighest accuracy, but this may vary. In some circumstances, the network\nprovider may be more reliable.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "PROVIDER_NETWORK", - "summary": "Specifies the network location provider.\n", - "description": "Used with [LocationProvider.name](Titanium.Geolocation.Android.LocationProvider),\n[LocationRule.provider](Titanium.Geolocation.Android.LocationRule).\n Generally requires less power than the GPS provider and provides less accurate\nresults, but may produce very accurate results in densely-populated areas\nwith many cell towers and WiFi networks.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "PROVIDER_PASSIVE", - "summary": "Specifies the passive location provider.\n", - "description": "Used with [LocationProvider.name](Titanium.Geolocation.Android.LocationProvider),\n[LocationRule.provider](Titanium.Geolocation.Android.LocationRule).\n This provider only uses cached location information, so it does not use\nany power, but makes no guarantee that the location results are recent.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - } - ] - }, - "Titanium.Geolocation.Android.LocationProvider": { - "name": "Titanium.Geolocation.Android.LocationProvider", - "summary": "Represents a source of location information, such as GPS.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/LocationProvider.yml", - "description": "See for details on using `LocationProviders` to \nmanually configure location updates.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "name", - "summary": "Type of location provider: [PROVIDER_GPS](Titanium.Geolocation.Android.PROVIDER_GPS), \n[PROVIDER_NETWORK](Titanium.Geolocation.Android.PROVIDER_NETWORK), or \n[PROVIDER_PASSIVE](Titanium.Geolocation.Android.PROVIDER_PASSIVE).\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "String", - "optional": false - }, - { - "name": "minUpdateTime", - "summary": "Limits the frequency of location updates to no more than one per `minUpdateTime` seconds.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "minUpdateDistance", - "summary": "Don't send a location update unless the location has changed at least `minUpdateDistance` \nmeters since the previous update.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "Titanium.Geolocation.Android.LocationRule": { - "name": "Titanium.Geolocation.Android.LocationRule", - "summary": "A location rule to filter the results returned by location providers.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Android/LocationRule.yml", - "description": "All of the properties are optional.\n\nSee for details on using `LocationProviders` to \nmanually configure location updates.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "name", - "summary": "If specified, this rule only applies to updates generated\nby the specified provider. If `null`, this rule applies to all updates.\n", - "description": "Can be [PROVIDER_GPS](Titanium.Geolocation.Android.PROVIDER_GPS), \n[PROVIDER_NETWORK](Titanium.Geolocation.Android.PROVIDER_NETWORK), or \n[PROVIDER_PASSIVE](Titanium.Geolocation.Android.PROVIDER_PASSIVE).\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "String", - "default": null - }, - { - "name": "accuracy", - "summary": "Minimum accuracy required for a location update.", - "description": "Accuracy is expressed as the maximum allowable error, in meters. To pass this rule,\nan update must have an accuracy value equal to or lower than this value.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "minAge", - "summary": "Controls the frequency of location updates.", - "description": "Do not forward an update unless at least `minAge` milliseconds have passed since the last \ngood location update (that is, the last update from any provider that generated a \n`location` event).\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "maxAge", - "summary": "Controls the freshness of location updates. Do not forward an update\nunless it is newer than `maxAge` milliseconds.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "Titanium.Geolocation": { - "name": "Titanium.Geolocation", - "summary": "The top level Geolocation module. The Geolocation module is used for accessing device location based information.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "description": "This module combines two sets of features:\n\n* Location services. Determining the location of the device.\n\n* Geocoding and reverse geocoding. Converting geographic coordinates into\n addresses, and converting addresses into geographic coordinates.\n\nUsing location services can have a significant impact on a device's battery life,\nso it's important to use them in the most efficient manner possible. Power consumption\nis strongly influenced by the accuracy and frequency of location updates required by\nyour application.\n\nThe location services systems of the underlying platforms are very different, so there\nare significant implementation differences between the platforms.\n\nThe basic methods of requesting location information and receiving location updates\nare essentially the same on all platforms. However, the method of configuring the\naccuracy and frequency of location updates is different for each platform.\n\n#### Getting Location Information\n\nThere are two ways to get location information:\n\n* Make a one-time request with [getCurrentPosition](Titanium.Geolocation.getCurrentPosition).\n\n* Register to receive location updates by adding an event listener for the\n [location](Titanium.Geolocation.location) event.\n\n**NOTE:** Location services stay enabled for as long as a listener is registered for the\n`location` event, so be sure to remove the event listener when you do not require\nlocation updates.\n\n#### Configurating Location Updates on iOS\n\nIn iOS, the accuracy (and power consumption) of location services is primarily\ndetermined by the [accuracy](Titanium.Geolocation.accuracy) setting. This can be set\nto one of the following values:\n\n* [ACCURACY_BEST](Titanium.Geolocation.ACCURACY_BEST) (highest accuracy and power consumption)\n* [ACCURACY_BEST_FOR_NAVIGATION](Titanium.Geolocation.ACCURACY_BEST_FOR_NAVIGATION)\n* [ACCURACY_HIGH](Titanium.Geolocation.ACCURACY_HIGH)\n* [ACCURACY_NEAREST_TEN_METERS](Titanium.Geolocation.ACCURACY_NEAREST_TEN_METERS)\n* [ACCURACY_HUNDRED_METERS](Titanium.Geolocation.ACCURACY_HUNDRED_METERS)\n* [ACCURACY_KILOMETER](Titanium.Geolocation.ACCURACY_KILOMETER)\n* [ACCURACY_LOW](Titanium.Geolocation.ACCURACY_LOW)\n* [ACCURACY_THREE_KILOMETERS](Titanium.Geolocation.ACCURACY_THREE_KILOMETERS) (lowest\n accuracy and power consumption).\n\nBased on the accuracy you choose, iOS uses its own logic to select location providers\nand filter location updates to provide location updates that meet your accuracy\nrequirements.\n\nYou can further limit power consumption on iOS by setting the\n[distanceFilter](Titanium.Geolocation.distanceFilter) property to eliminate position\nupdates when the user is not moving.\n\nIn order to receive the user's location, add either the\n[`NSLocationWhenInUseUsageDescription`](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26)\nor\n[`NSLocationAlwaysUsageDescription`](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW26)\nkey to the iOS plist section of the project's `tiapp.xml` file.\n\n``` xml\n\n \n \n \n NSLocationAlwaysUsageDescription\n \n Specify the reason for accessing the user's location information.\n This appears in the alert dialog when asking the user for permission to\n access their location.\n \n \n \n \n\n```\n\nFor iOS 11 and later, also add the [`NSLocationAlwaysAndWhenInUseUsageDescription`](https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services/request_always_authorization)\nwhen planning to request the \"Always\" permission. Using the above key, you are also able to upgrade your permissions from\n\"When in Use\" to \"Always\", which is the recommended way for managing location permissions in iOS 11 and later.\nPlease also remember to request your desired location-permissions before using any geolocation-related API in\norder to receive the best usability and permission-control during the app-lifecycle using \nand . Also note that you also need to include the `NSLocationWhenInUseUsageDescription` key\nin *any* case when targeting iOS 11 and later. Descriptive error-logs will be thrown if required permissions are missing.\n\n#### Configurating Location Updates on Android\n\nOn Android, two different location service modes are supported: *simple*, and *manual*.\n\n* *Simple mode* provides a compromise mode that provides adequate support for\n undemanding location applications without requiring developers to\n write a lot of Android-specific code. To use simple mode:\n\n 1. Leave the flag set to `false` (the\n default value).\n\n 2. Set the [accuracy](Titanium.Geolocation.accuracy) property to\n either [ACCURACY_HIGH](Titanium.Geolocation.ACCURACY_HIGH) or\n [ACCURACY_LOW](Titanium.Geolocation.ACCURACY_LOW).\n\n* *Manual mode* gives developers low-level control of location updates, including\n enabling individual location providers and filtering updates, for the best\n combination of accuracy and battery life.\n\n Manual mode is used when the flag is set\n to `true`. In manual mode, the `accuracy` property is not used, and all\n configuration is done through the module.\n\nAs of Titanium SDK 7.1.0 and later, including the [`ti.playservices`](https://github.com/appcelerator-modules/ti.playservices) module will allow Google Play Services\nto be used by default to obtain location information. This means the provider passed into [createLocationProvider](Titanium.Geolocation.Android.createLocationProvider)\nwill be ignored, as Google Play Services will select the best provider based on current device conditions.\nIf Google Play Services is not available it will fallback to previous behaviour of using Android location APIs.\n\nTo retrieve location events:\n\n``` js\nvar win = Ti.UI.createWindow({ backgroundColor: 'white' });\n\nTi.Geolocation.accuracy = Ti.Geolocation.ACCURACY_HIGH;\n\nfunction getLocation() {\n Ti.Geolocation.addEventListener('location', function(e) {\n alert(JSON.stringify(e, null, 2));\n });\n}\n\nwin.addEventListener('open', function() {\n if (Ti.Geolocation.hasLocationPermissions()) {\n getLocation();\n } else {\n Ti.Geolocation.requestLocationPermissions(Ti.Geolocation.AUTHORIZATION_ALWAYS, function(e) {\n if (e.success) {\n getLocation();\n } else {\n alert('could not obtain location permissions');\n }\n });\n }\n});\n\nwin.open();\n```\n\n#### Using the Compass\n\nBoth iOS and Android support a receiving heading updates from a hardware compass, if available.\n\nCheck the [hasCompass](Titanium.Geolocation.hasCompass) property to see if the current\ndevice supports a compass.\n\nTo retrieve compass readings, you can either use\n[getCurrentHeading](Titanium.Geolocation.getCurrentHeading) as shown in the\nprevious example, or add a listener for the\n[heading](Titanium.Geolocation.heading) event, as shown below:\n\n``` js\nfunction compassHandler (e) {\n if (e.success) {\n Ti.API.info('Heading: ' + e.heading.magneticHeading);\n }\n}\nTi.Geolocation.addEventListener('heading', compassHandler);\n```\n\nNote that Android did not include a `success` property in the `heading` event prior to SDK 7.5.0.\nHeading events are only generated on Android when heading data is available. So if\n`success` is undefined on prior SDK versions, we assume that the event contains valid compass data.\n\nTo obtain true heading data for the compass (as opposed to magnetic heading data),\na current location fix is required. See the notes on\n[trueHeading](HeadingData.trueHeading) for more information.\n\nAs with location updates, the application should unregister for heading updates\nwhen it is no longer being used, or when it goes into the background. Use\n`removeEventListener` to stop heading updates:\n\n``` js\nTi.Geolocation.removeEventListener('heading', compassHandler);\n```\n\nFinally, note that neither the Android emulator nor the iOS simulator provide\ncompass support. Compass code must be tested on physical devices.\n\n#### Geocoding Services\n\nThe module provides two methods, [forwardGeocoder](Titanium.Geolocation.forwardGeocoder) and [reverseGeocoder](Titanium.Geolocation.reverseGeocoder)\nto convert between geographic coordinates and addresses. These methods map to MapQuest Open Nominatim Search Service.\n\nWhile this API has the advantage that it has no daily usage limits, please note that the data backing this API is crowd sourced and might not return\nproper values for valid addresses and geographic coordinates.\n\nIf geocoding services are essential component of the application, developers are encouraged to use commercial geocoding providers.\n", - "events": [ - { - "name": "calibration", - "summary": "Fired when the device detects interface and requires calibration.", - "description": "When this event is fired, the iOS calibration UI is being displayed to the end user.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "heading", - "summary": "Fired when an heading update is received.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "code", - "summary": "If `success` is `false`, the error code is available.", - "type": "Number" - }, - { - "name": "success", - "summary": "Indicate if the heading event was successfully received. Android returns this since SDK 7.5.0.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "If `success` is false, a string describing the error.", - "type": "String" - }, - { - "name": "heading", - "summary": "Dictionary object containing the heading data.", - "type": "HeadingData" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "location", - "summary": "Fired when a location update is received.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "code", - "summary": "if `success` is false, the error code if available.", - "type": "Number" - }, - { - "name": "success", - "summary": "Indicates if location data was successfully retrieved.", - "type": "Boolean" - }, - { - "name": "provider", - "summary": "If `success` is true, object describing the location provider generating this update.", - "type": "LocationProviderDict" - }, - { - "name": "coords", - "summary": "If `success` is true, actual location data for this update.", - "type": "LocationCoordinates" - }, - { - "name": "error", - "summary": "If `success` is false, a string describing the error.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "locationupdatepaused", - "summary": "Fired when location updates are paused by the OS.", - "description": "This event is fired when [pauseLocationUpdateAutomatically](Titanium.Geolocation.pauseLocationUpdateAutomatically)\nis set to `true` and if the OS detects that the device's location is not changing,\ncausing it to pause the delivery of updates in order to shut down the appropriate\nhardware and save power.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "locationupdateresumed", - "summary": "Fired when location manager is resumed by the OS.", - "description": "When location updates are paused and need to be resumed (perhaps because the user\nis moving again), this event is fired to let the app know that it is about to\nbegin the delivery of those updates again.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "authorization", - "summary": "Fired when changes are made to the authorization status for location services.", - "description": "This event is fired whenever the application's ability to use location services changes.\nChanges can occur because the user allowed or denied the use of location services for the app or the system as a whole.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "authorizationStatus", - "summary": "New authorization status for the application.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "forwardGeocoder", - "summary": "Resolves an address to a location.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "address", - "summary": "address to resolve.", - "type": "String" - }, - { - "name": "callback", - "summary": "Function to invoke on success or failure.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "getCurrentHeading", - "summary": "Retrieves the current compass heading.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to invoke on success or failure of obtaining the current heading.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "getCurrentPosition", - "summary": "Retrieves the last known location from the device.", - "description": "On Android, the radios are not turned on to update the location, and a cached\nlocation is used.\n\nOn iOS the radios **may** be used if the location is too \"old\".\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to invoke on success or failure of obtaining the current location.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "hasLocationPermissions", - "summary": "Returns `true` if the app has location access.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "authorizationType", - "summary": "Types of geolocation's authorizations. This is an iOS only parameter and is ignored on Android.", - "type": "Number" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestLocationPermissions", - "summary": "Requests for location access.", - "description": "On Android, the request view will show if the permission is not accepted by the user, and the user did\nnot check the box \"Never ask again\" when denying the request. If the user checks the box \"Never ask again,\"\nthe user has to manually enable the permission in device settings. If the user asks for permissions or\ntries to get unauthorized location information, then the app should call the request method to show\nthe permission settings. This method requests `Manifest.permission.ACCESS_FINE_LOCATION` on Android.\nIf you require other permissions, you can also use .\n\nIn iOS 8, Apple introduced the Info.plist keys `NSLocationWhenInUseUsageDescription` and `NSLocationAlwaysUsageDescription`\nthat are used to display an own description while requesting location permissions. In addition to this method, you need to\ninclude one of these keys (based on how your location updates should behave) or the application will crash if your app does not.\n\nIn iOS 11, Apple introduced another Info.plist key `NSLocationAlwaysAndWhenInUseUsageDescription` that allows developers to upgrade\ntheir permissions from \"When in Use\" to \"Always\". In order to get the best usability for iOS 11 and later, request \"When in Use\" first\nand upgrade your location-permissions by requesting \"Always\" permissions later if required. If this permission-flow is not used, iOS\nwill still ask the user to select between \"When in Use\", \"Always\", and \"Don't Allow\" (primary action) on iOS 11 when asking for \"Always\"\npermissions, which can lead to a higher frequency of denied permissions, so be careful requesting location permissions.\nThe iOS 11 related upgrade-flow is available in Titanium SDK 6.3.0 and later.\n\nFinally, iOS 11 and later will require you to *always* include the `NSLocationWhenInUseUsageDescription` permission and Titanium will throw a\ndescriptive error-log if any required keys are missing.\n\nMore infos:\n * [Available Info.plist keys](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\n * [Request Always Authorization](https://developer.apple.com/documentation/corelocation/choosing_the_authorization_level_for_location_services/request_always_authorization)\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "authorizationType", - "summary": "Types of geolocation's authorizations. This is an iOS only parameter and is ignored on Android.", - "type": "Number" - }, - { - "name": "callback", - "summary": "Function to call upon user decision to grant location access.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "requestTemporaryFullAccuracyAuthorization", - "summary": "Requests the user's permission to temporarily use location services with full accuracy.", - "description": "If your app doesn't have permission to access accurate location (see [locationAccuracyAuthorization](Titanium.Geolocation.locationAccuracyAuthorization),\nyou can use this method to request temporary access to accurate location. This access will expire automatically,\nbut it won't expire while the user is still engaged with your app. So, for example, while your app is in\nthe foreground your app will retain the temporary access it was granted. Similarly, if your app starts a\nContinuous Background Location session with the background location indicator enabled (see [showBackgroundLocationIndicator](Titanium.Geolocation.showBackgroundLocationIndicator),\nyour access to accurate location will remain as long as the background location indicator remains enabled.\nThis allows your app to provide session-oriented experiences which require accurate location (e.g. fitness or navigation),\neven if the user has decided not to grant your app persistent access to accurate location.\n\nYou need to add key `NSLocationTemporaryUsageDescriptionDictionary` in `tiapp.xml`. See following example -\n\n``` xml\n\n \n \n \n NSLocationTemporaryUsageDescriptionDictionary\n \n PurposeKey1\n \n Specify the reason for accessing the user's location data with full accuracy.\n This appears in the alert dialog when asking the user for permission to\n access their location.\n \n PurposeKey2\n \n Specify the reason for accessing the user's location data with full accuracy.\n This appears in the alert dialog when asking the user for permission to\n access their location.\n \n \n \n \n \n\n```\n\nWhen CoreLocation prepares the prompt for display, it will look at the NSLocationTemporaryUsageDescriptionDictionary key\nin your tiapp.xml. The value should be a dictionary containing usage descriptions. The purposeKey you provide to\nthis method must correspond to an entry in that dictionary.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "parameters": [ - { - "name": "purposeKey", - "summary": "A key in the NSLocationTemporaryUsageDescriptionDictionary dictionary of the app's tiapp.xml file.\nThe value for this key is an app-provided string that describes the reason for accessing\nlocation data with full accuracy.\n", - "type": "String" - }, - { - "name": "callback", - "summary": "Function to call upon user decision to grant authorization.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "reverseGeocoder", - "summary": "Tries to resolve a location to an address.", - "description": "The callback receives a object. If the request\nis successful, the object includes one or more addresses that are possible matches\nfor the requested coordinates.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "latitude", - "summary": "Latitude to search, specified in decimal degrees.", - "type": "Number" - }, - { - "name": "longitude", - "summary": "Longitude to search, specified in decimal degrees.", - "type": "Number" - }, - { - "name": "callback", - "summary": "Function to invoke on success or failure.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "ACCURACY_BEST", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request the best\naccuracy available.\n", - "description": "Using this value results in the most accurate location updates, and the highest\nbattery usage.\n\nUsing this value on Android enables *legacy mode* operation, which is not\nrecommended.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_HUNDRED_METERS", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request location\nupdates accurate to the nearest 100 meters.\n", - "description": "Using this value on Android enables *legacy mode* operation, which is not\nrecommended.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_KILOMETER", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request location\nupdates accurate to the nearest kilometer.\n", - "description": "Using this value on Android enables *legacy mode* operation, which is not\nrecommended.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_NEAREST_TEN_METERS", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request location\nupdates accurate to the nearest 10 meters.\n", - "description": "Using this value on Android enables *legacy mode* operation, which is not\nrecommended.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_THREE_KILOMETERS", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request location\nupdates accurate to the nearest three kilometers.\n", - "description": "Using this value on Android enables *legacy mode* operation, which is not\nrecommended.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_HIGH", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request more\naccurate location updates with higher battery usage.\n", - "description": "Using this value on Android enables *simple mode* operation.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_BEST_FOR_NAVIGATION", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request highest possible\naccuracy and combine it with additional sensor data.\n", - "description": "Using this value is intended for use in navigation applications that require\nprecise position information at all times and are intended to be used only while\nthe device is plugged in.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_LOW", - "summary": "Use with [accuracy](Titanium.Geolocation.accuracy) to request less\naccurate location updates with lower battery usage.\n", - "description": "Using this value on Android enables *simple mode* operation.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_REDUCED", - "summary": "The level of accuracy used when an app isn’t authorized for full accuracy location data.\n", - "description": "Use with [accuracy](Titanium.Geolocation.accuracy).\nThe accuracy of location data is reduced in both space and time using approaches like\nselecting a nearby point of interest and updating the location at most a few times per hour.\nThe approximate location preserves the user’s country, typically preserves the city,\nand is usually within 1–20 kilometers of the actual location.\nIf your app is authorized to access location information with full accuracy, you can use\nthis constant to access location data as if the app didn’t have that authorization.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_AUTHORIZED", - "deprecated": { - "notes": "Use [Titanium.Geolocation.AUTHORIZATION_ALWAYS](Titanium.Geolocation.AUTHORIZATION_ALWAYS) as advised by Apple.", - "since": "7.0.0" - }, - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the application is authorized to use location services.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_DENIED", - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the application is not authorized to use location services, *or*\nlocation services are disabled.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_RESTRICTED", - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the application is not authorized to use location services *and*\nthe user cannot change this application's status.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_UNKNOWN", - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the authorization state is unknown.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_ALWAYS", - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the application is authorized to start location services at any time. This authorization\nincludes the use of all location services, including monitoring regions and significant location changes.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUTHORIZATION_WHEN_IN_USE", - "summary": "A [locationServicesAuthorization](Titanium.Geolocation.locationServicesAuthorization) value\nindicating that the application is authorized to start most location services only while running in the foreground.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "iphone" - }, - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_DENIED", - "summary": "Error code indicating that the user denied access to the location service.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_HEADING_FAILURE", - "summary": "Error code indicating that the heading could not be determined.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_LOCATION_UNKNOWN", - "summary": "Error code indicating that the user's location could not be determined.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_NETWORK", - "summary": "Error code indicating that the network was unavailable.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_REGION_MONITORING_DELAYED", - "summary": "Error code indicating that region monitoring is delayed.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_REGION_MONITORING_DENIED", - "summary": "Error code indicating that region monitoring is denied.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR_REGION_MONITORING_FAILURE", - "summary": "Error code indicating a region monitoring failure.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACTIVITYTYPE_OTHER", - "summary": "The location data is being used for an unknown activity.", - "description": "Used with [activityType](Titanium.Geolocation.activityType).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION", - "summary": "The location data is used for tracking location changes to the automobile specifically during vehicular navigation.", - "description": "Used with [activityType](Titanium.Geolocation.activityType). This activity might\ncause location updates to be paused only when the vehicle does not move for an\nextended period of time.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTIVITYTYPE_FITNESS", - "summary": "The location data is used for tracking any pedestrian-related activity.", - "description": "Used with [activityType](Titanium.Geolocation.activityType). This activity might\ncause location updates to be paused only when the user does not move a significant\ndistance over a period of time.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACTIVITYTYPE_OTHER_NAVIGATION", - "summary": "The location data is used for tracking movements of other types of vehicular\nnavigation that are not automobile related.\n", - "description": "Used with [activityType](Titanium.Geolocation.activityType). You would use this\nto track navigation by boat, train, or plane. Do not use this type for pedestrian\nnavigation tracking. This activity might cause location updates to be paused only\nwhen the vehicle does not move a significant distance over a period of time.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ACCURACY_AUTHORIZATION_FULL", - "summary": "The user authorized the app to access location data with full accuracy.", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ACCURACY_AUTHORIZATION_REDUCED", - "summary": "The user authorized the app to access location data with reduced accuracy.", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "accuracy", - "summary": "Specifies the requested accuracy for location updates.", - "description": "For basic location updates on all platforms, set `accuracy` to either:\n\n* [ACCURACY_HIGH](Titanium.Geolocation.ACCURACY_HIGH) for higher-quality location\n updates, with the higher power consumption.\n* [ACCURACY_LOW](Titanium.Geolocation.ACCURACY_LOW) for lower-quality location\n updates with lower power consumption.\n\nFor finer-grained control on iOS, specify one of `ACCURACY_BEST`,\n`ACCURACY_NEAREST_TEN_METERS`, `ACCURACY_HUNDRED_METERS`, `ACCURACY_KILOMETER`, or\n`ACCURACY_THREE_KILOMETERS`.\n\nFor finer-grained control on Android, use *manual mode*, instead of specifying an accuracy.\nThis mode requires more active management on the part of the application, but it\nis recommended to maximize accuracy and battery life.\nSee for details on using manual mode.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Geolocation.ACCURACY_HIGH", - "Titanium.Geolocation.ACCURACY_BEST_FOR_NAVIGATION", - "Titanium.Geolocation.ACCURACY_LOW", - "Titanium.Geolocation.ACCURACY_BEST", - "Titanium.Geolocation.ACCURACY_NEAREST_TEN_METERS", - "Titanium.Geolocation.ACCURACY_HUNDRED_METERS", - "Titanium.Geolocation.ACCURACY_KILOMETER", - "Titanium.Geolocation.ACCURACY_THREE_KILOMETERS", - "Titanium.Geolocation.ACCURACY_REDUCED" - ] - }, - { - "name": "distanceFilter", - "summary": "The minimum change of position (in meters) before a 'location' event is fired.", - "description": "If set to 0, distance filtering is disabled, meaning that location events are\ngenerated continuously.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "hasCompass", - "summary": "Indicates whether the current device supports a compass.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "headingFilter", - "summary": "Minimum heading change (in degrees) before a `heading` event is fired.", - "description": "Set to a value greater than zero to reduce the number of heading events generated.\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0 (No limit on heading updates)" - }, - { - "name": "headingTime", - "summary": "Interval in milliseconds before a `heading` event is fired.", - "description": "Set to a value greater than zero to reduce the number of heading events generated.\nIf you target Android 12 and want to use a time below 200ms you need to add the\nHIGH_SAMPLING_RATE_SENSORS permission. See [Motion sensors are rate-limited](https://developer.android.com/about/versions/12/behavior-changes-12#motion-sensor-rate-limiting)\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - } - ], - "type": "Number", - "default": 250 - }, - { - "name": "locationServicesAuthorization", - "summary": "Returns an authorization constant indicating if the application has access to location services.", - "description": "If `locationServicesAuthorization` is `AUTHORIZATION_RESTRICTED`, you should not\nattempt to re-authorize: this will lead to issues.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Geolocation.AUTHORIZATION_AUTHORIZED", - "Titanium.Geolocation.AUTHORIZATION_DENIED", - "Titanium.Geolocation.AUTHORIZATION_RESTRICTED", - "Titanium.Geolocation.AUTHORIZATION_UNKNOWN", - "Titanium.Geolocation.AUTHORIZATION_ALWAYS", - "Titanium.Geolocation.AUTHORIZATION_WHEN_IN_USE" - ] - }, - { - "name": "locationServicesEnabled", - "summary": "Indicates if the user has enabled or disabled location services for the device (not the application).", - "description": "This method returns `true` if *any* location provider is enabled.\n\nOn Android, there is a \"passive\" location provider that is enabled\nat all times, even when the user disables both the GPS and Network location providers.\nTherefore, this method returns `true` on these devices if only there is GPS or network provider available.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "showCalibration", - "summary": "Determines whether the compass calibration UI is shown if needed.", - "description": "Set to `false` to disable display of the compass calibration UI. This may result\nin invalid heading data.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "showBackgroundLocationIndicator", - "summary": "Specifies that an indicator be shown when the app makes use of continuous\nbackground location updates.\n", - "description": "Starting continuous background location updates requires the app to\nset `UIBackgroundModes` to include \"location\" and to set this property\nto `true` before calling `getCurrentPosition` with the intent to continue\nin the background.\n\nNote that this property only applies to apps with Always authorization.\nFor apps with WhenInUse authorization, the indicator is always shown when\nusing continuous background location updates in order to maintain user\nvisibility and that the app is still in use.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "trackSignificantLocationChange", - "summary": "Indicates if the location changes should be updated only when a significant change\nin location occurs.\n", - "description": "The trackSignificantLocationChange service offers a low-power location service for\ndevices with cellular radios.\n\nThis service offers a significant power savings and provides accuracy that is good\nenough for most applications. It uses the device's cellular radio to determine the\nuser's location and report changes in that location, allowing the system to manage\npower usage much more aggressively than it could otherwise. This service is also\ncapable of waking up an application that is currently suspended or not running in\norder to deliver new location data.\n", - "platforms": [ - { - "since": "2.1.2", - "name": "iphone" - }, - { - "since": "2.1.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "allowsBackgroundLocationUpdates", - "summary": "Determines if the app can do background location updates.\n", - "description": "When `UIBackgroundModes` include `location` in tiapp.xml, this property is\nset to `true` by default.\n", - "platforms": [ - { - "since": "5.0.0", - "name": "iphone" - }, - { - "since": "5.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "activityType", - "summary": "The type of user activity to be associated with the location updates.\n", - "description": "The information in this property is used as a cue to determine when location\nupdates may be automatically paused. Pausing updates gives the system the\nopportunity to save power in situations where the user's location is not likely\nto be changing. For example, if the activity type is\n[ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION](Titanium.Geolocation.ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION)\nand no location changes have occurred recently, the radios might be powered down\nuntil movement is detected again.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Geolocation.ACTIVITYTYPE_OTHER", - "Titanium.Geolocation.ACTIVITYTYPE_AUTOMOTIVE_NAVIGATION", - "Titanium.Geolocation.ACTIVITYTYPE_FITNESS", - "Titanium.Geolocation.ACTIVITYTYPE_OTHER_NAVIGATION" - ] - }, - { - "name": "locationAccuracyAuthorization", - "summary": "A value that indicates the level of location accuracy the app has permission to use.", - "description": "If the value of this property is ,\nyou can set any constant to [accuracy](Titanium.Geolocation.accuracy). If value is\n setting [accuracy](Titanium.Geolocation.accuracy)\nto a value other than has no effect on the location information.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Number", - "default": "", - "permission": "read-only", - "constants": [ - "Titanium.Geolocation.ACCURACY_AUTHORIZATION_FULL", - "Titanium.Geolocation.ACCURACY_AUTHORIZATION_REDUCED" - ] - }, - { - "name": "pauseLocationUpdateAutomatically", - "summary": "Indicates whether the location updates may be paused.", - "description": "Allowing the location updates to be paused can improve battery life on the\ntarget device without sacrificing location data. When this property is set to YES,\nthe location updates are paused (and powers down the appropriate hardware) at\ntimes when the location data is unlikely to change. For example, if the user stops\nfor food while using a navigation app, the location manager might pause updates for\na period of time. You can help the determination of when to pause location updates\nby assigning a value to the [activityType](Titanium.Geolocation.activityType) property.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "lastGeolocation", - "summary": "JSON representation of the last geolocation received.", - "description": "LastEvent is the JSON version of the last geolocation sent by the OS. This does not\ntrigger a geolocation attempt, nor wait for such. If no geolocation has happened,\nthis value may be null or undefined.\n", - "platforms": [ - { - "since": "3.1.2", - "name": "android" - }, - { - "since": "3.1.2", - "name": "iphone" - }, - { - "since": "3.1.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ] - }, - "LocationResults": { - "name": "LocationResults", - "summary": "Argument passed to the [getCurrentPosition](Titanium.Geolocation.getCurrentPosition) callback.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - }, - { - "name": "provider", - "summary": "If `success` is true, object describing the location provider generating this update.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "LocationProviderDict" - }, - { - "name": "coords", - "summary": "If `success` is true, actual location data for this update.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "LocationCoordinates" - } - ] - }, - "LocationCoordinates": { - "name": "LocationCoordinates", - "summary": "Simple object holding the data for a location update.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "latitude", - "summary": "Latitude of the location update, in decimal degrees.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "longitude", - "summary": "Longitude of the location update, in decimal degrees.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "altitude", - "summary": "Altitude of the location update, in meters.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "accuracy", - "summary": "Accuracy of the location update, in meters.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "altitudeAccuracy", - "summary": "Vertical accuracy of the location update, in meters.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "heading", - "summary": "Compass heading, in degrees. May be unknown if device is not moving. On\niOS, a negative value indicates that the heading data is not valid.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "speed", - "summary": "Current speed in meters/second. On iOS, a negative value indicates that the\nheading data is not valid or the accuracy is configured incorrectly.\nNote: Due to the Apple Geolocation API, set the \nproperty to in order to properly\nmeasure speed changes and prevent the app from returning negative values.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "timestamp", - "summary": "Timestamp for this location update, in milliseconds.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "floor", - "summary": "The floor of the building on which the user is located.", - "platforms": [ - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "LocationCoordinatesFloor" - } - ] - }, - "LocationCoordinatesFloor": { - "name": "LocationCoordinatesFloor", - "summary": "Simple object holding floor of the building on which the user is located.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "level", - "summary": "The logical floor of the building.", - "description": "Level values represent logical levels above or below ground level and are not\nintended to correspond to any numbering scheme in use by the building itself.\nThe ground floor of a building is always represented by the value 0. Floors\nabove the ground floor are represented by positive integers, so a value of 1\nrepresents the floor above ground level, a value of 2 represents two floors\nabove ground level, and so on. Floors below the ground floor are represented\nby corresponding negative integers, with a value of -1 representing the floor\nimmediately below ground level and so on.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "ForwardGeocodeResponse": { - "name": "ForwardGeocodeResponse", - "summary": "Simple object returned in the callback from the\n[forwardGeocoder](Titanium.Geolocation.forwardGeocoder) method.\n\nNote that Android includes a number of extra fields.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "accuracy", - "summary": "Estimated accuracy of the geocoding, in meters.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "longitude", - "summary": "Longitude of the geocoded address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "latitude", - "summary": "Latitude of the geocoded address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "street", - "summary": "Street name, without street address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "street1", - "summary": "Street name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "city", - "summary": "City name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "region1", - "summary": "First line of region.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "region2", - "summary": "Not used.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "postalCode", - "summary": "Postal code.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "country", - "summary": "Country name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "countryCode", - "summary": "Country code.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "country_code", - "summary": "Country code. Same as `countryCode`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "displayAddress", - "summary": "Display address. Identical to `address`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "address", - "summary": "Full address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - } - ] - }, - "HeadingResponse": { - "name": "HeadingResponse", - "summary": "Argument passed to the [getCurrentHeading](Titanium.Geolocation.getCurrentHeading) callback.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates a successful operation.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "heading", - "summary": "If `success` is true, the actual heading data.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "HeadingData" - } - ] - }, - "HeadingData": { - "name": "HeadingData", - "summary": "Simple object holding compass heading data.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "accuracy", - "summary": "Accuracy of the compass heading, in platform-specific units.", - "description": "On iOS, accuracy is returned as a maximum deviation in degrees,\nthe smaller the value, the more accurate the heading is. For example,\na value of 10 means the heading is plus or minus 10 degrees from the\nactual value. A negative value indicates the compass heading is invalid;\nfor example, if there is magnetic interference, or if the compass is not calibrated.\n\nOn Android, the value is set to either 1 (low accuracy), 2 (medium accuracy)\nor 3 (high accuracy). No specific definition of these accuracy values is supplied.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "magneticHeading", - "summary": "Declination in degrees from magnetic North.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "trueHeading", - "summary": "Declination in degrees from true North.", - "description": "Calculating the true heading requires correcting the magnetic declination based on\nthe device's current location. So `trueHeading` can only be calculated if the device\nhas a fairly recent location fix. If you want to obtain the true heading, you\nshould register for location updates as well as compass updates. The location fix\ndoes not need to be very accurate.\n\nOn Android, `trueHeading` is `undefined` if a recent location fix is not available.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "timestamp", - "summary": "Timestamp for the heading data, in milliseconds.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "x", - "summary": "Raw geomagnetic data for the X axis.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "y", - "summary": "Raw geomagnetic data for the Y axis.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "z", - "summary": "Raw geomagnetic data for the Z axis.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "LocationProviderDict": { - "name": "LocationProviderDict", - "summary": "Simple object describing a location provider.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "description": "The `accuracy` and `power` values correspond to constants defined in the\nAndroid API. See\n[android.location.Criteria](https://developer.android.com/reference/android/location/Criteria.html)\nin the Android API Reference.\n\nThese values are generalizations. In general, a provider with coarse accuracy will\nprovide less accurate results than a provider with fine accuracy, and a provider with\nhigh power requirements will use more battery power than a provider with low power\nrequirements.\n", - "properties": [ - { - "name": "accuracy", - "summary": "Accuracy of the location provider, either fine (1) or coarse (2).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "name", - "summary": "Name of the location provider.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "power", - "summary": "Power consumption for this provider, either low (1), medium (2), or high (3).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "ReverseGeocodeResponse": { - "name": "ReverseGeocodeResponse", - "summary": "Simple object returned in the callback from the\n[reverseGeocoder](Titanium.Geolocation.reverseGeocoder) method.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "places", - "summary": "An array of reverse-geocoded addresses matching the requested location.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ] - }, - "GeocodedAddress": { - "name": "GeocodedAddress", - "summary": "Simple object representing a place, returned in the callback from the\n[reverseGeocoder](Titanium.Geolocation.reverseGeocoder) method.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "street", - "summary": "Street name, without street address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "street1", - "summary": "Street name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "city", - "summary": "City name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "region1", - "summary": "First line of region.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "region2", - "summary": "Not used.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "postalCode", - "summary": "Postal code", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "state", - "summary": "State name.", - "description": "This property may return the full name or abbreviated name.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "country", - "summary": "Country name.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "countryCode", - "summary": "Country code.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "longitude", - "summary": "Longitude of the geocoded point.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "latitude", - "summary": "Latitude of the geocoded point.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "address", - "summary": "Full address.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "LocationAuthorizationResponse": { - "name": "LocationAuthorizationResponse", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "LocationAccuracyAuthorizationResponse": { - "name": "LocationAccuracyAuthorizationResponse", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Geolocation/Geolocation.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - }, - { - "name": "accuracyAuthorization", - "summary": "The level of location accuracy the app has granted.", - "description": "Will be undefined if `error` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "optional": true, - "constants": [ - "Titanium.Geolocation.ACCURACY_AUTHORIZATION_FULL", - "Titanium.Geolocation.ACCURACY_AUTHORIZATION_REDUCED" - ] - } - ] - }, - "Titanium.Gesture": { - "name": "Titanium.Gesture", - "summary": "The Gesture module is responsible for high-level device gestures such as orientation changes\nand shake gestures.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Gesture/Gesture.yml", - "events": [ - { - "name": "orientationchange", - "summary": "Fired when the device orientation changes.", - "description": "On Android, note that the application must have a heavyweight window or tab group open\nin order to receive the `orientationchange` event. It is not necessary for the heavyweight\nwindow to be the topmost window.\n\nAlmost all real-world applications will have a heavyweight window or a tab group. This is\nonly likely to be an issue if you create a test case or test application that adds an\norientation change listener from `app.js` without opening a heavyweight window.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "orientation", - "summary": "Orientation of the device.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "shake", - "summary": "Fired when the device is shaken.", - "description": "A shake gesture consists of a series of quick accelerations, and is represented by a series\nof shake events.\n\nThe `timestamp` property represents the interval between shake events. It is measured in\nmilliseconds on Android, and in seconds on iOS.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "timestamp", - "summary": "Time interval since previous shake event. On iOS, this value is 0 for the first shake\nevent in a series.\n", - "type": "Number" - }, - { - "name": "x", - "summary": "Acceleration along the X axis, in Gs.", - "type": "Number" - }, - { - "name": "y", - "summary": "Acceleration along the Y axis, in Gs.", - "type": "Number" - }, - { - "name": "z", - "summary": "Acceleration along the Z axis, in Gs.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopListener", - "summary": "Stops the gesture listener.", - "description": "In case you use `Titanium.Gesture.landscape` or `Titanium.Gesture.portrait` it will attach the orientation\nlistener automatically. If you just use it once you can use this method to stop the listener.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "portrait", - "summary": "Indicates if the device is currently held in portrait form.", - "description": "Value is `true` if in portrait, and `false` otherwise.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "landscape", - "summary": "Indicates if the device is currently held in landscape form.", - "description": "Value is `true` if in landscape, and `false` otherwise.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "orientation", - "summary": "Orientation of the device.", - "description": "Value may be one of the group of orientation constants,\n,\n,\n,\n,\n,\n,\nor .\n\nOn iOS and Windows, returns the current orientation of the *device*,\nregardless of the window orientation. To determine the current window orientation,\nuse [Window.orientation](Titanium.UI.Window.orientation).\n\nTo set the *allowable* orientations for a window, see .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "Titanium.IOStream": { - "name": "Titanium.IOStream", - "summary": "IOStream is the interface that all stream types implement.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/IOStream.yml", - "description": "See the module for related utility methods that support asynchronous\nI/O.\n", - "examples": [ - { - "description": "Write Data to a Stream", - "code": "This example demonstrates writing data to a stream.\n\n``` js\nvar outBuffer = Ti.createBuffer({data: \"write me\"});\n// stream object could be socket, file, buffer or blob\nvar outStream = Ti.Stream.createStream({mode: Ti.Stream.MODE_WRITE});\n\nvar bytesWritten = outStream.write(outBuffer); // writes entire buffer to stream\nTi.API.info(\"Bytes written:\" + bytesWritten); // should be 8\n\nbytesWritten = outStream.write(outBuffer, 2, 5); // only writes \"ite m\" to stream\nTi.API.info(\"Bytes written:\" + bytesWritten); // should be 5\n```\n" - }, - { - "description": "Read Data From a Stream", - "code": "This shows a simple example of reading data from a stream, one buffer full at a\ntime.\n\n``` js\nvar size = 0;\n// read data one buffer full at a time\nwhile ((size = instream.read(buffer)) > -1) {\n // do something with the data here ...\n Ti.API.info(\"Read \" + size + \" bytes.\");\n}\n```\n" - }, - { - "description": "Read Data With Offset and Length", - "code": "This example shows how to read data from a stream into a buffer. We assume that\nthe `inStream` variable holds a previously initialized stream that contains the\nstring, \"World Titanium\".\n\n``` js\nvar inBuffer = Ti.createBuffer({ value: \"Hello [ ]\" });\n\n// Read the first 6 bytes from the stream to the buffer, starting at position 10.\nvar bytesRead = inStream.read(inBuffer, 10, 6);\n\nTi.API.info(\"Bytes read: \" + bytesRead);\nTi.API.info(inBuffer.toString());\n\n// Read the next 8 bytes from the stream to the buffer, starting at position 8.\nbytesRead = inStream.read(inBuffer, 8, 8);\n\nTi.API.info(\"Bytes read: \" + bytesRead);\nTi.API.info(inBuffer.toString());\n```\n\nThe second `read` overwrites the data from the first `read`, so the output looks\nlike this:\n\n```\n[INFO] Bytes read: 6\n[INFO] Hello [ World ]\n[INFO] Bytes read: 8\n[INFO] Hello [ Titanium ]\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "read", - "summary": "Reads data from this stream into a buffer.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is written into the buffer starting at\nposition `offset`. Data is read from this stream until one of the following occurs:\n\n* the end of this stream is reached\n* the end of the buffer is reached\n* a total of `length` bytes have been read from the stream\n\nIf `offset` and `length` are omitted, data is written starting at the beginning\nof the buffer.\n\nWhen called synchronously: returns the number of bytes read, or -1 if the end of\nstream was reached before any data was read.\n\nReturns 0 when called asynchronously.\n\nThrows an exception on error. For example, if the `offset` value is past\nthe last byte of `buffer`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to read stream data into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset into the buffer to start writing stream data.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to read.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes read.", - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes data from a buffer to this stream.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is read from the buffer starting at\n`offset`. Bytes are read from the buffer and written to the stream until:\n\n* the end of the buffer is reached\n* `length` bytes have been written\n* the stream returns an error\n\nIf `offset` and `length` are omitted, all of the data in the buffer is written to\nthis stream.\n\nReturns the number of bytes actually written when called synchronously.\n\nReturns 0 when called asynchronously.\n\nThrows an exception if an error is encountered.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to write to this stream.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in the buffer of the first byte to write to the stream.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write to the stream.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "isWritable", - "summary": "Indicates whether this stream is writable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "True if stream is writable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "isReadable", - "summary": "Indicates whether this stream is readable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "summary": "True if stream is readable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "close", - "summary": "Closes this stream.", - "description": "Throws an exception on error.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Locale": { - "name": "Titanium.Locale", - "summary": "The top level Locale module.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Locale/Locale.yml", - "description": "The `Locale` module works with localization files to which are generated during compilation \ninto the operating system specific localization formats. The `Locale` module provides \nlocale-specific strings which can be referenced at runtime. Additionally, the module \ncontains a few methods and properties for querying device locale information.\n\nThe macro `L` can be used as an alias for the method.\n", - "events": [ - { - "name": "change", - "summary": "Fired when the device locale changes.", - "description": "On Android, when a listener for this event is not present, by default the application will soft restart\nupon a locale change. Once a listener for this event is present, the behaviour for a locale change is developer\ndefined.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "formatTelephoneNumber", - "summary": "Formats a telephone number according to the current system locale.", - "platforms": [ - { - "since": "1.5", - "name": "android" - } - ], - "parameters": [ - { - "name": "number", - "summary": "Phone number.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getCurrencyCode", - "summary": "Returns the ISO 3-letter currency code for the specified locale.", - "description": "This method returns one of the ISO 4217 currency codes. For example, \n`getCurrencyCode('en-US')` returns `USD`. See the `xe.com` website \n[Currency List](http://www.xe.com/iso4217.php#section2) section of the `www.xe.com` website for \nreference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locale", - "summary": "Locale, as a combination of ISO 2-letter language and country codes. For example, \n`en-US` or `en-GB`. See the \n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nsections of wikipedia for reference.\n", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getCurrencySymbol", - "summary": "Returns the currency symbol for the specified currency code.", - "description": "This method returns one of the international currency symbols. For example, \n`getCurrencySymbol('USD')` returns `$`. See the \n[Currency Symbols](http://www.xe.com/symbols.php#section2) section of the \n`www.xe.com` website for reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "currencyCode", - "summary": "Currency, as an ISO 3-letter code. For example, `USD` or `GBP`. See the \n[Currency List](http://www.xe.com/iso4217.php#section2) section of the `www.xe.com` website for \nreference.\n", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "setLanguage", - "summary": "Sets the current language of the application.", - "description": "This property holds a value such as `en` or `fr`. See the \n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) section of wikipedia for reference.\n\nOn Android you can also specify combination of a ISO 2-letter language and country codes. For example, \n`en-US` or `en-GB`. See the [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nsections of wikipedia for reference.\n\nWhen changing to a language with a different layout direction, such as English to Arabic or vice-versa,\nyou will need to close and re-open the window in order to apply the new right-to-left setting.\n\nThis will restart the app internally to properly apply the new language setting. If you want to avoid\nthis behavior, you can listen for the `change` event and handle the language change manually.\n\nWhen a custom language is set using this method, the SDK will persist this setting across app restarts.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "language", - "summary": "The specified ISO 639-1 code.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getLocaleCurrencySymbol", - "summary": "Returns the currency symbol for the specified locale.", - "description": "This method returns one of the international currency symbols. For example, \n`getLocaleCurrencySymbol('en-US')` returns `$`. See the \n[Currency Symbols](http://www.xe.com/symbols.php#section2) section of the \n`www.xe.com` website for reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "locale", - "summary": "Locale, as a combination of ISO 2-letter language and country codes. For example, \n`en-US` or `en-GB`. See the \n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nsections of wikipedia for reference.\n", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getString", - "summary": "Returns a string, localized according to the current system locale using the appropriate \n`/i18n/LANG/strings.xml` localization file.\n", - "description": "This method is functionally identical to its alias . For example, \n`Ti.Locale.getString('thisKey', 'missing key')` produces the same result as \n`L('thisKey', 'missing key')`.\n\nWhen using with to localize a phrase with multiple string \nsubstitution placeholders, add the `formatted=\"false\"` directive to the relevant \n`strings.xml` element. See example for a demonstration.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "String Localization Demonstration", - "code": "Localize two strings, \"hello\" and \"goodbye\" (using the keys \"greeting\" and \"signoff\") \nfor English and Spanish system locales. \n\nNote: use the device's system settings to change locales and test this code.\n\n#### `/i18n/en/strings.xml`\n``` xml\n\n\n You say %2$s and I say %1$s!\n hello\n goodbye\n\n```\n\n#### `/i18n/es/strings.xml`\n``` xml\n\n\n You say %2$s and I say %1$s!\n hola\n adios\n\n```\n\n#### `/Resources/app.js`\n``` js\nvar i18nMissingMsg = '';\n\n// for English locales, displays \"You say goodbye and I say hello!\"\n// for Spanish locales, displays \"You say adios and I say hola!\"\nTi.API.info('You say ' + Ti.Locale.getString('signoff', i18nMissingMsg) + ' and I say ' + Ti.Locale.getString('greeting', i18nMissingMsg) + '!');\n\n// uses alias L() instead of Ti.Locale.getString()\n// formatted=\"false\" is used in the strings.xml element for multiple string substitution\n// for English locales, displays \"You say goodbye and I say hello!\"\n// for Spanish locales, displays \"You say adios and I say hola!\"\nTi.API.info(String.format(L('phrase'), L('greeting', i18nMissingMsg), L('signoff', i18nMissingMsg)));\n```\n" - } - ], - "parameters": [ - { - "name": "key", - "summary": "Key of string.", - "type": "String" - }, - { - "name": "hint", - "summary": "Text to return if key does not exist in the localization file.", - "type": "String", - "optional": true - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "parseDecimal", - "summary": "Parses a number from the given string using the current or given locale.", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Parsing Localized Numeric Strings", - "code": "``` javascript\n// You can convert to/from a localized numeric string like this.\nvar numericString = String.formatDecimal(1234.5);\nvar numericValue = Ti.Locale.parseDecimal(numericString);\n\n// The numbers returned will be the same for the 2 different locales.\nvar number1 = Ti.Locale.parseDecimal('1,234,567.8', 'en-US');\nvar number2 = Ti.Locale.parseDecimal('1.234.567,8', 'de-DE');\n```\n" - } - ], - "parameters": [ - { - "name": "text", - "summary": "The string to be parsed.", - "type": "String" - }, - { - "name": "locale", - "summary": "Locale, as a combination of ISO 2-letter language and country codes. For example, \n`en-US` or `en-GB`. See the \n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nsections of wikipedia for reference.\n", - "type": "String", - "optional": true - } - ], - "returns": { - "summary": "Returns the parsed number. Returns `NaN` (Not-a-Number) if given string is invalid.", - "type": "Number" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "currentCountry", - "summary": "Country of the app's current locale, as an ISO 2-letter code.", - "description": "This property holds a value such as `US` or `GB`. See the \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \ncountry codes section of wikipedia for reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "currentLanguage", - "summary": "Language of the app's current locale, as an ISO 2-letter code.", - "description": "This property holds a value such as `en` or `fr`. See the \n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) section of wikipedia for reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "currentLocale", - "summary": "Current app locale, as a combination of ISO 2-letter language and country codes.", - "description": "This property holds a value such as `en-US` or `en-GB`.\nSee the [ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and \n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements) \nsections of wikipedia for reference.\n", - "platforms": [ - { - "since": "1.5", - "name": "android" - }, - { - "since": "1.5", - "name": "iphone" - }, - { - "since": "1.5", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ] - }, - "Titanium.Media.Android": { - "name": "Titanium.Media.Android", - "summary": "Android-specific media-related functionality.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Android/Android.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "scanMediaFiles", - "summary": "Scans newly created or downloaded media files to make them available to other\nAndroid media providers, such as the Gallery.\n", - "description": "Android scans media files for inclusion in the Gallery and other media providers.\nUse this method to force an immediate scan of particular files, such as\nnewly-created or downloaded resources.\n \nSee [MediaScannerConnection in the Android API Reference](https://developer.android.com/reference/android/media/MediaScannerConnection.html).\n", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "paths", - "summary": "Array of paths to the files you want to scan.", - "type": "Array" - }, - { - "name": "mimeTypes", - "summary": "Array of MIME types for the files in the paths parameter. If `null`, MIME type will \nbe inferred from the file names.\n", - "type": "Array" - }, - { - "name": "callback", - "summary": "Function to call when each file is done being scanned. \n", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setSystemWallpaper", - "summary": "Set the system homescreen wallpaper.", - "description": "The image to use as the wallpaper must be passed as a . You can\ncreate a `Blob` from an image file by calling [File.read](Titanium.Filesystem.File.read). \nYou can also use the \nor methods to allow users to select an existing photo\nor take a new one.\n", - "platforms": [ - { - "since": "1.7.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "image", - "summary": "Image to use as the wallpaper, as a `Blob` object.", - "type": "Titanium.Blob" - }, - { - "name": "scale", - "summary": "If `true`, the image is scaled to fit the width of the system wallpaper. If\n`false`, the image is not scaled.\n", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - } - ] - }, - "MediaScannerResponse": { - "name": "MediaScannerResponse", - "summary": "Simple object passed to the [scanMediaFiles](Titanium.Media.Android.scanMediaFiles) callback.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Android/Android.yml", - "description": "The callback is called once per scanned file.\n", - "properties": [ - { - "name": "path", - "summary": "Path to the media file that was scanned.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "uri", - "summary": "URI to the file if it was scanned and added to the media library, or `null`\nif the file was not added.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "Titanium.Media.AudioPlayer": { - "name": "Titanium.Media.AudioPlayer", - "summary": "An audio player object used for streaming audio to the device, and low-level control of the audio playback.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/AudioPlayer.yml", - "description": "On Android, when you are done playing a given audio file, you must call the\n[release](Titanium.Media.AudioPlayer.release) method to stop buffering audio data and\nrelease associated system resources. Since 7.5.0, this method is available on iOS as well\nand will release all audio-player related resources. After this method has been called,\nthe object should not be accessed anymore.\n\nOn iOS, you can control how the audio stream interacts with other system sounds\nby setting . Since Titanium 7.5.0, this API\nuses the [AVPlayer API](https://developer.apple.com/documentation/avfoundation/avplayer) for a more modern\nand performant audio playback.\n\nUse the method to create an audio player.\n", - "events": [ - { - "name": "change", - "summary": "Fired when the state of the playback changes.", - "description": "This event can be generated by programmatic events, such as pausing or stopping the audio,\nand also by external events, such as the current state of network buffering.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "state", - "summary": "Current state of playback.", - "type": "Number" - }, - { - "name": "description", - "summary": "Text description of the state of playback.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "complete", - "summary": "Fired when the audio has finished playing.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates if the sound was played successfully.\nReturns `true` if request succeeded, `false` otherwise.\n", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. Will be undefined if `success` is `true`.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nError code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "metadata", - "summary": "Fired when the timed metadata was encountered most recently within the media as it plays.", - "description": "Use this event to receive meta information about real time streams and buffers, for example\nthe title of an active radio stream. Read more about timed metadata in the [Apple docs](https://developer.apple.com/documentation/avfoundation/avplayeritem/1389602-timedmetadata?language=objc).\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "items", - "summary": "An array of metadata items containing relevant information about the current media item.", - "type": "Array" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "error", - "summary": "Fired when there's an error.", - "platforms": [ - { - "since": "4.1.0", - "name": "android" - }, - { - "since": "4.1.0", - "name": "iphone" - }, - { - "since": "4.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "error", - "summary": "Error message.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Different between Android and iOS.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "progress", - "summary": "Fired once per second with the current progress during playback.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "progress", - "summary": "Current progress, in milliseconds.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "seek", - "summary": "Fired once the [seekToTime](Titanium.Media.AudioPlayer.seek) method completes.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "finished", - "summary": "The event for any prior seek request that is still in process will be invoked \nimmediately with the `finished` parameter set to `false`. \nIf the new request completes without being interrupted by another seek \nrequest or by any other operation this event will be invoked with \nthe `finished` parameter set to `true`. \n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Audio Streaming", - "code": "The following example demonstrates using the `AudioPlayer` object to stream audio.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Audio Test',\n backgroundColor: '#fff',\n layout: 'vertical'\n});\n\nvar startStopButton = Ti.UI.createButton({\n title: 'Start/Stop Streaming',\n top: 10,\n width: 200,\n height: 40\n});\n\nvar pauseResumeButton = Ti.UI.createButton({\n title: 'Pause/Resume Streaming',\n top: 10,\n width: 200,\n height: 40,\n enabled: false\n});\n\nwin.add(startStopButton);\nwin.add(pauseResumeButton);\n\n// allowBackground: true on Android allows the\n// player to keep playing when the app is in the\n// background.\nvar audioPlayer = Ti.Media.createAudioPlayer({\n url: 'www.example.com/podcast.mp3',\n allowBackground: true\n});\n\nstartStopButton.addEventListener('click', function() {\n // When paused, playing returns false.\n // If both are false, playback is stopped.\n if (audioPlayer.playing || audioPlayer.paused) {\n audioPlayer.stop();\n pauseResumeButton.enabled = false;\n audioPlayer.release();\n } else {\n audioPlayer.start();\n pauseResumeButton.enabled = true;\n }\n});\n\npauseResumeButton.addEventListener('click', function() {\n if (audioPlayer.paused) {\n audioPlayer.start();\n } else {\n audioPlayer.pause();\n }\n});\n\naudioPlayer.addEventListener('progress', function(e) {\n Ti.API.info('Time Played: ' + Math.round(e.progress) + ' milliseconds');\n});\n\naudioPlayer.addEventListener('change', function(e) {\n Ti.API.info('State: ' + e.description + ' (' + e.state + ')');\n});\n\nwin.addEventListener('close', function() {\n audioPlayer.stop();\n audioPlayer.release();\n});\n\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getPaused", - "deprecated": { - "notes": "Use the cross-platform API property instead.", - "since": "7.5.0", - "removed": "10.0.0" - }, - "summary": "Returns the value of the [paused](Titanium.Media.AudioPlayer.paused) property.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPaused", - "deprecated": { - "notes": "Use the cross-platform API property instead.", - "since": "7.5.0", - "removed": "10.0.0" - }, - "summary": "Returns the value of the [paused](Titanium.Media.AudioPlayer.paused) property.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "getPlaying", - "deprecated": { - "notes": "Use the cross-platform API property instead.", - "since": "7.5.0", - "removed": "10.0.0" - }, - "summary": "Returns the value of the [playing](Titanium.Media.AudioPlayer.playing) property.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPlaying", - "deprecated": { - "notes": "Use the cross-platform API property instead.", - "since": "7.5.0", - "removed": "10.0.0" - }, - "summary": "Returns the value of the [playing](Titanium.Media.AudioPlayer.playing) property.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "pause", - "summary": "Pauses audio playback.", - "description": "On iOS, the `pause` call operates as a toggle. If the stream is already paused,\ncalling `pause` again resumes playing the stream.\n\nOn Android, the `pause` call does nothing if the stream is already paused.\n\nOn both platforms, calling [Titanium.Media.AudioPlayer.start](Titanium.Media.AudioPlayer.start) on a paused\nstream resumes play.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "play", - "deprecated": { - "notes": "Use the cross-platform API [Titanium.Media.AudioPlayer.start](Titanium.Media.AudioPlayer.start) instead.", - "since": "7.5.0" - }, - "summary": "Starts or resumes audio playback.", - "description": "This method is identical to .\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setPaused", - "deprecated": { - "notes": "Use the cross-platform API [Titanium.Media.AudioPlayer.pause](Titanium.Media.AudioPlayer.pause) instead.", - "since": "7.5.0", - "removed": "10.0.0" - }, - "summary": "Sets the value of the [paused](Titanium.Media.AudioPlayer.paused) property.", - "description": "On iOS, this method can be used to pause and unpause playback. For portability,\nit is preferable to use the [Titanium.Media.AudioPlayer.pause](Titanium.Media.AudioPlayer.pause) and\n[Titanium.Media.AudioPlayer.start](Titanium.Media.AudioPlayer.start) methods instead.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "paused", - "summary": "Pass `true` to pause the current playback temporarily, `false` to unpause it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "seekToTime", - "summary": "Moves the playback cursor and invokes the specified block when the seek \noperation has either been completed or been interrupted.\n", - "description": "Use this method to seek to a specified time for the current player item and \nto be notified by the `seek` event when the seek operation is complete. \n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "time", - "summary": "The time in milliseconds to seek to.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "release", - "summary": "Stops buffering audio data and releases audio resources.", - "description": "On Android, this method should be called when you are done streaming a given\naudio object, to release underlying resources, including buffered data.\n\nOn iOS, this method can be called for parity to release the current player\ninstance and it's observers. Note: If you are listening to the `progress` event,\nyou should remove and re-add the event listener.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getAudioSessionId", - "deprecated": { - "notes": "Use the [audioSessionId](Titanium.Media.AudioPlayer.audioSessionId) property instead", - "since": "10.0.0" - }, - "summary": "Returns the audio session id.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "returns": { - "type": "Number" - } - }, - { - "name": "start", - "summary": "Starts or resumes audio playback.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "restart", - "summary": "Restarts (stops and stars) audio playback.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stateDescription", - "summary": "Converts a [state](Titanium.Media.AudioPlayer.state) value into a text description\nsuitable for display.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "state", - "summary": "State value to convert.", - "type": "Number" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "stop", - "summary": "Stops audio playback.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "STATE_BUFFERING", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_BUFFERING](Titanium.Media.AUDIO_STATE_BUFFERING) instead.", - "since": "7.5.0" - }, - "summary": "Audio data is being buffered from the network.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_INITIALIZED", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_INITIALIZED](Titanium.Media.AUDIO_STATE_INITIALIZED) instead.", - "since": "7.5.0" - }, - "summary": "Audio playback is being initialized.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_PAUSED", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_PAUSED](Titanium.Media.AUDIO_STATE_PAUSED) instead.", - "since": "7.5.0" - }, - "summary": "Playback is paused.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_PLAYING", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_PLAYING](Titanium.Media.AUDIO_STATE_PLAYING) instead.", - "since": "7.5.0" - }, - "summary": "Audio playback is active.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STARTING", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_STARTING](Titanium.Media.AUDIO_STATE_STARTING) instead.", - "since": "7.5.0" - }, - "summary": "Audio playback is starting.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STOPPED", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_STOPPED](Titanium.Media.AUDIO_STATE_STOPPED) instead.", - "since": "7.5.0" - }, - "summary": "Audio playback is stopped.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STOPPING", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_STOPPING](Titanium.Media.AUDIO_STATE_STOPPING) instead.", - "since": "7.5.0" - }, - "summary": "Audio playback is stopping.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_WAITING_FOR_DATA", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_WAITING_FOR_DATA](Titanium.Media.AUDIO_STATE_WAITING_FOR_DATA) instead.", - "since": "7.5.0" - }, - "summary": "Player is waiting for audio data from the network.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_WAITING_FOR_QUEUE", - "deprecated": { - "notes": "Use [Titanium.Media.AUDIO_STATE_WAITING_FOR_QUEUE](Titanium.Media.AUDIO_STATE_WAITING_FOR_QUEUE) instead.", - "since": "7.5.0" - }, - "summary": "Player is waiting for audio data to fill the queue.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_ALARM", - "summary": "Used to identify the volume of audio streams for alarms.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_SIGNALLING", - "summary": "Used to identify the volume of audio streams for DTMF tones or beeps.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_MEDIA", - "summary": "Used to identify the volume of audio streams for media playback.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_NOTIFICATION", - "summary": "Used to identify the volume of audio streams for notifications.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_RING", - "summary": "Used to identify the volume of audio streams for the phone ring.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_VOICE", - "summary": "Used to identify the volume of audio streams for voice calls.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "allowBackground", - "summary": "Boolean to indicate if audio should continue playing even if the associated\nAndroid [Activity](Titanium.Android.Activity) is paused.\n", - "description": "Setting `allowBackground` to `true` allows the audio to continue playing, for\nexample, if the application is in the background.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "audioFocus", - "summary": "Focuses on the current audio player and stops other audio playing.", - "description": "If true then all other audio sources will be stopped\nwhen Titanium.AudioPlayer is started or resumed.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "audioSessionId", - "summary": "Returns the audio session id.", - "platforms": [ - { - "since": "10.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "audioType", - "summary": "Changes the audio-stream-type.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Media.Sound.AUDIO_TYPE_ALARM", - "Titanium.Media.Sound.AUDIO_TYPE_SIGNALLING", - "Titanium.Media.Sound.AUDIO_TYPE_MEDIA", - "Titanium.Media.Sound.AUDIO_TYPE_NOTIFICATION", - "Titanium.Media.Sound.AUDIO_TYPE_RING", - "Titanium.Media.Sound.AUDIO_TYPE_VOICE" - ] - }, - { - "name": "bitRate", - "summary": "Bit rate of the current playback stream.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "duration", - "summary": "Estimated duration in milliseconds of the file being played.", - "description": "May return `0` when playing a live stream.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "idle", - "summary": "Boolean indicating if the player is idle.", - "description": "`true` if the player is in the initialized state: that is, not playing, paused,\nor waiting for data.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "muted", - "summary": "Indicates whether or not audio output of the player is muted.", - "description": "Only affects audio muting for the player instance and not for the device.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "externalPlaybackActive", - "summary": "Indicates whether the player is currently playing video in \"external playback\" mode.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "allowsExternalPlayback", - "summary": "Indicates whether the player allows switching to \"external playback\" mode.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "rate", - "summary": "Indicates the desired rate of playback; 0.0 means \"paused\", 1.0 indicates a \ndesire to play at the natural rate of the current item. In addition, 2.0\nwould mean that the audio plays twice as fast.\n", - "description": "Setting the value of rate to 0.0 pauses playback, causing the value of \nthe `state` property change to .\nSetting the rate to a non-zero value causes the value of the `state` property \nto become either or \n, depending on whether sufficient \nmedia data has been buffered for playback to occur and whether the player's \ndefault behavior of waiting in order to minimize stalling is permitted.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "paused", - "summary": "Boolean indicating if audio playback is paused.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "playing", - "summary": "Boolean indicating if audio is currently playing.", - "description": "Returns `false` if playback is stopped or paused.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "progress", - "summary": "Current playback progress, in milliseconds.", - "description": "Returns zero if `bitRate` has not yet been detected.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "state", - "summary": "Current state of playback, specified using one of the `STATE` constants defined on this object.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.AUDIO_STATE_BUFFERING", - "Titanium.Media.AUDIO_STATE_INITIALIZED", - "Titanium.Media.AUDIO_STATE_PAUSED", - "Titanium.Media.AUDIO_STATE_PLAYING", - "Titanium.Media.AUDIO_STATE_STARTING", - "Titanium.Media.AUDIO_STATE_STOPPED", - "Titanium.Media.AUDIO_STATE_STOPPING", - "Titanium.Media.AUDIO_STATE_WAITING_FOR_DATA" - ] - }, - { - "name": "url", - "summary": "URL for the audio stream.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "volume", - "summary": "Volume of the audio, from 0.0 (muted) to 1.0 (loudest).", - "description": "This setting controls the volume of the sound relative to the overall\nvolume setting for the device.\n\nOn iOS, to adjust the volume of the device, set the `volume` property of\n and set the property\nto either ,\n,\nor .\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "waiting", - "summary": "Boolean indicating if the playback is waiting for audio data from the network.", - "description": "This property is `true` if the player is in any of the waiting states, including\nbuffering, starting, waiting for data, and waiting for queue.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "bufferSize", - "summary": "Size of the buffer used for streaming, in milliseconds.", - "description": "Prior to Titanium 7.5.0, this property was set in bytes. Since the internal iOS\nAPI moved to the more modern AVPlayer, this property now works with milliseconds instead.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "time", - "summary": "Current playback position of the audio.", - "description": "Time is reported in milliseconds.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "TiMetadataItemType": { - "name": "TiMetadataItemType", - "summary": "An abstract type to represent a metadata item inside the `metadata` event (iOS only).", - "extends": "Object", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/AudioPlayer.yml", - "description": "This type is key-value based and is returned inside an array of metadata items.\nRead more about timed metadata items in the [Apple docs](https://developer.apple.com/documentation/avfoundation/avmetadataitem?language=objc).\n", - "properties": [ - { - "name": "key", - "summary": "The key of the metadata item, e.g. \"title\".", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "keySpace", - "summary": "The key-path of the metadata item.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "value", - "summary": "The value of the metadata item. Can be represented as various types.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number", - "Boolean" - ] - }, - { - "name": "extraAttributes", - "summary": "A dictionary of the additional attributes.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - } - ] - }, - "Titanium.Media.AudioRecorder": { - "name": "Titanium.Media.AudioRecorder", - "summary": "An audio recorder object used for recording audio from the device microphone.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/AudioRecorder.yml", - "description": "Use the method to create an audio recorder.\n\nEnsure to request the permissions for audio-recording before starting a new record-session.\nThis can be done by using to check whether\naudio-permissions are granted and to \nrequest audio-permissions. \n\n**Android Platform Note**: On Android, you also need to include the following permission\ninto the `` section of the tiapp.xml:\n\n``` xml\n\n \n \n \n\n```\n", - "examples": [ - { - "description": "Audio Recorder Example", - "code": "The following code-example creates a window that controls the audio-recorder flow.\n\n``` js\nvar window = Ti.UI.createWindow({\n backgroundColor: '#fff'\n});\n\nvar recordStart = Ti.UI.createButton({\n title: 'Start',\n top: 10\n});\n\nvar recordPause = Ti.UI.createButton({\n title: 'Pause',\n top: 60\n});\n\nvar recordStop = Ti.UI.createButton({\n title: 'Stop',\n top: 110\n});\n\nvar recordPlay = Ti.UI.createButton({\n title: 'Play',\n top: 160\n});\n\nvar audioRecorder = Ti.Media.createAudioRecorder();\nvar record;\nvar audioPlayer;\n\nwindow.addEventListener('open', function(e) {\n if (!Ti.Media.hasAudioRecorderPermissions()) {\n Ti.Media.requestAudioRecorderPermissions(function(e) {\n if (e.success) {\n window.add(recordStart);\n }\n });\n } else {\n window.add(recordStart);\n }\n});\n\nrecordStart.addEventListener('click', function(e) {\n audioRecorder.start();\n});\n\nrecordPause.addEventListener('click', function(e) {\n if (audioRecorder.getPaused()) {\n recordPause.title = 'Pause';\n audioRecorder.resume()\n } else {\n recordPause.title = 'Resume';\n audioRecorder.pause();\n }\n});\n\nrecordStop.addEventListener('click', function(e) {\n record = audioRecorder.stop();\n Ti.API.info(record.nativePath);\n});\n\nrecordPlay.addEventListener('click', function(e) {\n audioPlayer = Ti.Media.createAudioPlayer({\n url: record.nativePath\n });\n audioPlayer.start();\n});\n\nwindow.add(recordPause);\nwindow.add(recordStop);\nwindow.add(recordPlay);\n\nwindow.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "pause", - "summary": "Pauses the current audio recording.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "resume", - "summary": "Resumes a paused recording.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "start", - "summary": "Starts an audio recording.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops the current audio recording and returns the recorded audio file.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Titanium.Filesystem.File" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "compression", - "summary": "Audio compression to be used for the recording.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Media.AUDIO_FORMAT_AAC", - "Titanium.Media.AUDIO_FORMAT_ALAW", - "Titanium.Media.AUDIO_FORMAT_APPLE_LOSSLESS", - "Titanium.Media.AUDIO_FORMAT_ILBC", - "Titanium.Media.AUDIO_FORMAT_IMA4", - "Titanium.Media.AUDIO_FORMAT_LINEAR_PCM", - "Titanium.Media.AUDIO_FORMAT_ULAW" - ] - }, - { - "name": "format", - "summary": "Audio format to be used for the recording.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Media.AUDIO_FILEFORMAT_3GP2", - "Titanium.Media.AUDIO_FILEFORMAT_3GPP", - "Titanium.Media.AUDIO_FILEFORMAT_AIFF", - "Titanium.Media.AUDIO_FILEFORMAT_AMR", - "Titanium.Media.AUDIO_FILEFORMAT_CAF", - "Titanium.Media.AUDIO_FILEFORMAT_MP3", - "Titanium.Media.AUDIO_FILEFORMAT_MP4", - "Titanium.Media.AUDIO_FILEFORMAT_MP4A", - "Titanium.Media.AUDIO_FILEFORMAT_WAVE" - ] - }, - { - "name": "paused", - "summary": "Indicates if the audio recorder is paused.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "recording", - "summary": "Indicates if the audio recorder is recording.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "stopped", - "summary": "Indicates if the audio recorder is stopped.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Media.Item": { - "name": "Titanium.Media.Item", - "summary": "A representation of a media item returned by [openMusicLibrary](Titanium.Media.openMusicLibrary) or [queryMusicLibrary](Titanium.Media.queryMusicLibrary).", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Item.yml", - "description": "This is a read-only object that describes a single media item, not a playlist. \nTitanium does not support access to playlists.\n\n`Item` objects cannot be created explicitly. The \n[openMusicLibrary](Titanium.Media.openMusicLibrary) returns `Item` objects in its\n`success` callback function, while [queryMusicLibrary](Titanium.Media.queryMusicLibrary)\nreturns an array of `Item` objects.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "albumArtist", - "summary": "Artist credited for the album containing this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "albumArtistPersistentID", - "summary": "The persistent identifier for an album artist.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "albumPersistentID", - "summary": "The key for the persistent identifier for an album.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "albumTitle", - "summary": "Title of the album containing this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "albumTrackCount", - "summary": "Number of tracks for the album containing this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "albumTrackNumber", - "summary": "Track number for this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "artist", - "summary": "Artist credited for this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "artwork", - "summary": "Image for the item's artwork as a `Blob` object, or `null` if no artwork is\navailable.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob", - "permission": "read-only" - }, - { - "name": "assetURL", - "summary": "A URL pointing to the media item.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "beatsPerMinute", - "summary": "The number of musical beats per minute for the media item.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "bookmarkTime", - "summary": "The user's place in the media item the most recent time it was played.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "comments", - "summary": "Textual information about the media item.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "composer", - "summary": "Composer of this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "dateAdded", - "summary": "Date when the item was added to the music library.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "discCount", - "summary": "Total number of discs for the album containing this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "discNumber", - "summary": "Disc number for this item in the album.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "genre", - "summary": "Genre of this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "genrePersistentID", - "summary": "The persistent identifier for a genre.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "hasProtectedAsset", - "summary": "True if the item represents a protected asset.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "isCloudItem", - "summary": "True if the media item is an iCloud item.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "isCompilation", - "summary": "True if this item is part of a compilation album.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "isExplicit", - "summary": "True if this item is marked as \"Explicit\".", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "lastPlayedDate", - "summary": "The most recent calendar date on which the user played the media item.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "lyrics", - "summary": "Lyrics for this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "mediaType", - "summary": "The type of the media. \n", - "description": "At least in theory, a single item can have more than one media type, in which case the\nvalue represents a bitwise-OR of all the applicable media types.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.MUSIC_MEDIA_TYPE_ALL", - "Titanium.Media.MUSIC_MEDIA_TYPE_ANY_AUDIO", - "Titanium.Media.MUSIC_MEDIA_TYPE_AUDIOBOOK", - "Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC", - "Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST" - ] - }, - { - "name": "persistentID", - "summary": "The key for the persistent identifier for the media item.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "playCount", - "summary": "Number of times the item has been played.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "playbackDuration", - "summary": "Length (in seconds) of this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "playbackStoreID", - "summary": "Used to enqueue store tracks by their ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "podcastTitle", - "summary": "Title of a podcast item.", - "description": "Only included if the media type is .\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "podcastPersistentID", - "summary": "The persistent identifier for an audio podcast.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "rating", - "summary": "Rating for this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "releaseDate", - "summary": "Date when this this item was released.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Date", - "permission": "read-only" - }, - { - "name": "skipCount", - "summary": "Number of times this item has been skipped.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "title", - "summary": "Title of this item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "userGrouping", - "summary": "Grouping information for the media item.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Media": { - "name": "Titanium.Media", - "summary": "The top-level Media module.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "description": "The Media module is used to access the device's media-related functionality, such\nas using the device's camera and photo gallery, playing media files, or recording\naudio or video.\nFor examples of using the Media APIs, refer to the\n[Working with Media APIs guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/Working_with_Media_APIs/)\nin addition to the other media submodule API documentation.\n**Note**: Some third party Android camera apps may choose to ignore video recording quality\nsettings. If you wish to specifically set the video quality, don't assume\n`EXTRA_VIDEO_QUALITY` intent will be respected by the camera app and use Titanium's built-in\ncamera window which can be used to assign the `overlay` property when calling the\n`showCamera()` method.\n", - "events": [ - { - "name": "cameraready", - "summary": "Fires when the camera overlay is ready to take pictures.", - "platforms": [ - { - "since": "6.0.0", - "name": "android" - } - ] - }, - { - "name": "routechange", - "summary": "Fired when an audio line type change is detected.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "reason", - "summary": "The reason for route change.", - "type": "String" - }, - { - "name": "oldRoute", - "summary": "Returns a description of the old route, consisting of zero or more input ports and zero or more output ports.", - "type": "RouteDescription" - }, - { - "name": "currentRoute", - "summary": "Returns a description of the current route, consisting of zero or more input ports and zero or more output ports.", - "type": "RouteDescription" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "volume", - "summary": "Fired when the volume output changes.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "volume", - "summary": "New volume level in dB.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "beep", - "summary": "Plays a device beep notification.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hideCamera", - "summary": "Hides the device camera UI.", - "description": "Must be called after calling `showCamera` and only when `autohide` is set to `false`.\nThis method causes the media capture UI to be hidden.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hideMusicLibrary", - "summary": "Hides the music library.", - "description": "Must be called after calling [openMusicLibrary](Titanium.Media.openMusicLibrary)\nand only when `autohide` is set to `false`.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isMediaTypeSupported", - "summary": "Returns `true` if the source supports the specified media type.", - "description": "You can query whether a given media type is supported by the device's\ncamera (`source` == 'camera') or photo library (`source` == 'photo').\n\nAn additional value, `photogallery` can be used to query the media\nsupported by the device's camera roll or saved image album, which is a\nsubset of the iOS photo library. However, when calling\n[openPhotoGallery](Titanium.Media.openPhotoGallery) on iOS, the entire\nlibrary is displayed, and there is currently no way to restrict the\ngallery to show only the camera roll/saved images album.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "source", - "summary": "Media source specified as a string: `camera` for Camera or `photo` for Photo Library.\n", - "type": "String" - }, - { - "name": "type", - "summary": "Media type to check.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "openMusicLibrary", - "summary": "Shows the music library and allows the user to select one or more tracks.", - "description": "If `autohide` is set to `false`, you must hide the library explicitly using\n[hideMusicLibrary](Titanium.Media.hideMusicLibrary).\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "A dictionary of options as described in .", - "type": "MusicLibraryOptionsType" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openPhotoGallery", - "summary": "Opens the photo gallery image picker.", - "description": "In iOS 6, Apple introduced the Info.plist key `NSPhotoLibraryUsageDescription` that is used to display an\nown description while authorizing gallery permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Photo gallery options as described in .", - "type": "PhotoGalleryOptionsType" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "previewImage", - "summary": "Displays the given image.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Dictionary containing the image and callback functions.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "saveToPhotoGallery", - "summary": "Saves media to the device's photo gallery / camera roll.", - "description": "This operation is asynchronous. The caller can supply callbacks to be triggered when the\nsave operation completes.\n\nMedia can be passed as either a `Blob` object or a `File` object. If the `media` argument\nis not one of these types, an error is generated.\n\nNote that when passing a file (or a blob created from a file), the file name must\nhave the appropriate extension for the data--for example, `image.jpg` or `video1.mov` work,\nbut `video1.tmp` does not. Currently, the `.mp4` extension is not supported, but MP4\nfiles may be imported by saving them with the `.mov` extension.\n\nMake sure to check for gallery access permissions with \nand request the permissions with if not granted.\nOn iOS, the `NSPhotoLibraryAddUsageDescription` plist key is required in the tiapp.xml in order\nto use this API.\n\nOn Android, this method does not support saving videos to the gallery prior to Titanium SDK 6.1.0.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "media", - "summary": "Media to save to the camera roll or media gallery.", - "type": [ - "Titanium.Blob", - "Titanium.Filesystem.File" - ] - }, - { - "name": "callbacks", - "summary": "Pass a dictionary with the following supported keys: `success` a function that\nwill be called when the save succeeds, and `error` a function that will be\ncalled upon receiving an error.\n", - "type": "Object" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setOverrideAudioRoute", - "summary": "Overrides the default audio route when using the session mode.", - "description": "By default, when using the session mode,\nthe audio output is routed to the speaker in the receiver. This method lets you specify\nthat audio should be routed to the built-in speaker.\n\nIf you override the audio route while audio is playing the changes won't not take effect until the audio is restarted.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "route", - "summary": "The specified audio route.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "showCamera", - "summary": "Shows the camera.", - "description": "By default, the native camera controls are displayed. To add your own camera controls,\nyou can add an overlay view by setting the `overlay` property on the `options` argument.\n\n#### Android Platform Notes\n\n* To suppress the default controls, set `autohide` to `false` and then set the\n`overlay` property to a view that contains a control (such as a button) to\ntake the photo. You must then control the camera explicitly, using\nthe [takePicture](Titanium.Media.takePicture) and [hideCamera](Titanium.Media.hideCamera)\nmethods.\n* Setting `saveToPhotoGallery` to `false` is not guaranteed to work with all camera apps. If this setting is desired, then you should use Titanium's internal camera overlay instead.\n* You can only use one or the other (video or photo) types in the array.\n\n#### iOS Platform Notes\n\nTo suppress the default controls, set `showControls` and `autohide` to `false`.\n\nIf the `showControls` option is `false`, you must control the camera explicitly, using\nthe [takePicture](Titanium.Media.takePicture) and [hideCamera](Titanium.Media.hideCamera)\nmethods.\n\nImages taken with the camera will not have accurate geolocation data embedded in the images;\nthe latitude and longitude will be set to '0'. This is not an error, but a limitation which\nApple has put on the camera API.\n\nImportant: Use and \nto ask for camera permissions. This is especially important when running on iOS 10 and later, since\nthe application may crash otherwise.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "A dictionary of camera options as described in .", - "type": "CameraOptionsType" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hasMusicLibraryPermissions", - "summary": "Returns `true` if the app has music library access.", - "description": "Music-library permissions are only needed in iOS 9.3 and later and will be ignored on older\niOS versions. Because of that, the method will return `true` for devices that run iOS < 9.3.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestMusicLibraryPermissions", - "summary": "Request permissions for the native music-library.", - "description": "Music-library permissions are only needed in iOS 9.3 and later and will be ignored on older\niOS versions. Because of that, the callback will ignore the permission-check and always return\n`{success: true}` for devices that run iOS < 9.3.\n\nImportant: On iOS 10, Apple introduced the Info.plist key `NSAppleMusicUsageDescription` that is used to\ndisplay an own description while authorizing the music library. This key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call indicating if permission was granted or denied.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "queryMusicLibrary", - "summary": "Searches the music library for items matching the specified search predicates.", - "description": "Use to check the granted permissions and\n to request the permissions. This is especially important\nwhen running on an iOS 10 device, because the music-library access will crash without having the privacy-key\n`NSAppleMusicUsageDescription` that is specified in .\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "query", - "summary": "The query object to extract information from.", - "type": "MediaQueryType" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "startMicrophoneMonitor", - "summary": "Starts monitoring the microphone sound level.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopMicrophoneMonitor", - "summary": "Stops monitoring the microphone sound level.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "takePicture", - "summary": "Uses the device camera to capture a photo.", - "description": "Must be called after calling `showCamera` and only when `autohide` is set to `false`.\n\nThis method causes the media capture device to capture a photo and call the\n`success` callback.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "startVideoCapture", - "summary": "Starts video capture using the camera specified.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopVideoCapture", - "summary": "Stops video capture using the camera specified.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "pauseVideoCapture", - "summary": "Pauses video capturing.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "resumeVideoCapture", - "summary": "Resumes video capturing.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "switchCamera", - "summary": "Switches between front and rear-facing cameras. Make sure to set one of the below constants to determine\nthe camera you want to switch to.\n", - "description": "In Android, this can only be called when using a custom overlay (see ).\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "1.8.1", - "name": "iphone" - }, - { - "since": "1.8.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "camera", - "summary": "Constant indicating to which camera you want to switch.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hasCameraPermissions", - "summary": "Returns `true` if the app has camera access.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestCameraPermissions", - "summary": "Requests for camera access.", - "description": "On Android, the request view will show if the permission is not accepted by the user, and the user did\nnot check the box \"Never ask again\" when denying the request. If the user checks the box \"Never ask again,\"\nthe user has to manually enable the permission in device settings.\n\nThis method requests `Manifest.permission.CAMERA`, `Manifest.permission.READ_EXTERNAL_STORAGE` and `Manifest.permission.WRITE_EXTERNAL_STORAGE` on Android.\nIf you require other permissions, you can also use .\n\nIn iOS 6, Apple introduced the Info.plist key `NSCameraUsageDescription` that is used to display an\nown description while authorizing camera permissions. In iOS 10, this key is mandatory when taking a photo\nand the application will crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information. When using the camera to take a video, you also need the `NSMicrophoneUsageDescription` key.\nIn addition, the authorization dialog will only show if user has not made a decision, yet.\nIf the user has, the callback will return the earlier decision. To change the permission the user needs to\nchange it in the device settings.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call indicating if permission was granted or denied.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "hasPhotoGalleryPermissions", - "summary": "Returns `true` if the app has photo gallery permissions.", - "description": "If you use Android 13+ you have to add the following permissions to your tiapp.xml:\n``` xml\n\n\n```\n\nYou don't need to check this before using . If you already have the permission and use\n it will call the success event, no second permission request is displayed.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestPhotoGalleryPermissions", - "summary": "Requests for photo gallery permissions.", - "description": "In iOS 6, Apple introduced the Info.plist key `NSPhotoLibraryUsageDescription` that is used to display an\nown description while authorizing photo gallery permissions. In iOS 10, this key is mandatory when accessing the\nphoto gallery and the application will crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information. If the user has, the callback will return the earlier decision. To change the permission the\nuser needs to change it in the device settings.\n\niOS Apps that do not include this method, will present the system-dialog while the dialog is opened with .\n\nIf you use Android 13+ you have to add the following permissions to your tiapp.xml:\n``` xml\n\n\n```\nWhen you only want to use it for images you can use `` and request `android.permission.READ_MEDIA_IMAGES`.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call indicating if permission was granted or denied.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "takeScreenshot", - "summary": "Takes a screen shot of the visible UI on the device.", - "description": "This method is asynchronous. The screenshot is returned in the callback argument.\nThe callback argument's `media` property contains the screenshot image as a\n[Blob](Titanium.Blob) object.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Function to call upon capture.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "vibrate", - "summary": "Makes the device vibrate.", - "description": "On Android, a `pattern` argument can be provided to specify a\nvibration pattern.\n\nThe `pattern` is an array of Number values. Each number in the array is\ninterpreted as a duration in milliseconds. The first number is the *delay*\nbefore the pattern starts, and the remaining numbers are interpreted as\nalternating periods of on and off times. For example, the following pattern:\n\n``` js\n[ 0, 500, 100, 500, 100, 500 ]\n```\n\nWould cause the vibration to start immediately (delay = 0), and perform three\nlong vibrations (500 ms) separated by short pauses (100ms).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "pattern", - "summary": "Array of values identifying a vibrate pattern (only used on Android).", - "type": "Array", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hasAudioPermissions", - "deprecated": { - "notes": "Use [Titanium.Media.hasAudioRecorderPermissions](Titanium.Media.hasAudioRecorderPermissions) instead.", - "since": "6.1.0", - "removed": "10.0.0" - }, - "summary": "Returns `true` if the app has audio permissions.", - "description": "Recording audio requires explicit permission from the user. After the user\ngrants or denies permission, the system remembers the choice for future use in the same app.\nIf permission is not granted, or if the user has not yet responded to the permission prompt,\nany audio recording sessions record only silence.\n\nIn addition, Apple introduced the Info.plist key `NSMicrophoneUsageDescription` that is used to display an\nown description while authorizing microphone permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "hasAudioRecorderPermissions", - "summary": "Returns `true` if the app has audio permissions.", - "description": "Recording audio requires explicit permission from the user. After the user\ngrants or denies permission, the system remembers the choice for future use in the same app.\nIf permission is not granted, or if the user has not yet responded to the permission prompt,\nany audio recording sessions record only silence.\n\nIn addition, Apple introduced the Info.plist key `NSMicrophoneUsageDescription` that is used to display an\nown description while authorizing microphone permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "requestAudioRecorderPermissions", - "summary": "Request the user's permission for audio recording.", - "description": "Recording audio requires explicit permission from the user. After the user\ngrants or denies permission, the system remembers the choice for future use in the same app.\nIf permission is not granted, or if the user has not yet responded to the permission prompt,\nany audio recording sessions record only silence.\n\nIn addition, Apple introduced the Info.plist key `NSMicrophoneUsageDescription` that is used to display an\nown description while authorizing microphone permissions. In iOS 10, this key is mandatory and the application\nwill crash if your app does not include the key. Check the [Apple docs](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)\nfor more information.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Callback function to execute when the users responds to the authorization alert.\nOptional on SDK 10, as this method will return a `Promise`, which may be used to handle the result.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "On SDK 10+, this method will return a `Promise` whose resolved value is equivalent to that passed to the optional callback argument.", - "type": "Promise" - } - }, - { - "name": "createAudioPlayer", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Media.AudioPlayer" - } - }, - { - "name": "createAudioRecorder", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Media.AudioRecorder" - } - }, - { - "name": "createSound", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Media.Sound" - } - }, - { - "name": "createSystemAlert", - "deprecated": { - "notes": "This iOS-only API has been deprecated and moved to the [Ti.SystemAlert](https://github.com/appcelerator-modules/ti.systemalert) module in 8.0.0.", - "since": "8.0.0" - }, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Media.SystemAlert" - } - }, - { - "name": "createVideoPlayer", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Media.VideoPlayer" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "AUDIO_FILEFORMAT_3GP2", - "summary": "Audio file format 3GPP2.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_3GPP", - "summary": "Audio file format 3GPP.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_AIFF", - "summary": "Audio file format Audio Interchange File Format (AIFF).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_AMR", - "summary": "Audio file format Adaptive Multi-Rate (AMR).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_CAF", - "summary": "Audio file format Apple Compressed Audio Format (CAF).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_MP3", - "summary": "Audio file format MP3.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_MP4", - "summary": "Audio file format MP4.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_MP4A", - "summary": "Audio file format MP4A.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FILEFORMAT_WAVE", - "summary": "Audio file format WAVE.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_AAC", - "summary": "Audio format MPEG4 AAC encoding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_ALAW", - "summary": "Audio format 8-bit [aLaw encoding](https://en.wikipedia.org/wiki/A-law_algorithm).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_APPLE_LOSSLESS", - "summary": "Audio format Apple lossless encoding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_ILBC", - "summary": "Audio format [iLBC encoding](https://en.wikipedia.org/wiki/Internet_Low_Bitrate_Codec).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_IMA4", - "summary": "Audio format Apple IMA4 encoding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_LINEAR_PCM", - "summary": "Audio format 16-bit, [linear PCM encoding](https://en.wikipedia.org/wiki/Pulse-code_modulation).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_FORMAT_ULAW", - "summary": "Audio format 8-bit [muLaw encoding](https://en.wikipedia.org/wiki/M-law_algorithm).", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_CATEGORY_AMBIENT", - "summary": "For long-duration sounds such as rain, car engine noise, and so on.", - "description": "Also used for for 'play along' style applications, such a virtual piano that a\nuser plays over iPod audio.\n\nSee also: [AUDIO_SESSION_CATEGORY_SOLO_AMBIENT](Titanium.Media.AUDIO_SESSION_CATEGORY_SOLO_AMBIENT).\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_CATEGORY_PLAYBACK", - "summary": "Session mode for playing recorded music or other sounds that are central to the successful use of your application.", - "description": "When using this mode, your application audio continues with the Ring/Silent switch set\nto silent or when the screen locks. This property normally disallows mixing iPod audio\nwith application audio.\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD", - "summary": "Session mode for recording (input) and playback (output) of audio, such as for a VOIP (voice over IP) application.", - "description": "This category is appropriate for simultaneous recording and playback, and also for\napplications that record and play back but not simultaneously. If you want to ensure\nthat sounds such as Messages alerts do not play while your application is recording,\nuse instead. This category normally\ndisallows mixing iPod audio with application audio.\n\nIn this mode, by default audio playback is routed to the speaker in the iPhone receiver. To have audio playback through the iPhone speaker, use .\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_CATEGORY_RECORD", - "summary": "Session mode for recording audio; it silences playback audio.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_CATEGORY_SOLO_AMBIENT", - "summary": "Session mode for long-duration sounds such as rain, car engine noise, and so on.", - "description": "When you use this category, audio from built-in applications, such as the iPod,\nis silenced. Your audio is silenced when the Ring/Silent switch is set to `silent`\nor when the screen locks.\n\nTo use long-duration sounds without silencing built-in applications,\nsee [AUDIO_SESSION_CATEGORY_AMBIENT](Titanium.Media.AUDIO_SESSION_CATEGORY_AMBIENT).\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_OVERRIDE_ROUTE_NONE", - "summary": "Constant that specifies audio should output to the default audio route. See for more information.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_OVERRIDE_ROUTE_SPEAKER", - "summary": "Constant that specifies audio should output to the speaker. See for more information.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_LINEIN", - "summary": "Constant for line level input on a dock connector. This is an input port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BUILTINMIC", - "summary": "Constant for built-in microphone on an iOS device. This is an input port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_HEADSETMIC", - "summary": "Constant for microphone on a wired headset. This is an input port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_LINEOUT", - "summary": "Constant for line level output on a dock connector. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_HEADPHONES", - "summary": "Constant for headphone or headset output. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BLUETOOTHA2DP", - "summary": "Constant for output on a Bluetooth A2DP device. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BUILTINRECEIVER", - "summary": "Constant for the speaker you hold to your ear when on a phone call. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BUILTINSPEAKER", - "summary": "Constant for built-in speaker on an iOS device. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_HDMI", - "summary": "Constant for output via High-Definition Multimedia Interface. This is an output port", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_AIRPLAY", - "summary": "Constant for output on a remote Air Play device. This is an output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BLUETOOTHHFP", - "summary": "Constant for input or output on a Bluetooth Hands-Free Profile device. This can be both an input and output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_USBAUDIO", - "summary": "Constant for input or output on a Universal Serial Bus device. This can be both an input and output port.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_BLUETOOTHLE", - "summary": "Constant for output on a Bluetooth Low Energy device. This is an output port. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_SESSION_PORT_CARAUDIO", - "summary": "Constant for Input or output via Car Audio. This can be both an input and output port. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_BUFFERING", - "summary": "Audio data is being buffered from the network.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_INITIALIZED", - "summary": "Audio playback is being initialized.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_PAUSED", - "summary": "Playback is paused.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_PLAYING", - "summary": "Audio playback is active.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_STARTING", - "summary": "Audio playback is starting.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_STOPPED", - "summary": "Audio playback is stopped.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_STOPPING", - "summary": "Audio playback is stopping.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_STATE_WAITING_FOR_DATA", - "summary": "Player is waiting for audio data from the network.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VERTICAL_ALIGN_CENTER", - "summary": "Vertical align center", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VERTICAL_ALIGN_TOP", - "summary": "Vertical align center", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VERTICAL_ALIGN_BOTTOM", - "summary": "Vertical align center", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ASPECT_RATIO_4_3", - "summary": "Aspect ratio 4:3", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ASPECT_RATIO_16_9", - "summary": "Aspect ratio 16:9", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_FLASH_AUTO", - "summary": "Constant specifying to have the device determine to use the flash or not.", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_FLASH_OFF", - "summary": "Constant specifying to never fire the flash.", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_FLASH_ON", - "summary": "Constant specifying to always fire the flash.", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_FRONT", - "summary": "Constant specifying the front camera.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_REAR", - "summary": "Constant indicating the rear camera.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_AUTHORIZATION_AUTHORIZED", - "summary": "Constant specifying that app is authorized to use camera. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_AUTHORIZATION_DENIED", - "summary": "Constant specifying that app is denied usage of camera. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_AUTHORIZATION_RESTRICTED", - "summary": "Constant specifying that app is restricted from using camera. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "4.0.0", - "name": "iphone" - }, - { - "since": "4.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CAMERA_AUTHORIZATION_UNKNOWN", - "summary": "Constant specifying that app is not yet authorized to use camera. This is available on iOS 7 and later.", - "platforms": [ - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DEVICE_BUSY", - "summary": "Constant for media device busy error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMAGE_SCALING_AUTO", - "summary": "Scales the image depending on how the view container is sized.", - "description": "If a [width](Titanium.UI.View.width) and [height](Titanium.UI.View.height) are both configured on the\nimage view, then it will use [IMAGE_SCALING_FILL](Titanium.Media.IMAGE_SCALING_FILL)\nto stretch the image disproportionally to fill the view. Otherwise it will use\n[IMAGE_SCALING_ASPECT_FIT](Titanium.Media.IMAGE_SCALING_ASPECT_FIT) to letterbox/pillarbox the image.\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "10.1.0", - "name": "iphone" - }, - { - "since": "10.1.0", - "name": "ipad" - }, - { - "since": "10.1.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMAGE_SCALING_NONE", - "summary": "Disables scaling and displays the image as-is.", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "10.1.0", - "name": "iphone" - }, - { - "since": "10.1.0", - "name": "ipad" - }, - { - "since": "10.1.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMAGE_SCALING_FILL", - "summary": "Stretches the image disproportionally to completely fill the container's bounds.", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "10.1.0", - "name": "iphone" - }, - { - "since": "10.1.0", - "name": "ipad" - }, - { - "since": "10.1.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMAGE_SCALING_ASPECT_FILL", - "summary": "Crops the image proportionally causing its content to be clipped either horizontally or vertically.", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "10.1.0", - "name": "iphone" - }, - { - "since": "10.1.0", - "name": "ipad" - }, - { - "since": "10.1.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "IMAGE_SCALING_ASPECT_FIT", - "summary": "Letterbox or pillarbox scales the image proportionally to fit the container.", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - }, - { - "since": "10.1.0", - "name": "iphone" - }, - { - "since": "10.1.0", - "name": "ipad" - }, - { - "since": "10.1.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MEDIA_TYPE_PHOTO", - "summary": "Media type constant for photo media.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.image" - }, - { - "name": "MEDIA_TYPE_LIVEPHOTO", - "summary": "Media type constant for live photo media.", - "platforms": [ - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "com.apple.live-photo" - }, - { - "name": "MEDIA_TYPE_VIDEO", - "summary": "Media type constant for video media.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only", - "value": "public.movie" - }, - { - "name": "MUSIC_MEDIA_TYPE_ALL", - "summary": "Music library media containing any type of content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_MEDIA_TYPE_ANY_AUDIO", - "summary": "Music library media containing any type of audio content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_MEDIA_TYPE_AUDIOBOOK", - "summary": "Music library media containing audiobook content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_MEDIA_TYPE_MUSIC", - "summary": "Music library media containing music content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_MEDIA_TYPE_PODCAST", - "summary": "Music library media containing podcast content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_MEDIA_GROUP_TITLE", - "summary": "Constant for grouping query results by title.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 0 - }, - { - "name": "MUSIC_MEDIA_GROUP_ALBUM", - "summary": "Constant for grouping query results by album.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 1 - }, - { - "name": "MUSIC_MEDIA_GROUP_ARTIST", - "summary": "Constant for grouping query results by artist.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 2 - }, - { - "name": "MUSIC_MEDIA_GROUP_ALBUM_ARTIST", - "summary": "Constant for grouping query results by album and artist.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 3 - }, - { - "name": "MUSIC_MEDIA_GROUP_COMPOSER", - "summary": "Constant for grouping query results by composer.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 4 - }, - { - "name": "MUSIC_MEDIA_GROUP_GENRE", - "summary": "Constant for grouping query results by genre.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 5 - }, - { - "name": "MUSIC_MEDIA_GROUP_PLAYLIST", - "summary": "Constant for grouping query results by playlist.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 6 - }, - { - "name": "MUSIC_MEDIA_GROUP_PODCAST_TITLE", - "summary": "Constant for grouping query results by podcast title.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "value": 7 - }, - { - "name": "MUSIC_PLAYER_REPEAT_ALL", - "summary": "Constant for \"Repeat All\" setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_REPEAT_DEFAULT", - "summary": "Constant for user's default repeat setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_REPEAT_NONE", - "summary": "Constant for \"No Repeat\" setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_REPEAT_ONE", - "summary": "Constant for \"Repeat one item\" setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_SHUFFLE_ALBUMS", - "summary": "Constant for shuffling complete albums setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_SHUFFLE_DEFAULT", - "summary": "Constant for user's default shuffle setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_SHUFFLE_NONE", - "summary": "Constant for \"no shuffle\" setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_SHUFFLE_SONGS", - "summary": "Constant for shuffling songs setting.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_INTERRUPTED", - "summary": "Constant for interrupted state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_PAUSED", - "summary": "Constant for paused state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_PLAYING", - "summary": "Constant for playing state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_SEEK_BACKWARD", - "summary": "Constant for backward seek state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_SEEK_FORWARD", - "summary": "Constant for forward seek state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MUSIC_PLAYER_STATE_STOPPED", - "summary": "Constant for stopped state.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NO_CAMERA", - "summary": "Constant for media no camera error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NO_VIDEO", - "summary": "Constant for media no video error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_SD", - "summary": "Media type constant for SD video recording.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_HD", - "summary": "Media type constant for HD video recording.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_FHD", - "summary": "Media type constant for FHD video recording.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_UHD", - "summary": "Media type constant for UHD video recording.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_HIGH", - "summary": "Media type constant for high-quality video recording.", - "description": "Recorded files are suitable for on-device playback and for wired transfer to the\nDesktop using Image Capture; they are likely to be too large for transfer using Wi-Fi.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_LOW", - "summary": "Media type constant for low-quality video recording.", - "description": "Recorded files can usually be transferred over the cellular network.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_MEDIUM", - "summary": "Media type constant for medium-quality video recording.", - "description": "Recorded files can usually be transferred using Wi-Fi. This is the default video\nquality setting.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_640x480", - "summary": "Media type constant for medium-quality video recording.", - "description": "If recording, specifies that you want to use VGA-quality video recording (pixel dimensions\nof 640x480).\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_IFRAME_1280x720", - "summary": "Media type constant for medium-quality video recording.", - "description": "If recording, specifies that you want to use 1280x720 iFrame format.", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "QUALITY_IFRAME_960x540", - "summary": "Media type constant for medium-quality video recording.", - "description": "If recording, specifies that you want to use 960x540 iFrame format.", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "UNKNOWN_ERROR", - "summary": "Constant for unknown media error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NO_FOCUS", - "summary": "Constant for camera didn't focus when taking a trying to take a picture.", - "platforms": [ - { - "since": "12.2.1", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_CONTROL_DEFAULT", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Constant for default video controls.", - "description": "Used in conjunction with the\n[mediaControlStyle](Titanium.Media.VideoPlayer.mediaControlStyle) property\nof [Titanium.Media.VideoPlayer](Titanium.Media.VideoPlayer).\n\nRemoved on iOS in SDK 7.0.0.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_CONTROL_EMBEDDED", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Constant for video controls for an embedded view.", - "description": "Used in conjunction with the\n[mediaControlStyle](Titanium.Media.VideoPlayer.mediaControlStyle) property\nof [Titanium.Media.VideoPlayer](Titanium.Media.VideoPlayer).\n\nOn Android, this constant has the same effect as VIDEO_CONTROL_DEFAULT. Video controls may\nonly be shown or hidden.\n\nRemoved on iOS in SDK 7.0.0.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_CONTROL_FULLSCREEN", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Constant for fullscreen video controls.", - "description": "Used in conjunction with the\n[mediaControlStyle](Titanium.Media.VideoPlayer.mediaControlStyle) property\nof [Titanium.Media.VideoPlayer](Titanium.Media.VideoPlayer).\n\nOn iOS, use VIDEO_CONTROL_FULLSCREEN when creating a video player that occupies the entire\nscreen, that is, the parent window should be a fullscreen window\n([fullscreen](Titanium.UI.Window.fullscreen) set to `true`) and the video player should\noccupy the entirety of the parent window.\n\nIf the user clicks the **Done** button in the fullscreen control bar, the video player\npauses playback and generates a [complete](Titanium.Media.VideoPlayer.complete) event.\n\nNote that if you create a video player that does *not* occupy the entire screen, and later\nswitch to fullscreen mode, the video controls are switched automatically. That is, if\n`mediaControlStyle` is set to VIDEO_CONTROL_DEFAULT or VIDEO_CONTROL_EMBEDDED, it is\nautomatically switched to the fullscreen controls when the player enters fullscreen mode.\nThis is true whether the user initiates the mode switch by clicking the fullscreen button\nin the embedded controls, or if you programmatically switch to full screen mode (by setting\nthe `fullscreen` property to true).\n\nOn Android, this constant has the same effect as VIDEO_CONTROL_DEFAULT. Video controls may\nonly be shown or hidden.\n\nRemoved on iOS in SDK 7.0.0.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_CONTROL_HIDDEN", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Constant for video controls hidden.", - "description": "Used in conjunction with the\n[mediaControlStyle](Titanium.Media.VideoPlayer.mediaControlStyle) property\nof .\n\nRemoved on iOS in SDK 7.0.0.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_CONTROL_NONE", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Constant for no video controls.", - "description": "Used in conjunction with the\n[mediaControlStyle](Titanium.Media.VideoPlayer.mediaControlStyle) property\nof .\n\nRemoved on iOS in SDK 7.0.0.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_FINISH_REASON_PLAYBACK_ENDED", - "summary": "Video playback ended normally.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_FINISH_REASON_PLAYBACK_ERROR", - "summary": "Video playback ended abnormally.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_FINISH_REASON_USER_EXITED", - "summary": "Video playback ended by user action (such as clicking the `Done` button).", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_LOAD_STATE_FAILED", - "summary": "Indicates that the player can no longer play media items because of an error.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_LOAD_STATE_PLAYABLE", - "summary": "Current media is playable.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_LOAD_STATE_UNKNOWN", - "summary": "Current load state is not known.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_AUDIO", - "summary": "The media contains audio media.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_CLOSED_CAPTION", - "summary": "The media contains closed-caption content.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_DEPTH_DATA", - "summary": "The media contains depth data.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_METADATA", - "summary": "The media contains metadata.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_METADATA_OBJECT", - "summary": "The media contains metadata objects.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_MUXED", - "summary": "The media contains muxed media.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_SUBTITLE", - "summary": "The media contains subtitles.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_TEXT", - "summary": "The media contains text.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_TIMECODE", - "summary": "The media contains a time code.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_MEDIA_TYPE_VIDEO", - "summary": "The media contains video.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_INTERRUPTED", - "summary": "Video playback has been interrupted.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_PAUSED", - "summary": "Video playback is paused.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_PLAYING", - "summary": "Video is being played.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD", - "summary": "Video playback is rewinding.", - "description": "This constant has been removed on iOS in SDK 7.0.0 by using the official Apple AVPlayer that does not expose this functionality so far.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_SEEKING_FORWARD", - "summary": "Video playback is seeking forward.", - "description": "This constant has been removed on iOS in SDK 7.0.0 by using the official Apple AVPlayer that does not expose this functionality so far.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_PLAYBACK_STATE_STOPPED", - "summary": "Video playback is stopped.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_REPEAT_MODE_NONE", - "summary": "Constant for disabling repeat on video playback.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_REPEAT_MODE_ONE", - "summary": "Constant for repeating one video (e.g., the one video will repeat constantly) during playback.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9.0", - "name": "iphone" - }, - { - "since": "0.9.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_ASPECT_FILL", - "deprecated": { - "notes": "Use instead.\n\nThis property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.\n", - "since": "7.0.0" - }, - "summary": "Scale video to fill the screen, clipping edges if necessary.", - "description": "Video is scaled until the video fills the entire screen. Content at the edges\nof the larger of the two dimensions is clipped so that the other dimension fits the\nscreen exactly. The aspect ratio of the movie is preserved.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_ASPECT_FIT", - "deprecated": { - "notes": "Use instead.\n\nThis property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.\n", - "since": "7.0.0" - }, - "summary": "Scale video to fit the screen, letterboxing if necessary.", - "description": "Video is scaled until the larger dimension fits on the screen exactly. In the\nother dimension, the region between the edge of the movie and the edge of the screen\nis filled with a black bar. The aspect ratio of the movie is preserved.\n\nThis constant was removed on iOS in SDK 7.0.0\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_MODE_FILL", - "deprecated": { - "notes": "Use instead.\n\nThis property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.\n", - "since": "7.0.0" - }, - "summary": "Video is scaled until both dimensions fit the screen exactly, stretching if necessary.", - "description": "This constant was removed on iOS in SDK 7.0.0", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_NONE", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Video scaling is disabled.", - "description": "This constant was removed on iOS in SDK 7.0.0", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_RESIZE", - "summary": "Specifies that the video should be stretched to fill the bounds of layer.", - "description": "This is a `String` on iOS, a `Number` on Android.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number" - ], - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_RESIZE_ASPECT", - "summary": "Specifies that the player should preserve the aspect ratio of video and fit the video within the bounds of layer.", - "description": "This is a `String` on iOS, a `Number` on Android.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number" - ], - "permission": "read-only" - }, - { - "name": "VIDEO_SCALING_RESIZE_ASPECT_FILL", - "summary": "Specifies that the player should preserve the aspect ratio of video and fill the bounds of layer.", - "description": "This is a `String` on iOS, a `Number` on Android.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number" - ], - "permission": "read-only" - }, - { - "name": "VIDEO_TIME_OPTION_EXACT", - "summary": "Use the exact time.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_TIME_OPTION_NEAREST_KEYFRAME", - "summary": "Use the closest keyframe in the time.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_TIME_OPTION_CLOSEST_SYNC", - "summary": "Use the closest sync (or key) frame at given the time.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_TIME_OPTION_NEXT_SYNC", - "summary": "Use the sync (or key) frame located right after or at given the time.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "VIDEO_TIME_OPTION_PREVIOUS_SYNC", - "summary": "Use the sync (or key) frame located right before or at given the time.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "appMusicPlayer", - "summary": "An instance of representing the app-specific music player.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Media.MusicPlayer", - "permission": "read-only" - }, - { - "name": "audioPlaying", - "summary": "Returns `true` if the device is playing audio.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "audioSessionCategory", - "summary": "A constant for the audio session category to be used.", - "description": "Set to one of the `AUDIO_SESSION_CATEGORY` constants defined in .\n\nMust be set while the audio session is inactive (no sounds are playing, no listeners\nfor audio properties on the Media module, but the iPod may be active).\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "constants": [ - "Titanium.Media.AUDIO_SESSION_CATEGORY_AMBIENT", - "Titanium.Media.AUDIO_SESSION_CATEGORY_PLAYBACK", - "Titanium.Media.AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD", - "Titanium.Media.AUDIO_SESSION_CATEGORY_RECORD", - "Titanium.Media.AUDIO_SESSION_CATEGORY_SOLO_AMBIENT" - ] - }, - { - "name": "availableCameras", - "summary": "Array indicating which cameras are available, `CAMERA_FRONT`, `CAMERA_REAR` or both.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only", - "constants": [ - "Titanium.Media.CAMERA_FRONT", - "Titanium.Media.CAMERA_REAR" - ] - }, - { - "name": "aspectRatio", - "summary": "Aspect ratio of the image.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "Titanium.Media.ASPECT_RATIO_4_3", - "permission": "read-only", - "constants": [ - "Titanium.Media.ASPECT_RATIO_4_3", - "Titanium.Media.ASPECT_RATIO_16_9" - ] - }, - { - "name": "scalingMode", - "summary": "Scaling mode of the preview image.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "Titanium.Media.IMAGE_SCALING_ASPECT_FILL", - "permission": "read-only", - "constants": [ - "Titanium.Media.IMAGE_SCALING_ASPECT_FIT", - "Titanium.Media.IMAGE_SCALING_ASPECT_FILL" - ] - }, - { - "name": "verticalAlign", - "summary": "Vertical align of the preview image for aspect fit.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "Titanium.Media.VERTICAL_ALIGN_CENTER", - "permission": "read-only", - "constants": [ - "Titanium.Media.VERTICAL_ALIGN_CENTER", - "Titanium.Media.VERTICAL_ALIGN_TOP", - "Titanium.Media.VERTICAL_ALIGN_BOTTOM" - ] - }, - { - "name": "useCameraX", - "summary": "To use the new CameraX classes for \"camera with overlay\" set `useCameraX` to `true`", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false, - "permission": "read-only" - }, - { - "name": "availableCameraMediaTypes", - "summary": "Array of media type constants supported for the camera.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Media.MEDIA_TYPE_PHOTO", - "Titanium.Media.MEDIA_TYPE_LIVEPHOTO", - "Titanium.Media.MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "availablePhotoGalleryMediaTypes", - "summary": "Array of media type constants supported for saving to the device's camera roll or saved images album.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Media.MEDIA_TYPE_PHOTO", - "Titanium.Media.MEDIA_TYPE_LIVEPHOTO", - "Titanium.Media.MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "availablePhotoMediaTypes", - "summary": "Array of media type constants supported for the photo library.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Media.MEDIA_TYPE_PHOTO", - "Titanium.Media.MEDIA_TYPE_LIVEPHOTO", - "Titanium.Media.MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "averageMicrophonePower", - "summary": "Current average microphone level in dB or -1 if microphone monitoring is disabled.", - "description": "See [startMicrophoneMonitor](Titanium.Media.startMicrophoneMonitor),\n[stopMicrophoneMonitor](Titanium.Media.stopMicrophoneMonitor).\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "cameraFlashMode", - "summary": "Determines how the flash is fired when using the device's camera.", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": " on iOS, on Android", - "constants": [ - "Titanium.Media.CAMERA_FLASH_AUTO", - "Titanium.Media.CAMERA_FLASH_OFF", - "Titanium.Media.CAMERA_FLASH_ON" - ] - }, - { - "name": "canRecord", - "summary": "`true` if the device has a recording input device available.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "currentRoute", - "summary": "Returns a description of the current route, consisting of zero or more input ports and zero or more output ports.\n", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "RouteDescription", - "permission": "read-only" - }, - { - "name": "isCameraSupported", - "summary": "`true` if the device has camera support.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "cameraAuthorization", - "summary": "Returns the authorization status for the camera.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.CAMERA_AUTHORIZATION_AUTHORIZED", - "Titanium.Media.CAMERA_AUTHORIZATION_DENIED", - "Titanium.Media.CAMERA_AUTHORIZATION_RESTRICTED", - "Titanium.Media.CAMERA_AUTHORIZATION_UNKNOWN" - ] - }, - { - "name": "cameraOutputSizes", - "summary": "Returns an object of possible `targetImageWidth` and `targetImageHeight` values. The output\ncontains a `cameraType` (front or back) and object of width/height values. You have to set\n`targetImageWidth` and `targetImageHeight` if you want to change the camera image output size.\nNote: depending on your phone and camera the values won't be used or can be different.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Object", - "permission": "read-only" - }, - { - "name": "maxZoomLevel", - "summary": "Returns the max zoom level of the camera.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "minZoomLevel", - "summary": "Returns the min zoom level of the camera.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "peakMicrophonePower", - "summary": "Current microphone level peak power in dB or -1 if microphone monitoring is disabled.", - "description": "See [startMicrophoneMonitor](Titanium.Media.startMicrophoneMonitor),\n[stopMicrophoneMonitor](Titanium.Media.stopMicrophoneMonitor).\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "systemMusicPlayer", - "summary": "An instance of representing the system-wide music player.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Media.MusicPlayer", - "permission": "read-only" - }, - { - "name": "volume", - "summary": "Current volume of the playback device.", - "description": "A value in the range `0.0` to `1.0`, with `0.0` representing the minimum volume and `1.0` representing the maximum volume.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "torch", - "summary": "Enable or disable the camera torch.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "zoomLevel", - "summary": "Sets the zoom level of the camera.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number" - } - ] - }, - "MusicLibraryOptionsType": { - "name": "MusicLibraryOptionsType", - "summary": "Simple object for specifying options to [openMusicLibrary](Titanium.Media.openMusicLibrary).", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Function to call when the music library selection is made.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "error", - "summary": "Function to call upon receiving an error.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "cancel", - "summary": "Function to call if the user presses the cancel button.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "autohide", - "summary": "Specifies that the library should be hidden automatically after media selection is completed.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "animated", - "summary": "Boolean if the dialog should be animated when showing and hiding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "mediaTypes", - "summary": "An array of media type constants defining selectable media.", - "description": "Specify one or more of the `MUSIC_MEDIA_TYPE` constants from . To\nspecify multiple types, either pass an array of values, or pass a\nsingle value that represents the bitwise-OR of the desired media types. For example,\nthe following values are equivalent:\n\n``` js\nmediaTypes: [Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC, Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST]\n```\n\nOr:\n``` js\nmediaTypes: Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC|Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "Array" - ], - "default": "All available types.", - "constants": [ - "Titanium.Media.MUSIC_MEDIA_TYPE_ALL", - "Titanium.Media.MUSIC_MEDIA_TYPE_ANY_AUDIO", - "Titanium.Media.MUSIC_MEDIA_TYPE_AUDIOBOOK", - "Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC", - "Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST" - ] - }, - { - "name": "allowMultipleSelections", - "summary": "Set to `true` to allow the user to select multiple items from the library.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - } - ] - }, - "MusicLibraryResponseType": { - "name": "MusicLibraryResponseType", - "summary": "Simple object passed to the [openMusicLibrary](Titanium.Media.openMusicLibrary)\n`success` callback function.\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "representative", - "summary": "A single representative of the selected items.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Media.Item" - }, - { - "name": "items", - "summary": "A list of all the items chosen by the user.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - }, - { - "name": "types", - "summary": "Media types in this collection, represented as the bitwise OR of the media type\nvalues for all media types represented in `items`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "MediaQueryType": { - "name": "MediaQueryType", - "summary": "A specifier for a media library query. By default, filters perform an exact match.", - "extends": "Object", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "grouping", - "summary": "A constant that specifies the ordering of the result array.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.MUSIC_MEDIA_GROUP_TITLE", - "Titanium.Media.MUSIC_MEDIA_GROUP_ALBUM", - "Titanium.Media.MUSIC_MEDIA_GROUP_ARTIST", - "Titanium.Media.MUSIC_MEDIA_GROUP_ALBUM_ARTIST", - "Titanium.Media.MUSIC_MEDIA_GROUP_COMPOSER", - "Titanium.Media.MUSIC_MEDIA_GROUP_GENRE", - "Titanium.Media.MUSIC_MEDIA_GROUP_PLAYLIST", - "Titanium.Media.MUSIC_MEDIA_GROUP_PODCAST_TITLE" - ] - }, - { - "name": "mediaType", - "summary": "The media type to filter on.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ], - "constants": [ - "Titanium.Media.MUSIC_MEDIA_TYPE_ALL", - "Titanium.Media.MUSIC_MEDIA_TYPE_ANY_AUDIO", - "Titanium.Media.MUSIC_MEDIA_TYPE_AUDIOBOOK", - "Titanium.Media.MUSIC_MEDIA_TYPE_MUSIC", - "Titanium.Media.MUSIC_MEDIA_TYPE_PODCAST" - ] - }, - { - "name": "title", - "summary": "The title to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "albumTitle", - "summary": "The album title to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "artist", - "summary": "The artist to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "albumArtist", - "summary": "The album artist to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "genre", - "summary": "The genre to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "composer", - "summary": "The composer to filter on. Value should be a String.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "isCompilation", - "summary": "Filter by whether or not the item is a compilation.\nThe value should be a Boolean.\n", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Boolean" - ] - }, - { - "name": "playCount", - "summary": "The play count to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "persistentID", - "summary": "The persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "albumPersistentID", - "summary": "The album persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "albumArtistPersistentID", - "summary": "The album artist persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "genrePersistentID", - "summary": "The genre persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "composerPersistentID", - "summary": "The composer persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - }, - { - "name": "isCloudItem", - "summary": "Filter by whether or not the item is a cloud item.\nValue should be a Boolean.\n", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Boolean" - ] - }, - { - "name": "hasProtectedAsset", - "summary": "Filter by whether or not the item is a protected asset.\nValue should be a Boolean.\n", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Boolean" - ] - }, - { - "name": "podcastTitle", - "summary": "The podcast title to filter on. Value should be a String.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "String" - ] - }, - { - "name": "podcastPersistentID", - "summary": "The podcast persistent ID to filter on. Value should be a Number.", - "description": "Available in Titanium SDK 6.1.0 and later.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "MediaQueryInfoType", - "Number" - ] - } - ] - }, - "MediaQueryInfoType": { - "name": "MediaQueryInfoType", - "summary": "A full query descriptor for a filtering predicate.", - "extends": "Object", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "value", - "summary": "The value for the given predicate. See the descriptions in for information about which properties require which values.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String", - "Boolean" - ] - }, - { - "name": "exact", - "summary": "Whether or not the predicate is for an exact match. The default is `true`.", - "platforms": [ - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - } - ] - }, - "CameraOptionsType": { - "name": "CameraOptionsType", - "summary": "Simple object for specifying options to [showCamera](Titanium.Media.showCamera).", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Function to call when the camera is closed after a successful capture/selection.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "open", - "summary": "Function to call when the camera is shown", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "error", - "summary": "Function to call upon receiving an error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "cancel", - "summary": "Function to call if the user presses the cancel button.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "recording", - "summary": "Function to call during recording. Returns size and duration.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "androidback", - "summary": "Function to call if the user presses the back button.", - "description": "On Android, this property is considered only if `overlay` is also set. If the user presses\nthe back button on the phone this callback function will be called. The camera view stays\nopen and you will need to call `Ti.Media.hideCamera();` if you want to close it.\n", - "platforms": [ - { - "since": "9.0.0", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "autohide", - "summary": "Specifies if the camera should be hidden automatically after the media capture is completed.", - "description": "On Android, this property is considered only if `overlay` is also set. When an\noverlay is not set, the default Android Camera Activity is used, which is only\ncapable of reporting back the results of one taken photo, making `autohide`\nmeaningless in that context.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "animated", - "summary": "Specifies if the dialog should be animated upon showing and hiding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "saveToPhotoGallery", - "summary": "Specifies if the media should be saved to the photo gallery upon successful capture.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "allowEditing", - "summary": "Specifies if the media should be editable after capture/selection.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "zoomEnabled", - "summary": "Specifies if pinch to zoom is enabled or not.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "targetImageWidth", - "summary": "Maximum width of the saved image. Depending on your phone and your value this might not be\nexactly the value you specify. Check `Ti.Media.cameraOutputSizes` first.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "default": false - }, - { - "name": "targetImageHeight", - "summary": "Maximum height of the saved image. Depending on your phone and your value this might not be\nexactly the value you specify. Check `Ti.Media.cameraOutputSizes` first.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "default": false - }, - { - "name": "mediaTypes", - "summary": "Array of media type constants to allow. Note: If you want to select live photos, iOS only allows\nyou to select existing live photos from the gallery, capturing new live photos is not supported by\niOS public API, yet.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "default": "Both photo and video allowed.", - "constants": [ - "Titanium.Media.MEDIA_TYPE_PHOTO", - "Titanium.Media.MEDIA_TYPE_LIVEPHOTO", - "Titanium.Media.MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "videoMaximumDuration", - "summary": "Maximum duration (in milliseconds) to allow video capture before completing.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "videoQuality", - "summary": "Constant to indicate the video quality during capture.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.QUALITY_SD", - "Titanium.Media.QUALITY_HD", - "Titanium.Media.QUALITY_FHD", - "Titanium.Media.QUALITY_UHD", - "Titanium.Media.QUALITY_HIGH", - "Titanium.Media.QUALITY_LOW", - "Titanium.Media.QUALITY_MEDIUM" - ] - }, - { - "name": "whichCamera", - "summary": "Opens the camera with the specified camera direction.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.CAMERA_FRONT", - "Titanium.Media.CAMERA_REAR" - ] - }, - { - "name": "showControls", - "summary": "Indicates if the built-in camera controls should be displayed.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "overlay", - "summary": "View to added as an overlay to the camera UI (on top).", - "description": "On iOS, the overlay view is usually used in conjunction with `showControls: false`.\nThe `transform` property can be used to scale and position the camera preview inside\nthe overlay view.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View", - "default": "no overlay view" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the camera or photogallery view.", - "description": "Can be used to size and position the camera or photogallery view behind an overlay view.\niOS 10 note: There was a [known iOS 10 issue](http://openradar.appspot.com/28232651) caused by Apple\nthat breaks the native camera transformation. Apple fixed this issue in the iOS 10.2 release.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.Matrix2D", - "default": "identity matrix" - }, - { - "name": "inPopOver", - "summary": "Show the camera in a popover.", - "description": "Use `inPopOver: true` on iPad to display the camera view in a popover.\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "popoverView", - "summary": "View to position the camera or photo gallery popover on top of.", - "description": "This property is only used if the camera is displayed in a\npopover (`inPopOver` is `true`).\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "arrowDirection", - "summary": "Controls the type of arrow and position of the popover.", - "description": "This property is only used if the camera is displayed in a\npopover (`inPopOver` is `true`).\n", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_ANY", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_DOWN", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UNKNOWN", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UP" - ] - }, - { - "name": "autorotate", - "summary": "Determines if the camera preview should rotate or not.", - "description": "Set to `false` to disable rotating the camera preview. The camera preview will remain\nin the same orientation it was opened in.\n\nSet to `true` to allow the camera preview to rotate when the device rotates.\nBlack bars will appear and disappear as the device is rotated.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - } - ] - }, - "PhotoGalleryOptionsType": { - "name": "PhotoGalleryOptionsType", - "summary": "Simple object for specifying options to\n[openPhotoGallery](Titanium.Media.openPhotoGallery).\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Function to call when the photo gallery is closed after a successful selection.", - "description": "If is `true`, then Callback will be invoked.\nOtherwise Callback will be invoked for single selection.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Callback", - "Callback" - ] - }, - { - "name": "error", - "summary": "Function to call upon receiving an error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "cancel", - "summary": "Function to call if the user presses the cancel button.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "autohide", - "summary": "Specifies if the photo gallery should be hidden automatically after the media\nselection is completed.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "animated", - "summary": "Specifies if the dialog should be animated upon showing and hiding.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "allowEditing", - "summary": "Specifies if the media should be editable after capture/selection.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "mediaTypes", - "summary": "Array of media type constants to allow.\n\nLive photos is only supported on the iOS platform, starting with iOS 9.1. If you want\nto allow live photos with , you also need to specify\nat least as a fallback. If you do not allow live\nphotos, they still can be selected, but will be represented as a normal static photo.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "default": "Only photo and video allowed.", - "constants": [ - "Titanium.Media.MEDIA_TYPE_PHOTO", - "Titanium.Media.MEDIA_TYPE_LIVEPHOTO", - "Titanium.Media.MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "popoverView", - "summary": "View to position the photo gallery popover on top of.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "arrowDirection", - "summary": "Controls the type of arrow and position of the popover.", - "platforms": [ - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_ANY", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_DOWN", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_LEFT", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_RIGHT", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UNKNOWN", - "Titanium.UI.iPad.POPOVER_ARROW_DIRECTION_UP" - ] - }, - { - "name": "allowMultiple", - "summary": "Specifies if the user should be able to select multiple photos.", - "description": "The allowMultiple property is only available on Android API 18 and above.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Boolean" - }, - { - "name": "maxImages", - "summary": "Specifies the number of images a user can select at maximum.", - "description": "Only available on Android API 21 and above and with `allowMultiple:true`\n", - "platforms": [ - { - "since": "12.5.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "pathOnly", - "summary": "Do not include the blob in the result", - "platforms": [ - { - "since": "12.5.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "selectionLimit", - "summary": "Specifies number of media item that can be selected.", - "description": "Setting this property to zero allows you to select maximum number of media supported by system.\nThis will work only when is `true`.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Boolean" - }, - { - "name": "allowTranscoding", - "summary": "Specifies if the video should be transcoded (using highest quality preset) . If set to false no video transcoding will be performed.", - "platforms": [ - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - } - ] - }, - "CameraMediaMultipleItemsType": { - "name": "CameraMediaMultipleItemsType", - "summary": "A media object from photo gallery when is `true`.", - "extends": "SuccessResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `true`.", - "description": "Returns `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "SuccessResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "SuccessResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0.", - "description": "Error code will be 0.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "SuccessResponse", - "type": "Number" - }, - { - "name": "images", - "summary": "The list of selected images.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "optional": true - }, - { - "name": "livePhotos", - "summary": "The list of selected live photo objects.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - } - ], - "type": "Array", - "optional": true - }, - { - "name": "videos", - "summary": "The list of selected videos.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "optional": true - } - ] - }, - "CameraMediaItemType": { - "name": "CameraMediaItemType", - "summary": "A media object from the camera or photo gallery.", - "extends": "SuccessResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `true`.", - "description": "Returns `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0.", - "description": "Error code will be 0.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "media", - "summary": "The media object, as a [Blob](Titanium.Blob).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob" - }, - { - "name": "path", - "summary": "The path of the image when returning data from the gallery.", - "platforms": [ - { - "since": "12.5.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "mediaType", - "summary": "The type of media, either `MEDIA_TYPE_PHOTO`, `MEDIA_TYPE_LIVEPHOTO` or `MEDIA_TYPE_VIDEO` defined in .", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "cropRect", - "summary": "Simple object defining the user's selected crop rectangle, or `null` if the user has not edited the photo. `width`/`height` values are assumed to be in pixels.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dimension", - "optional": true - }, - { - "name": "previewRect", - "summary": "Simple object defining the preview image size. This will be undefined when custom camera overlay is not used. Values are assumed to be in pixels.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Size" - }, - { - "name": "livePhoto", - "summary": "The live photo object, as a and\n`undefined` if no live photo is selected.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - }, - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.iOS.LivePhoto" - } - ] - }, - "CameraOpen": { - "name": "CameraOpen", - "summary": "Parameters of the open callback", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "width", - "summary": "Width of the preview camera image", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "height", - "summary": "Height of the preview camera image", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number" - } - ] - }, - "PreviewImageOptions": { - "name": "PreviewImageOptions", - "summary": "Options passed to .", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "image", - "summary": "The image to preview. Must be a blob based on a file, such as from .", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Titanium.Blob" - }, - { - "name": "success", - "summary": "Function to be called back if the preview succeeds. No info is passed.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Callback" - }, - { - "name": "error", - "summary": "Function called back if the preview fails. Check the `message` property of passed back parameter.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Callback" - } - ] - }, - "PreviewImageError": { - "name": "PreviewImageError", - "summary": "The parameter passed to the `error` callback of .", - "extends": "FailureResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `false`.", - "description": "Returns `false`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "May be undefined.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code, if applicable.", - "description": "If the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.DEVICE_BUSY", - "Titanium.Media.NO_CAMERA", - "Titanium.Media.UNKNOWN_ERROR", - "Titanium.Media.NO_FOCUS" - ] - }, - { - "name": "message", - "deprecated": { - "notes": "Use `error` property instead", - "since": "3.1.0", - "removed": "10.0.0" - }, - "summary": "Description of the error.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String" - } - ] - }, - "ScreenshotResult": { - "name": "ScreenshotResult", - "summary": "The parameter passed to the callback.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "media", - "summary": "The screenshot image.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob" - } - ] - }, - "MediaAuthorizationResponse": { - "name": "MediaAuthorizationResponse", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "RequestCameraAccessResult": { - "name": "RequestCameraAccessResult", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "RequestMusicLibraryAccessResult": { - "name": "RequestMusicLibraryAccessResult", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "RequestPhotoGalleryAccessResult": { - "name": "RequestPhotoGalleryAccessResult", - "summary": "Argument passed to the callback when a request finishes successfully or erroneously.", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - } - ] - }, - "RouteDescription": { - "name": "RouteDescription", - "summary": "An Object describing the current audio route.", - "extends": "Object", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "inputs", - "summary": "An Array of current input ports for the session. See the `AUDIO_SESSION_PORT` constants.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Media.AUDIO_SESSION_PORT_LINEIN", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINMIC", - "Titanium.Media.AUDIO_SESSION_PORT_HEADSETMIC", - "Titanium.Media.AUDIO_SESSION_PORT_LINEOUT", - "Titanium.Media.AUDIO_SESSION_PORT_HEADPHONES", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHA2DP", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINRECEIVER", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINSPEAKER", - "Titanium.Media.AUDIO_SESSION_PORT_HDMI", - "Titanium.Media.AUDIO_SESSION_PORT_AIRPLAY", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHHFP", - "Titanium.Media.AUDIO_SESSION_PORT_USBAUDIO", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHLE", - "Titanium.Media.AUDIO_SESSION_PORT_CARAUDIO" - ] - }, - { - "name": "outputs", - "summary": "An Array of current output ports for the session. See the `AUDIO_SESSION_PORT` constants.", - "platforms": [ - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Media.AUDIO_SESSION_PORT_LINEIN", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINMIC", - "Titanium.Media.AUDIO_SESSION_PORT_HEADSETMIC", - "Titanium.Media.AUDIO_SESSION_PORT_LINEOUT", - "Titanium.Media.AUDIO_SESSION_PORT_HEADPHONES", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHA2DP", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINRECEIVER", - "Titanium.Media.AUDIO_SESSION_PORT_BUILTINSPEAKER", - "Titanium.Media.AUDIO_SESSION_PORT_HDMI", - "Titanium.Media.AUDIO_SESSION_PORT_AIRPLAY", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHHFP", - "Titanium.Media.AUDIO_SESSION_PORT_USBAUDIO", - "Titanium.Media.AUDIO_SESSION_PORT_BLUETOOTHLE", - "Titanium.Media.AUDIO_SESSION_PORT_CARAUDIO" - ] - } - ] - }, - "CameraRecordingCallback": { - "name": "CameraRecordingCallback", - "summary": "Infos about the current video recording", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Media.yml", - "properties": [ - { - "name": "duration", - "summary": "Length in milliseconds", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "size", - "summary": "Size of the video in bytes", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Media.MusicPlayer": { - "name": "Titanium.Media.MusicPlayer", - "summary": "This object represents a music controller.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/MusicPlayer.yml", - "description": "A `MusicPlayer` lets you manage and playback a queue of media [Item](Titanium.Media.Item) objects.\n\nTo retrieve an instance of a MusicPlayer object, use either the\n or the property.\n\nUse the [Media](Titanium.Media) module's [openMusicLibrary](Titanium.Media.openMusicLibrary) and\n[queryMusicLibrary](Titanium.Media.queryMusicLibrary) methods to access the media items in the\ndevice's media library.\n", - "events": [ - { - "name": "playingchange", - "summary": "Fired when the currently playing media item changes.", - "description": "See [nowPlaying](Titanium.Media.MusicPlayer.nowPlaying) to identify the current\nmedia item.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "statechange", - "summary": "Fired when the music player's playback state changes.", - "description": "See [playbackState](Titanium.Media.MusicPlayer.playbackState) to identify the current\nplayback state.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "pause", - "summary": "Pauses playback of the current media item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "play", - "summary": "Begins playback of the current media item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "seekBackward", - "summary": "Begins seeking backward in the currently playing media.", - "description": "Seeking speed increases as seeking continues.\n\nCall [stopSeeking](Titanium.Media.MusicPlayer.stopSeeking) to\nreturn to normal play.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "seekForward", - "summary": "Begins seeking forward in the currently playing media item.", - "description": "While seeking forward audio plays faster than usual. The speed increases as\nseeking continues.\n\nCall [stopSeeking](Titanium.Media.MusicPlayer.stopSeeking) to\nreturn to normal play.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setQueue", - "summary": "Sets the media queue.", - "description": "Sets the media queue to a single media item or a list of items. \n\nStarting in Titanium 6.1.0 you can also pass a String that identifies \nthe Media item. This string has to be the \nproperty that identifies a media item uniquely.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "queue", - "summary": "One or more media items.", - "type": [ - "Titanium.Media.Item", - "Array", - "String" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "skipToBeginning", - "summary": "Skips to the beginning of the currently playing media item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "skipToNext", - "summary": "Skips to the next media item in the queue.", - "description": "If there are no more media items in the queue, ends playback.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "skipToPrevious", - "summary": "Skips to the previous media item in the queue.", - "description": "If there are no previous media items in the queue, ends playback.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops playback of the current media queue.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopSeeking", - "summary": "Ends a seek operation and returns to the previous playback state.\n\nSee also: [seekForward](Titanium.Media.MusicPlayer.seekForward) and\n[seekBackward](Titanium.Media.MusicPlayer.seekBackward).\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "currentPlaybackTime", - "summary": "Current point in song playback, in seconds.", - "description": "This property is read/write, so you can update the music player's current position\nby setting this property.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "nowPlaying", - "summary": "An `Item` object representing the currently playing media item.", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Media.Item", - "permission": "read-only" - }, - { - "name": "playbackState", - "summary": "Playback state.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.MUSIC_PLAYER_STATE_INTERRUPTED", - "Titanium.Media.MUSIC_PLAYER_STATE_PAUSED", - "Titanium.Media.MUSIC_PLAYER_STATE_PLAYING", - "Titanium.Media.MUSIC_PLAYER_STATE_SEEK_BACKWARD", - "Titanium.Media.MUSIC_PLAYER_STATE_SEEK_FORWARD", - "Titanium.Media.MUSIC_PLAYER_STATE_STOPPED" - ] - }, - { - "name": "repeatMode", - "summary": "Repeat setting.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.MUSIC_PLAYER_REPEAT_ALL", - "Titanium.Media.MUSIC_PLAYER_REPEAT_DEFAULT", - "Titanium.Media.MUSIC_PLAYER_REPEAT_NONE", - "Titanium.Media.MUSIC_PLAYER_REPEAT_ONE" - ] - }, - { - "name": "shuffleMode", - "summary": "Shuffle setting.\n", - "platforms": [ - { - "since": "1.4.0", - "name": "iphone" - }, - { - "since": "1.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Media.MUSIC_PLAYER_SHUFFLE_ALBUMS", - "Titanium.Media.MUSIC_PLAYER_SHUFFLE_DEFAULT", - "Titanium.Media.MUSIC_PLAYER_SHUFFLE_NONE", - "Titanium.Media.MUSIC_PLAYER_SHUFFLE_SONGS" - ] - } - ], - "subtype": "proxy" - }, - "Titanium.Media.Sound": { - "name": "Titanium.Media.Sound", - "summary": "An object for playing basic audio resources.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/Sound.yml", - "description": "The `Sound` object loads the entire media resource in memory before playing. If you need to \nsupport streaming, use the [AudioPlayer](Titanium.Media.AudioPlayer) API.\n\nYou can control how the sound interacts with other system sounds\nby setting .\n\nUse the method to create a `Sound` object. You can play audio \nin any format supported by the target platform(s), as described in the following documents:\n\n* [Android](https://developer.android.com/guide/topics/media/media-formats#core)\n* [iOS](https://developer.apple.com/audio/)\n", - "events": [ - { - "name": "change", - "summary": "Fired when the state of the playback changes.", - "description": "This event can be generated by programmatic events, such as pausing or stopping the audio,\nand also by external events, such as the current state of network buffering.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "properties": [ - { - "name": "state", - "summary": "Current state of playback.\n", - "type": "Number" - }, - { - "name": "description", - "summary": "Text description of the state of playback.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "complete", - "summary": "Fired when the audio has finished playing.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates if the sound was played successfully.\nReturns `true` if request succeeded, `false` otherwise.\n", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. Will be undefined if `success` is `true`.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nError code will be `0` if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be `-1`.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "error", - "summary": "Fired when an error occurs while playing the audio.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates a successful operation. Returns `false`.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. May be `undefined`.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nIf the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be `-1`.\n", - "type": "Number" - }, - { - "name": "message", - "deprecated": { - "notes": "Use the `error` property instead", - "since": "3.1.0", - "removed": "10.0.0" - }, - "summary": "Error message.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "interrupted", - "summary": "Fired when audio playback is interrupted by the device.", - "description": "Typically called during an interruption due to an incoming phone call.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "resume", - "summary": "Fired when audio playback is resumed after an interruption.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "interruption", - "summary": "Indicates if the resume was from an interruption.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple Example", - "code": "Simple example of playing a WAVE file from the Resources directory.\n\n``` js\nvar player = Ti.Media.createSound({url:\"sound.wav\"});\nplayer.play();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isLooping", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the value of the [looping](Titanium.Media.Sound.looping) property.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPaused", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the value of the [paused](Titanium.Media.Sound.paused) property.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "isPlaying", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0" - }, - "summary": "Returns the value of the [playing](Titanium.Media.Sound.playing) property.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "pause", - "summary": "Pauses the audio.", - "description": "To restart the audio, call [play](Titanium.Media.Sound.play).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "play", - "summary": "Starting playing the sound, or resume playing a paused sound.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "release", - "summary": "Releases all internal resources.", - "description": "This is typically unnecessary but can be useful if you load a large audio file in `app.js`, and \nplay it only once and you would like to release all resources after your final play to reduce memory.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "reset", - "summary": "Resets the audio playback position to the beginning.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setLooping", - "deprecated": { - "notes": "Set the value of the [looping](Titanium.Media.Sound.looping) property directly.", - "since": "10.0.0" - }, - "summary": "Sets the value of the [looping](Titanium.Media.Sound.looping) property.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "looping", - "summary": "New value for the `looping` property.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setPaused", - "deprecated": { - "notes": "It is preferable to use the [pause](Titanium.Media.Sound.pause) and\n[play](Titanium.Media.Sound.play) methods instead.\n", - "since": "10.0.0" - }, - "summary": "Sets the value of the [paused](Titanium.Media.Sound.paused) property.", - "description": "On iOS, this method can be used to pause and unpause playback. For portability,\nit is preferable to use the [pause](Titanium.Media.Sound.pause) and\n[play](Titanium.Media.Sound.play) methods instead.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "paused", - "summary": "Pass `true` to pause the current playback temporarily, `false` to unpause it.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops playing the audio and resets the playback position to the beginning of the clip.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "STATE_BUFFERING", - "summary": "Audio data is being buffered from the network.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_INITIALIZED", - "summary": "Audio playback is being initialized.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_PAUSED", - "summary": "Playback is paused.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_PLAYING", - "summary": "Audio playback is active.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STARTING", - "summary": "Audio playback is starting.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STOPPED", - "summary": "Audio playback is stopped.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_STOPPING", - "summary": "Audio playback is stopping.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_WAITING_FOR_DATA", - "summary": "Player is waiting for audio data from the network.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATE_WAITING_FOR_QUEUE", - "summary": "Player is waiting for audio data to fill the queue.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_ALARM", - "summary": "Used to identify the volume of audio streams for alarms.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_SIGNALLING", - "summary": "Used to identify the volume of audio streams for DTMF tones or beeps.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_MEDIA", - "summary": "Used to identify the volume of audio streams for media playback.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_NOTIFICATION", - "summary": "Used to identify the volume of audio streams for notifications.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_RING", - "summary": "Used to identify the volume of audio streams for the phone ring.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "AUDIO_TYPE_VOICE", - "summary": "Used to identify the volume of audio streams for voice calls.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "allowBackground", - "summary": "Determines whether the audio should continue playing even when its activity is paused.", - "platforms": [ - { - "since": "1.3.0", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "audioType", - "summary": "Changes the audio-stream-type.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.Media.Sound.AUDIO_TYPE_ALARM", - "Titanium.Media.Sound.AUDIO_TYPE_SIGNALLING", - "Titanium.Media.Sound.AUDIO_TYPE_MEDIA", - "Titanium.Media.Sound.AUDIO_TYPE_NOTIFICATION", - "Titanium.Media.Sound.AUDIO_TYPE_RING", - "Titanium.Media.Sound.AUDIO_TYPE_VOICE" - ] - }, - { - "name": "duration", - "summary": "Duration of the audio resource.", - "description": "On iOS, playback time is reported in seconds.\n\nOn Android, time is reported in milliseconds.\n\nAndroid note: Starting from Titanium 3.2.0, the remote audio plays asynchronously. The duration\ncan only be fetched after the audio is initialized (refer to ).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "looping", - "summary": "Determines whether the audio should loop upon completion.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "paused", - "summary": "Indicates if the audio is paused.", - "description": "On iOS, this property is read-write, and you can pause and resume playback by setting this\nproperty to `true` or `false`.\n\nOn Android, this property is read-only. For portability, use [pause](Titanium.Media.Sound.pause)\nto pause audio, and [play](Titanium.Media.Sound.play) to resume.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "playing", - "summary": "Indicates if the audio is playing.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "time", - "summary": "Current playback position of the audio.", - "description": "Time is reported in milliseconds.\n\nOn iOS, prior to Release 3.0, playback time is reported in seconds.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "url", - "summary": "URL identifying the audio resource.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "volume", - "summary": "Volume of the audio from 0.0 (muted) to 1.0 (loudest).", - "description": "This setting controls the volume of the sound relative to the overall\nvolume setting for the device.\n\nOn iOS, to adjust the volume of the device, set the `volume` property of\n and set the property\nto either ,\n,\nor .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "Titanium.Media.SystemAlert": { - "name": "Titanium.Media.SystemAlert", - "summary": "An object for playing system sounds.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/SystemAlert.yml", - "deprecated": { - "notes": "This iOS-only API has been deprecated and moved to the [Ti.SystemAlert](https://github.com/appcelerator-modules/ti.systemalert) module in 8.0.0.", - "since": "8.0.0" - }, - "description": "You can use this module to provide audible system alerts. \n\nYou can use it to play short (30 seconds or shorter) sounds. The interface does not provide level, positioning, \nlooping, or timing control, and does not support simultaneous playback: You can play only one sound at a time. \n\nThis module differs from the Sound module because it honors the ringtone volume, not the Music volume.\n\nUse the method to create a `SystemAlert` object.\n\nKnow more about [System Sound Services](https://developer.apple.com/reference/audiotoolbox/1657326-system_sound_services).\n", - "examples": [ - { - "description": "Simple Example", - "code": "Simple example of playing a WAVE file from the Resources directory.\n\n``` js\nvar player = Ti.Media.createSystemAlert({url:\"alert.wav\"});\nplayer.play();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "play", - "summary": "Start playing the system alert.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "url", - "summary": "URL identifying the audio resource.", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.Media.VideoPlayer": { - "name": "Titanium.Media.VideoPlayer", - "summary": "A native control for playing videos.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml", - "description": "The video player is a native view that can be used to play videos, either stored\nlocally or streamed from a web server. The player can occupy the full screen, or can\nbe used as a view that can be added to other views.\n\nUse the method to create a video player.\n\nAll platforms support specifying the video content as a URL, either to a local file or\na remote stream. This is done by setting the [url](Titanium.Media.VideoPlayer.url) property.\n\n#### iOS Implementation Notes\n\nOn iOS, video content can also be specified as a [Blob](Titanium.Blob) or\n[File](Titanium.Filesystem.File) object using the\n[media](Titanium.Media.VideoPlayer.media) property.\n\nOn iOS, a video player can dynamically switch back and forth between fullscreen mode\nand standard mode. If the native video controls are displayed, the user can use them\nto switch between standard and fullscreen mode.\n\n#### Android Implementation Notes\n\nOn Android, the video player cannot switch modes. To create a fullscreen player, you\nmust specify `fullscreen: true` when you create the player. This fullscreen player\ncreates its own Android [Activity](Titanium.Android.Activity) on top of the activity stack.\nUnlike a normal view, this fullscreen video player appears as soon as it is created.\nThe user can close the player by pressing the **Back** button. See the code examples for\na sample using the fullscreen player on Android.\n\nThere are several known issues with clipping on the Android video player.\n\n* When used with `scalingMode` set to VIDEO_SCALING_ASPECT_FILL or VIDEO_SCALING_NONE,\n the video content is not correctly clipped to the boundaries of the view.\n ([TIMOB-7628](https://jira-archive.titaniumsdk.com/TIMOB-7628))\n\n* When a border is set on the view, the video content does not take the border width\n into account, so the video content covers the border.\n ([TIMOB-7628](https://jira-archive.titaniumsdk.com/TIMOB-7628))\n\n* If a borderRadius is specified, the video content is not clipped to the rounded\n corners. ([TIMOB-7629](https://jira-archive.titaniumsdk.com/TIMOB-7629))\n\nOn Android, using a video player inside a scroll view is not recommended. When scrolling,\nblack bars may appear over the video content.\n\nThis is because the video player is rendered on a special Android UI element called a SurfaceView.\nAndroid renders the SurfaceView behind the main window and punches a hole in the window\nto reveal the video. Because the content of the SurfaceView does not reside in the application\nwindow, the video content cannot be transformed (moved, scaled or rotated) with the window.\nThis makes it difficult for the content to render properly inside a ScrollView.\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "properties": [ - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "12.7.0", - "name": "iphone" - }, - { - "since": "12.7.0", - "name": "ipad" - }, - { - "since": "12.7.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "properties": [ - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "properties": [ - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch events,\nso this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "properties": [ - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "properties": [ - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "complete", - "summary": "Fired when movie playback ends or a user exits playback.", - "description": "On iOS, the `reason` property is only included if this information is available.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "reason", - "summary": "Reason that playback ended.\n", - "type": "Number" - }, - { - "name": "success", - "summary": "Indicates if the video was played successfully. User exit counts as a success.\nReturns `true` if `reason` is not\n[VIDEO_FINISH_REASON_PLAYBACK_ERROR](Titanium.Media.VIDEO_FINISH_REASON_PLAYBACK_ERROR),\n`false` otherwise.\n", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. Will be undefined if `success` is `true`.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nError code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "durationavailable", - "summary": "Fired when the video duration is available.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "duration", - "summary": "Video duration, in milliseconds.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "error", - "summary": "Fired when movie playback encounters an error.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "message", - "deprecated": { - "notes": "Use `error` property instead", - "since": "3.1.0", - "removed": "10.0.0" - }, - "summary": "Reason for error as a string.", - "type": "String" - }, - { - "name": "success", - "summary": "Indicates a successful operation. Returns `false`.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. May be `undefined`.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nIf the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be `-1`.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "load", - "summary": "Fired when the movie play loads.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "loadstate", - "summary": "Fired when the network [loadState](Titanium.Media.VideoPlayer.loadState) changes.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "loadState", - "summary": "Current value of the [loadState](Titanium.Media.VideoPlayer.loadState) property.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "naturalsizeavailable", - "summary": "Fired when the natural size of the current movie is determined.", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "naturalSize", - "summary": "Current value of the [naturalSize](Titanium.Media.VideoPlayer.naturalSize) property.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "playbackstate", - "summary": "Fired when the [playbackState](Titanium.Media.VideoPlayer.playbackState) changes.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "playbackState", - "summary": "Current value of the [playbackState](Titanium.Media.VideoPlayer.playbackState) property.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "playing", - "summary": "Fired when the currently playing movie changes.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "url", - "summary": "URL of the media.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "preload", - "summary": "Fired when the movie has preloaded and is ready to play.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ] - }, - { - "name": "resize", - "summary": "Fired when the movie player is resized.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "Simple Video Player Example", - "code": "The following code creates a simple video player to play a local video file.\n\n``` js\nvar vidWin = Titanium.UI.createWindow({\n title: 'Video View Demo',\n backgroundColor: '#fff'\n});\n\nvar videoPlayer = Titanium.Media.createVideoPlayer({\n top: 2,\n autoplay: true,\n backgroundColor: 'blue',\n height: 300,\n width: 300,\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode: Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT\n});\n\nvideoPlayer.url = 'movie.mp4';\nvidWin.add(videoPlayer);\nvidWin.open();\n```\n" - }, - { - "description": "Android Fullscreen Video Player", - "code": "The Android fullscreen video player operates differently from other video players.\nThe following example shows how to create, show, and close a fullscreen video\nplayer.\n\nNote that in this example, a button is included to close the player, to\ndemonstrate a method for dismissing the player programmatically. In practice, the user\ncan always dismiss the player by using the **Back** button, so an on-screen\ncontrol would not be required.\n\n``` js\nvar win = Titanium.UI.createWindow({\n title: 'Test',\n backgroundColor: '#fff'\n});\n\n// Change to a valid URL\nvar contentURL = \"http://www.example.com/stream.mp4\";\n\nvar openButton = Ti.UI.createButton({\n title: \"Start Video\",\n top: \"0dp\",\n height: \"40dp\",\n left: \"10dp\",\n right: \"10dp\"\n});\n\nopenButton.addEventListener('click', function() {\n var activeMovie = Titanium.Media.createVideoPlayer({\n url: contentURL,\n backgroundColor: 'blue',\n mediaControlStyle: Titanium.Media.VIDEO_CONTROL_DEFAULT,\n scalingMode: Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT_FILL,\n fullscreen: true,\n autoplay: true\n });\n\n var closeButton = Ti.UI.createButton({\n title: \"Exit Video\",\n top: \"0dp\",\n height: \"40dp\",\n left: \"10dp\",\n right: \"10dp\"\n });\n\n closeButton.addEventListener('click', function() {\n activeMovie.hide();\n activeMovie.release();\n activeMovie = null;\n });\n\n activeMovie.add(closeButton);\n});\nwin.add(openButton);\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous simple example as an Alloy view.\n\n**simplevideoplayer.xml:**\n``` xml\n\n \n \n \n\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Adds a child to this view's hierarchy.", - "description": "The child view is added as the last child in this view's hierarchy.\n\nAlthough all views inherit from , not all views are capable of\ncontaining other views. In particular:\n\n* Some views are not designed to be containers at all.\n* Some views are special-purpose containers that can only contain certain other\n views.\n* Some views are top-level containers that cannot (or should not) be added to other views.\n\n#### Non-Container Views\n\nThe following views are not intended to act as containers that can hold other\nviews:\n\n* [ActivityIndicator](Titanium.UI.ActivityIndicator)\n* [Button](Titanium.UI.Button)\n* [ImageView](Titanium.UI.ImageView)\n* [Label](Titanium.UI.Label)\n* [ProgressBar](Titanium.UI.ProgressBar)\n* [SearchBar](Titanium.UI.SearchBar)\n* [Slider](Titanium.UI.Slider)\n* [Switch](Titanium.UI.Switch)\n* [TableView](Titanium.UI.TableView)\n* [TextArea](Titanium.UI.TextArea)\n* [TextField](Titanium.UI.TextField)\n* [WebView](Titanium.UI.WebView)\n\nAdding children to the these views _may_ be supported on some platforms,\nbut is not guaranteed to work across platforms. Where it is supported, it may not\nwork as expected.\n\nFor maximum portability, these views should be treated as if they do not support children.\nInstead of adding children to these views, applications can position other views as\nsiblings. For example, instead of adding a button as a child of a `WebView`, you can add\nthe button to the web view's parent such that it appears on top of the web view.\n\n#### Special-Purpose Containers\n\nA few view objects act as special-purpose containers--that is, they only manage\ncertain types of children, and many of them support a special means of adding\nthese children, instead of the general `add` method. These containers include:\n\n* [ButtonBar](Titanium.UI.ButtonBar) and [TabbedBar](Titanium.UI.iOS.TabbedBar) are designed\n to hold their own internally-created buttons, assigned by adding strings to the \"labels\" array.\n Views added using the `add` method are displayed on top of these buttons.\n\n* [Picker](Titanium.UI.Picker). Can only hold `PickerRows` and `PickerColumns`, which\n are added using the `add` method. Adding other types of views to a `Picker` is not\n supported.\n\n* [TableView](Titanium.UI.TableView) is a specialized container for\n `TableViewSection` and `TableViewRow` objects. These objects must be\n added using the properties and methods that `TableView` provides\n for adding and removing sections and rows.\n\n On some platforms, it is possible to add arbitrary child views to a table view\n using the `add` method. However, this is not guaranteed to work on all platforms,\n and in general, should be avoided.\n\n* [TableViewSection](Titanium.UI.TableViewSection) is a specialized container\n for `TableViewRow` objects, which _are_ added using the `add` method. The `add` method\n on `TableViewSection` can only be used to add `TableViewRow` objects.\n\n* [Toolbar](Titanium.UI.iOS.Toolbar) is designed to hold buttons and certain\n other controls, added to its `items` array. Views added using the `add` method are\n displayed on top of the controls in the `items` array.\n\n* The `Tab`, `TabGroup`, `NavigationWindow` and `SplitWindow` objects are\n special containers that manage windows. These are discussed in the\n \"Top-Level Containers\" section.\n\n\n#### Top-Level Containers\n\nThere are certain top-level containers that are not intended to be added\nas the children of other views. These top-level containers include\n, , ,\nand . Other types of views must be added\nto a top-level container in order to be displayed on screen.\n\nThe special containers ,\n, , and\n manage windows.\nThese managed windows may be referred to as *children* of the\ncontainer, but they are not added using the `add` method.\n\n`Tab` is another kind of special container: it is not itself a top-level container,\nbut can only be used within a `TabGroup`. You cannot `add` a `Tab` to an arbitrary\ncontainer.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to add to this view's hierarchy.\n\nYou may pass an array of views, e.g. `view.add([subview1, subview2]`.\n", - "type": [ - "Titanium.UI.View", - "Array" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "animate", - "summary": "Animates this view.", - "description": "The [Animation](Titanium.UI.Animation) object or dictionary passed to this method defines\nthe end state for the animation, the duration of the animation, and other properties.\n\nNote that on SDKs older than 9.1.0 - if you use `animate` to move a view, the view's actual *position* is changed, but\nits layout properties, such as `top`, `left`, `center` and so on are not changed--these\nreflect the original values set by the user, not the actual position of the view.\n\nAs of SDK 9.1.0, the final values of the animation will be set on the view just before the `complete` event and/or the callback is fired.\n\nThe [rect](Titanium.UI.View.rect) property can be used to determine the actual size and\nposition of the view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "animation", - "summary": "Either a dictionary of animation properties or an\n[Animation](Titanium.UI.Animation) object.\n", - "type": [ - "Titanium.UI.Animation", - "Dictionary" - ] - }, - { - "name": "callback", - "summary": "Function to be invoked upon completion of the animation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearMotionEffects", - "summary": "Removes all previously added motion effects.", - "description": "Use this method together with and .", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "remove", - "summary": "Removes a child view from this view's hierarchy.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to remove from this view's hierarchy.", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllChildren", - "summary": "Removes all child views from this view's hierarchy.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "toImage", - "summary": "Returns an image of the rendered view, as a Blob.", - "description": "The `honorScaleFactor` argument is only supported on iOS.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "callback", - "summary": "Function to be invoked upon completion. If non-null, this method will be performed\nasynchronously. If null, it will be performed immediately.\n", - "type": "Callback", - "optional": true - }, - { - "name": "honorScaleFactor", - "summary": "Determines whether the image is scaled based on scale factor of main screen. (iOS only)\n\nWhen set to true, image is scale factor is honored. When set to false, the image in the\nblob has the same dimensions for retina and non-retina devices.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "convertPointToView", - "summary": "Translates a point from this view's coordinate system to another view's coordinate system.\n", - "description": "Returns `null` if either view is not in the view hierarchy.\n\nKeep in mind that views may be removed from the view hierarchy if their window is blurred\nor if the view is offscreen (such as in some situations with ).\n\nIf this view is a , the view's x and y offsets are subtracted from\nthe return value.\n", - "platforms": [ - { - "since": "1.8", - "name": "android" - }, - { - "since": "1.8", - "name": "iphone" - }, - { - "since": "1.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "point", - "summary": "A point in this view's coordinate system.\n\nIf this argument is missing an `x` or `y` property, or the properties can not be\nconverted into numbers, an exception will be raised.\n", - "type": "Point" - }, - { - "name": "destinationView", - "summary": "View that specifies the destination coordinate system to convert to. If this argument\nis not a view, an exception will be raised.\n", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "Point" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - }, - { - "name": "cancelAllThumbnailImageRequests", - "summary": "Cancels all pending asynchronous thumbnail requests.", - "description": "Asynchronous thumbnail requests initiated with\n[requestThumbnailImagesAtTimes](Titanium.Media.VideoPlayer.requestThumbnailImagesAtTimes).\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "pause", - "summary": "Pauses playing the video.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "play", - "summary": "Starts playing the video.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "release", - "summary": "Releases the internal video resources immediately.", - "description": "This is not usually necessary but can help if you no longer need to use the player after\nit is used to help converse memory.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "requestThumbnailImagesAtTimes", - "summary": "Asynchronously request thumbnail images for one or more points in time in the video.", - "description": "The `times` parameter specifies an array of time values, in\n**seconds**. For each time value, the platform generates an image\nrepresenting the video at that point in time.\n\nThe callback function is invoked when a thumbnail is available.\n\nCalling this method will cancel all pending asynchronous thumbnail requests.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "times", - "summary": "Array of time values, representing offsets into the video, in seconds.", - "type": "Array" - }, - { - "name": "option", - "summary": "Video time precision.", - "type": "Number" - }, - { - "name": "callback", - "summary": "Callback to invoke when a thumbnail is available.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Stops playing the video.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHidden", - "summary": "Whether the view should be \"hidden\" from (i.e., ignored by) the accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityElementsHidden` property defined in the\n[UIAccessibility\nProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\n\nOn Android, setting `accessibilityHidden` calls the native\n[View.setImportantForAccessibility](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29)\nmethod. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and\nlater; if this property is specified on earlier versions of Android, it is ignored.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "On iOS this is a direct analog of the `accessibilityHint` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityLabel` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to Title or label of the control.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityValue` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to State or value of the control.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on iOS only. For Android, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nSee the \"Using an anchorPoint\" example in for a demonstration.\nThe default is center of this view.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "animatedCenter", - "summary": "Current position of the view during an animation.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point", - "permission": "read-only" - }, - { - "name": "backgroundColor", - "summary": "Background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of . Defaults to `Transparent`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundDisabledColor", - "summary": "Disabled background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundDisabledImage", - "summary": "Disabled background image for the view, specified as a local file path or URL.", - "description": "If `backgroundDisabledImage` is undefined, and the normal background image`backgroundImage`\nis set, the normal image is used when this view is disabled.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedColor", - "summary": "Focused background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nFor normal views, the focused color is only used if `focusable` is `true`.\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedImage", - "summary": "Focused background image for the view, specified as a local file path or URL.", - "description": "For normal views, the focused background is only used if `focusable` is `true`.\nIf `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage`\nis set, the normal image is used when this view is focused.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundGradient", - "summary": "A background gradient for the view.", - "description": "A gradient can be defined as either linear or radial. A linear gradient varies continuously\nalong a line between the `startPoint` and `endPoint`.\n\nA radial gradient is interpolated between two circles, defined by `startPoint` and\n`startRadius` and `endPoint` and `endRadius` respectively.\n\nThe start points, end points and radius values can be defined in device units, in the view's\ncoordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center\npoint of the view can be specified as:\n\n``` js\n{ x: 30, y: 30 }\n```\n\nOr:\n``` js\n{ x: '50%', y: '50%' }\n```\n\nWhen specifying multiple colors, you can specify an *offset* value for each color, defining\nhow far into the gradient it takes effect. For example, the following color array specifies\na gradient that goes from red to blue back to red:\n\n``` js\ncolors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]\n```\n\nAndroid's linear gradients ignores `backfillStart` and `backfillEnd`, treating them as if\nthey are true. Android's radial gradients ignore the `endPoint` property.\nDefaults to no gradient.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "examples": [ - { - "description": "Linear and Radial Gradients", - "code": "The following code excerpt creates two views, one with a linear gradient and one with\na radial gradient.\n\n``` js\nvar win1 = Titanium.UI.createWindow({\n title:'Tab 1',\n backgroundColor:'#fff',\n layout: 'vertical'\n});\n\nvar radialGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'radial',\n startPoint: { x: 50, y: 50 },\n endPoint: { x: 50, y: 50 },\n colors: [ 'red', 'blue'],\n startRadius: 50,\n endRadius: 0,\n backfillStart: true\n }\n});\nvar linearGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'linear',\n startPoint: { x: '0%', y: '50%' },\n endPoint: { x: '100%', y: '50%' },\n colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],\n }\n});\nwin1.add(radialGradient);\nwin1.add(linearGradient);\nwin1.open();\n```\n" - } - ], - "type": "Gradient" - }, - { - "name": "backgroundImage", - "summary": "Background image for the view, specified as a local file path or URL.", - "description": "Default behavior when `backgroundImage` is unspecified depends on the type of view and the platform.\nFor generic views, no image is used. For most controls (buttons, textfields, and so on), platform-specific default images are used.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundRepeat", - "summary": "Determines whether to tile a background across a view.", - "description": "Setting this to `true` makes the set `backgroundImage` repeat across the view as a series\nof tiles. The tiling begins in the upper-left corner, where the upper-left corner of the\nbackground image is rendered. The image is then tiled to fill the available space of the\nview.\n\nNote that setting this to `true` may incur performance penalties for large views or\nbackground images, as the tiling must be redone whenever a view is resized.\n\nOn iOS, the following views do not currently support tiled backgrounds:\n\n* \n* \n* \n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "backgroundLeftCap", - "summary": "Size of the left end cap.", - "description": "See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in .\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": "0" - }, - { - "name": "backgroundSelectedColor", - "summary": "Selected background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to transparent, so the background color of this view will be used.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "13.1.0", - "name": "iphone" - }, - { - "since": "13.1.0", - "name": "ipad" - }, - { - "since": "13.1.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundSelectedImage", - "summary": "Selected background image URL for the view, specified as a local file path or URL.", - "description": "For normal views, the selected background is only used if `focusable` is `true`.\n\nIf `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set\nthe normal image is used when this view is selected.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundTopCap", - "summary": "Size of the top end cap.", - "description": "See the section on backgroundLeftCap and backgroundTopCap behavior on iOS in .\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": "0" - }, - { - "name": "borderColor", - "summary": "Border color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nDefaults to the normal background color of this view (Android), black (iOS).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "borderRadius", - "summary": "Radius for the rounded corners of the view's border.", - "description": "Each corner is rounded using an arc of a circle.\nValues for each corner can be specified. For example, '20px 20px' will set both left and right corners to `20px`.\nSpecifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.\n\nIf you have issues with dark artifacts on Android you can try to disable Hardware acceleration by setting a\n`backgroundColor` with a small amount of transparency: `backgroundColor:\"rgba(255,255,255,254)\"`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String", - "Array", - "Array" - ], - "default": 0 - }, - { - "name": "borderWidth", - "summary": "Border width of the view.", - "description": "If [borderColor](Titanium.UI.View.borderColor) is set without [borderWidth](Titanium.UI.View.borderWidth), this value\nwill be changed to 1 of the unit declared as 'ti.ui.defaultunit' in tiapp.xml descriptor.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": 0 - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "center", - "summary": "View's center position, in the parent view's coordinates.", - "description": "This is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "children", - "summary": "Array of this view's child views.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Array", - "permission": "read-only" - }, - { - "name": "clipMode", - "summary": "View's clipping behavior.", - "description": "Setting this to enforces all child views to be clipped to this views bounds.\nSetting this to allows child views to be drawn outside the bounds of this view.\nWhen set to or when this property is not set, clipping behavior is inferred.\nSee section on iOS Clipping Behavior in .\n\nDefaults to `undefined`. Behaves as if set to .\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "focusable", - "summary": "Whether view should be focusable while navigating with the trackball.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "horizontalMotionEffect", - "summary": "Adds a horizontal parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "layout", - "summary": "Specifies how the view positions its children.\nOne of: 'composite', 'vertical', or 'horizontal'.\n", - "description": "There are three layout options:\n\n* `composite` (or `absolute`). Default layout. A child view is positioned based on its\n positioning properties or \"pins\" (`top`, `bottom`, `left`, `right` and `center`).\n If no positioning properties are specified, the child is centered.\n\n The child is always sized based on its `width` and `height` properties, if these are\n specified. If the child's height or width is *not* specified explicitly, it may be\n calculated implicitly from the positioning properties. For example, if both `left` and\n `center.x` are specified, they can be used to calculate the width of the child control.\n\n Because the size and position properties can conflict, there is a specific precedence\n order for the layout properties. For vertical positioning, the precedence\n order is: `height`, `top`, `center.y`, `bottom`.\n\n The following table summarizes the various combinations of properties that can\n be used for vertical positioning, in order from highest precedence to lowest.\n (For example, if `height`, `center.y` and `bottom` are all specified, the\n `height` and `center.y` values take precedence.)\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScenarioBehavior
height & top specified\n Child positioned top unit from parent's top, using specified height;\n any center.y and bottom values are ignored.\n
height & center.y specified\n Child positioned with center at center.y, using specified height;\n any bottom value is ignored.\n
height & bottom specifiedChild positioned bottom units from parent's bottom, using specified height.
top & center.y specified\n Child positioned with top edge top units from parent's top and center at\n center.y. Height is determined implicitly; any bottom value is ignored.\n
top & bottom specified\n Child positioned with top edge top units from parent's top and bottom edge\n bottom units from parent's bottom. Height is determined implicitly.\n
Only top specified\n Child positioned top units from parent's top, and uses the default height\n calculation for the view type.\n
center.y and bottom specified\n Child positioned with center at center.y and bottom edge bottom\n units from parent's bottom. Height is determined implicitly.\n
Only center.y specifiedChild positioned with center at center.y, and uses the default height calculation for the view type.
Only bottom specifiedChild positioned with bottom edge bottom units from parent's bottom, and uses the default height calculation for the view type.
height, top, center.y, and bottom unspecifiedChild entered vertically in the parent and uses the default height calculation for the child view type.
\n\n Horizontal positioning works like vertical positioning, except that the\n precedence is `width`, `left`, `center.x`, `right`.\n\n For complete details on composite layout rules, see\n [Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n in the Titanium Mobile Guides.\n\n * `vertical`. Children are laid out vertically from top to bottom. The first child\n is laid out `top` units from its parent's bounding box. Each subsequent child is\n laid out below the previous child. The space between children is equal to the\n upper child's `bottom` value plus the lower child's `top` value.\n\n Each child is positioned horizontally as in the composite layout mode.\n\n * `horizontal`. Horizontal layouts have different behavior depending on whether wrapping\n is enabled. Wrapping is enabled by default (the `horizontalWrap` property is `true`).\n\n With wrapping behavior, the children are laid out horizontally from left to right,\n _in rows_. If a child requires more horizontal space than exists in the current row,\n it is wrapped to a new row. The height of each row is equal to the maximum height of\n the children in that row.\n\n Wrapping behavior is available on iOS and Android. When the `horizontalWrap` property is\n set to true, the first row is placed at the top of the parent view, and successive rows\n are placed below the first row. Each child is positioned vertically _within its row_ somewhat\n like composite layout mode. In particular:\n\n * If neither `top` or `bottom` is specified, the child is centered in the\n row.\n * If either `top` or `bottom` is specified, the child is aligned to either\n the top or bottom of the row, with the specified amount of padding.\n * If *both* `top` and `bottom` is specified for a given child, the properties\n are both treated as padding.\n\n If the `horizontalWrap` property is false, the behavior is more equivalent to a vertical layout.\n Children are laid or horizontally from left to right in a single row. The `left` and\n `right` properties are used as padding between the children, and the `top` and `bottom`\n properties are used to position the children vertically.\n\n Defaults to Composite layout.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "opacity", - "summary": "Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque).", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "overrideCurrentAnimation", - "summary": "When on, animate call overrides current animation if applicable.", - "description": "If this property is set to false, the animate call is ignored if the view is currently being animated.\n\nDefaults to `undefined` but behaves as false\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation" - }, - { - "name": "pullBackgroundColor", - "summary": "Background color of the wrapper view when this view is used as either or .\n\nDefaults to `undefined`. Results in a light grey background color on the wrapper view.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "previewContext", - "summary": "The preview context used in the 3D-Touch feature \"Peek and Pop\".", - "description": "Preview context to present the \"Peek and Pop\" of a view. Use an configured instance\nof here.\n\nNote: This property can only be used on devices running iOS 9 or later and supporting 3D-Touch.\nIt is ignored on older devices and can manually be checked using .\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - } - ], - "inherits": "Titanium.UI.View", - "type": "Titanium.UI.iOS.PreviewContext" - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "rect", - "summary": "The bounding box of the view relative to its parent, in system units.\n", - "description": "The view's bounding box is defined by its size and position.\n\nThe view's size is `rect.width` x `rect.height`. The view's top-left position relative to\nits parent is (`rect.x` , `rect.y`).\n\nOn Android it will also return `rect.absoluteX` and 'rect.absoluteY' which are relative to\nthe main window.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "DimensionWithAbsolutes", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "12.3.0", - "name": "iphone" - }, - { - "since": "12.3.0", - "name": "ipad" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "size", - "summary": "The size of the view in system units.\n", - "description": "Although property returns a dictionary, only the `width` and `height`\nproperties are valid. The position properties--`x` and `y`--are always 0.\n\nTo find the position _and_ size of the view, use the [rect](Titanium.UI.View.rect)\nproperty instead.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Dimension", - "permission": "read-only" - }, - { - "name": "softKeyboardOnFocus", - "summary": "Determines keyboard behavior when this view is focused. Defaults to .", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS" - ] - }, - { - "name": "tintColor", - "summary": "The view's tintColor", - "description": "This property is a direct correspondent of the tintColor property of UIView on iOS. If no value is specified,\nthe tintColor of the View is inherited from its superview.\n", - "platforms": [ - { - "since": "3.1.3", - "name": "iphone" - }, - { - "since": "3.1.3", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ], - "default": null - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - }, - { - "since": "12.1.0", - "name": "iphone" - }, - { - "since": "12.1.0", - "name": "ipad" - }, - { - "since": "12.1.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchEnabled", - "summary": "Determines whether view should receive touch events.", - "description": "If false, will forward the events to peers.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the view.", - "description": "Android only supports Matrix2D transforms.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ], - "default": "Identity matrix" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "verticalMotionEffect", - "summary": "Adds a vertical parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "viewShadowRadius", - "summary": "Determines the blur radius used to create the shadow.", - "description": "Defaults to `undefined`. Behaves as if set to 3. Accepts density units as of 10.0.1.", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "viewShadowColor", - "summary": "Determines the color of the shadow.", - "description": "iOS Defaults to `undefined`. Behaves as if transparent. Android default is black.\nOn Android you can set `0.5` and\n`0.5` in your theme to change the\nopacity.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "viewShadowOffset", - "summary": "Determines the offset for the shadow of the view.", - "description": "Defaults to `undefined`. Behaves as if set to (0,-3)", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "width", - "summary": "View's width, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "horizontalWrap", - "summary": "Determines whether the layout has wrapping behavior.", - "description": "For more information, see the discussion of horizontal layout mode in the description of\nthe [layout](Titanium.UI.View.layout) property.\n", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "zIndex", - "summary": "Z-index stack order position, relative to other sibling views.", - "description": "A view does not have a default z-index value, meaning that it is undefined by default.\nWhen this property is explicitly set, regardless of its value, it causes the view to be\npositioned in front of any sibling that has an undefined z-index.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "keepScreenOn", - "summary": "Determines whether to keep the device screen on.", - "description": "When `true` the screen will not power down. Note: enabling this feature will use more\npower, thereby adversely affecting run time when on battery.\nFor iOS look at [Titanium.App.idleTimerDisabled](Titanium.App.idleTimerDisabled).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "allowsAirPlay", - "summary": "Whether or not the current movie can be played on a remote device.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "autoplay", - "summary": "Indicates if a movie should automatically start playback.", - "description": "On iOS, playback starts automatically if `autoplay` is `true` *and* the movie is likely to\nfinish uninterrupted. The OS determines whether the movie is likely to finish\nuninterrupted based on factors including the bit rate of the movie and network\nconditions (if the movie is being streamed from a remote source).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "autoHide", - "summary": "Indicates if player is hidden by default and shown when its ready.", - "description": "On Android the background of the video player is set to the primary background color.\nWhen switching on `autoHide` it will hide the player until the video is loaded.\nThen it will automatically show the player. In a it will hide\nit again when it is outside the viewport.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "backgroundView", - "deprecated": { - "notes": "Use [Titanium.Media.VideoPlayer.overlayView](Titanium.Media.VideoPlayer.overlayView) instead.", - "since": "7.0.0" - }, - "summary": "Sets the background view for customization which is always displayed behind movie content.", - "description": "To create a background behind the movie content on iOS, you can specify a\nbackground view. On iOS, you can set the `backgroundColor` property directly on\nthe video player, but not a background image or background gradient. For this kind\nof effect, specify a background view.\n\nNote that the background view must be sized explicitly: percentage sizes do not work properly.\n\nThe following code sample creates a video player with a background image:\n\n``` js\nvar videoPlayer = Ti.Media.createVideoPlayer({\n height: 300,\n width: 300,\n backgroundView: Ti.UI.createView({\n backgroundImage: 'videoPlayerBG.png\n width: 300,\n height: 300\n }),\n borderRadius: 20,\n borderWidth: 2,\n borderColor: 'blue',\n});\n```\n\nNote that if [scalingMode](Titanium.Media.VideoPlayer.scalingMode) is set to\n[VIDEO_SCALING_RESIZE](Titanium.Media.VIDEO_SCALING_RESIZE) or\n[VIDEO_SCALING_RESIZE_ASPECT_FILL](Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT_FILL),\nthe playing video will fill the entire video player area, obscuring any background\nview.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "currentPlaybackTime", - "summary": "Current playback time of the current movie in milliseconds.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "duration", - "summary": "The duration of the current movie in milliseconds, or 0.0 if not known.", - "description": "The duration of the movie may not be available when playback is started. The\n[durationavailable](Titanium.Media.VideoPlayer.durationavailable) event is\nfired when the duration is known.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "endPlaybackTime", - "summary": "The end time of movie playback, in milliseconds.", - "description": "On iOS, defaults to 0, which indicates natural end time of the movie.\nChanging the value to a value less than `duration` causes the movie to\nstop playing at the specified point. On iOS, this value is not applicable to\nstreaming media, so 0 is returned if the current media is being streamed.\n\nOn Android, this is always the same as [duration](Titanium.Media.VideoPlayer.duration)\n(the natural end time), and changing the value has no effect.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "fairPlayConfiguration", - "summary": "Handle DRM-encrypted video assets using the [Apple FairPlay Streaming API](https://developer.apple.com/streaming/fps/).", - "description": "Secure the delivery of streaming media to devices through the HTTP Live Streaming (HLS) protocol. Using FairPlay Streaming (FPS) technology, content providers, encoding vendors, and delivery networks can encrypt content, securely exchange keys, and protect playback on iOS, iPadOS and macOS.", - "platforms": [ - { - "since": "12.2.0", - "name": "iphone" - }, - { - "since": "12.2.0", - "name": "ipad" - }, - { - "since": "12.2.0", - "name": "macos" - } - ], - "type": "FairPlayConfiguration", - "availability": "creation" - }, - { - "name": "fullscreen", - "deprecated": { - "notes": "This property has been removed for iOS in Titanium SDK 7.0.0 as of the official deprecation by Apple.", - "since": "7.0.0" - }, - "summary": "Determines if the movie is presented in the entire screen (obscuring all other application content).\n", - "description": "Note that this must be set at different times on different platforms:\n\nOn Android, this property must be set at creation time. For example:\n\n``` js\nvar player = Ti.Media.createVideoPlayer({fullscreen: true});\n```\n\nOn Android, setting this value to `true` means that the video will have its own Android Activity\nrather than being embedded as a view.\n\nThis property was removed on iOS in SDK 7.0.0\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Boolean", - "availability": "creation", - "default": false - }, - { - "name": "initialPlaybackTime", - "summary": "The start time of movie playback, in milliseconds.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "loadState", - "deprecated": { - "notes": "On iOS, use [Titanium.Media.VideoPlayer.moviePlayerStatus](Titanium.Media.VideoPlayer.moviePlayerStatus) instead.", - "since": "7.0.0" - }, - "summary": "Returns the network load state of the movie player.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "media", - "summary": "Media object to play, as either a `Ti.Filesystem.File`, a `Ti.Blob`, or an URL `String`.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Titanium.Blob", - "Titanium.Filesystem.File", - "String" - ], - "permission": "write-only" - }, - { - "name": "mediaControlStyle", - "deprecated": { - "notes": "On iOS, use [Titanium.Media.VideoPlayer.showsControls](Titanium.Media.VideoPlayer.showsControls) instead.", - "since": "7.0.0" - }, - "summary": "The style of the playback controls.", - "description": "Removed from iOS in SDK 7.0.0", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Number", - "default": "System default video controls ().", - "constants": [ - "Titanium.Media.VIDEO_CONTROL_DEFAULT", - "Titanium.Media.VIDEO_CONTROL_EMBEDDED", - "Titanium.Media.VIDEO_CONTROL_FULLSCREEN", - "Titanium.Media.VIDEO_CONTROL_HIDDEN", - "Titanium.Media.VIDEO_CONTROL_NONE" - ] - }, - { - "name": "mediaTypes", - "summary": "The type of media in the player's current item first track.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "", - "permission": "read-only", - "constants": [ - "Titanium.Media.VIDEO_MEDIA_TYPE_AUDIO", - "Titanium.Media.VIDEO_MEDIA_TYPE_CLOSED_CAPTION", - "Titanium.Media.VIDEO_MEDIA_TYPE_DEPTH_DATA", - "Titanium.Media.VIDEO_MEDIA_TYPE_METADATA", - "Titanium.Media.VIDEO_MEDIA_TYPE_METADATA_OBJECT", - "Titanium.Media.VIDEO_MEDIA_TYPE_MUXED", - "Titanium.Media.VIDEO_MEDIA_TYPE_SUBTITLE", - "Titanium.Media.VIDEO_MEDIA_TYPE_TEXT", - "Titanium.Media.VIDEO_MEDIA_TYPE_TIMECODE", - "Titanium.Media.VIDEO_MEDIA_TYPE_VIDEO" - ] - }, - { - "name": "moviePlayerStatus", - "summary": "Returns the status of the movie player.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.VIDEO_LOAD_STATE_FAILED", - "Titanium.Media.VIDEO_LOAD_STATE_PLAYABLE", - "Titanium.Media.VIDEO_LOAD_STATE_UNKNOWN" - ] - }, - { - "name": "naturalSize", - "summary": "Returns the natural size of the movie.", - "description": "Returns a dictionary with properties `width` and `height`. Returns 0 for both properties if not\nknown or applicable.\n\nThe [naturalSizeAvailable](Titanium.Media.VideoPlayer.naturalsizeavailable) event is\nfired when the natural size is known.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "MovieSize" - }, - { - "name": "speed", - "summary": "Playback speed of the video.", - "description": "Playback speed of the video. Android: only available for API level >= 23.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation" - }, - { - "name": "overlayView", - "summary": "Use the overlay view to add additional custom views between the video content and the controls.", - "description": "Note that the overlay view must be sized explicitly: percentage sizes do not work properly.\n\nThe following code sample creates a video player with a background image:\n\n``` js\nvar videoPlayer = Ti.Media.createVideoPlayer({\n height : 300,\n width : 300,\n overlayView : Ti.UI.createView({\n backgroundImage: 'videoPlayerBG.png\n width : 300,\n height : 300\n }),\n borderRadius : 20,\n borderWidth : 2,\n borderColor : 'blue',\n});\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "pictureInPictureEnabled", - "summary": "Whether or not the receiver allows Picture in Picture playback.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "playableDuration", - "summary": "Currently playable duration of the movie, in milliseconds, for progressively\ndownloaded network content, or 0.0 if not known.\n", - "description": "On Android, this is always the same as [duration](Titanium.Media.VideoPlayer.duration).\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 0, - "permission": "read-only" - }, - { - "name": "playbackState", - "summary": "Current playback state of the video player.", - "description": "One of the `VIDEO_PLAYBACK_STATE` constants defined in .\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Media.VIDEO_PLAYBACK_STATE_INTERRUPTED", - "Titanium.Media.VIDEO_PLAYBACK_STATE_PAUSED", - "Titanium.Media.VIDEO_PLAYBACK_STATE_PLAYING", - "Titanium.Media.VIDEO_PLAYBACK_STATE_SEEKING_BACKWARD", - "Titanium.Media.VIDEO_PLAYBACK_STATE_SEEKING_FORWARD", - "Titanium.Media.VIDEO_PLAYBACK_STATE_STOPPED" - ] - }, - { - "name": "playing", - "summary": "Boolean to indicate if the player has started playing.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "repeatMode", - "summary": "Determines how the movie player repeats when reaching the end of playback.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "Titanium.Media.VIDEO_REPEAT_MODE_NONE", - "constants": [ - "Titanium.Media.VIDEO_REPEAT_MODE_NONE", - "Titanium.Media.VIDEO_REPEAT_MODE_ONE" - ] - }, - { - "name": "scalingMode", - "summary": "Determines how the content scales to fit the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": " on Android, on iOS", - "constants": [ - "Titanium.Media.VIDEO_SCALING_ASPECT_FILL", - "Titanium.Media.VIDEO_SCALING_ASPECT_FIT", - "Titanium.Media.VIDEO_SCALING_MODE_FILL", - "Titanium.Media.VIDEO_SCALING_NONE", - "Titanium.Media.VIDEO_SCALING_RESIZE", - "Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT", - "Titanium.Media.VIDEO_SCALING_RESIZE_ASPECT_FILL" - ] - }, - { - "name": "showsControls", - "summary": "Whether or not the receiver shows playback controls. Default is true.", - "description": "Clients can set this property to false when they don't want to have any playback controls on top of\nthe visual content (e.g. for a game splash screen). This property should not be used to temporarily\n change the visibility of the playback controls since it will create or destroy UI elements.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - }, - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "url", - "summary": "URL of the media to play.", - "description": "URL identifying a local or remote video to play.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "volume", - "summary": "Volume of the audio portion of the video.\n", - "description": "On iOS, this adjusts the volume of the application's session as well, and will\nnot work if useApplicationAudioSession has been set false. On the iOS device,\nsetting this will be accompanied by an OS-provided indicator. However, the iOS\nsimulator does not honor this volume setting, and is a known issue with Apple's\nsimulator.\n", - "platforms": [ - { - "since": "2.1", - "name": "android" - }, - { - "since": "2.1", - "name": "iphone" - }, - { - "since": "2.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 1 - } - ], - "subtype": "view" - }, - "ThumbnailResponse": { - "name": "ThumbnailResponse", - "summary": "Simple object passed to the thumbnail callback in response to the\n[requestThumbnailImagesAtTimes](Titanium.Media.VideoPlayer.requestThumbnailImagesAtTimes)\nmethod.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml", - "description": "The callback is invoked when a movie thumbnail is available.\n", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns `0` if `success` is `true`.", - "description": "Error code will be `0` if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be `-1`.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "image", - "summary": "Thumbnail image, as a `Blob`.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob" - }, - { - "name": "time", - "summary": "Time offset for the thumbnail, in seconds.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "MovieSize": { - "name": "MovieSize", - "summary": "Simple object used to describe the size of a movie.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml", - "properties": [ - { - "name": "width", - "summary": "Width of the movie.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "height", - "summary": "Height of the movie.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "FairPlayConfiguration": { - "name": "FairPlayConfiguration", - "summary": "An object representing a FairPlay Streaming configuration.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Media/VideoPlayer.yml", - "properties": [ - { - "name": "licenseURL", - "summary": "The FairPlay Streaming license URL to handle the server-side authentication flow.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "certificate", - "summary": "The FairPlay Streaming public certificate to authenticate the content key request.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob" - } - ] - }, - "Titanium.Network.BonjourBrowser": { - "name": "Titanium.Network.BonjourBrowser", - "summary": "A browser for the discovery and retrieval of Bonjour services available on the network.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/BonjourBrowser.yml", - "description": "Use the method to create a `BonjourBrowser` instance.\n\nIf your application publishes Bonjour services itself, that service will be discovered \nby the browser if necessary; be prepared to perform a check if you do not want to list \nlocal services as available. Bonjour service browsing is an asynchronous operation, \nmeaning that you should be extremely careful when caching values from the `services` \nproperty returned by the `updatedservices` event. In particular, if you maintain a \nlocal copy of available services and a user tries to connect to one, you should be prepared \nto handle failures gracefully; the next `updatedservices` event should provide the new \nservices list, but you should not rely on it being delivered before user input. When \na window which uses Bonjour browsing is closed, if you do not want to continue searching, \nyou must call the stop() method.\n\nIn iOS 14.0+, to browse services add key `NSLocalNetworkUsageDescription` and `NSBonjourServices` to the `ios plist` section of the tiapp.xml file.\n\nExample:\n\n``` xml\n\n \n \n \n \n \n NSLocalNetworkUsageDescription\n \n Specify the reason for accessing the local network.\n This appears in the alert dialog when asking the user \n for permission to access local network.\n \n \n NSBonjourServices\n \n _test._tcp\n \n \n \n \n \n\n```\n", - "events": [ - { - "name": "updatedservices", - "summary": "Fired when the discovered services list is updated", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "services", - "summary": "An array of BonjourService objects corresponding to currently available services. If you cache this value, including using it as table data, be aware that it could become out of date at any time due to the asynchronous nature of Bonjour service discovery.", - "type": "Array" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "search", - "summary": "Conduct a search for Bonjour services matching the type and domain specified during creation", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopSearch", - "summary": "Halt an ongoing search", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "domain", - "summary": "The domain the browser is searching in", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "local." - }, - { - "name": "isSearching", - "summary": "Whether or not the browser is currently searching", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "serviceType", - "summary": "The type of the service the browser searches for", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": null - } - ], - "subtype": "proxy" - }, - "Titanium.Network.BonjourService": { - "name": "Titanium.Network.BonjourService", - "summary": "Describes a service on the network which is published by Bonjour.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/BonjourService.yml", - "description": "You can obtain a `BonjourService` instance by calling \nor from the `service` list from a [BonjourBrowser](Titanium.Network.BonjourBrowser) \n`updatedservices` event. \n\nYou can only publish Bonjour services attached to a socket which is currently listening; \nyou cannot publish a service for a remotely connected socket. If you stop the Bonjour \nservice and wish to close the socket it uses, it is strongly recommended that you stop \nthe service first. When a window which publishes a Bonjour service is closed, you must \nstop the service if the associated socket is also to be closed, or if it is no longer \nnecessary to publish. Bonjour service resolution and publishing is asynchronous.\n\nIn iOS 14.0+, to publish service add key `NSLocalNetworkUsageDescription` and `NSBonjourServices` in tiapp.xml file.\n\nExample:\n\n``` xml\n\n \n \n \n \n \n NSLocalNetworkUsageDescription\n \n Specify the reason for accessing the local network.\n This appears in the alert dialog when asking the user \n for permission to access local network.\n \n \n NSBonjourServices\n \n _test._tcp\n \n \n \n \n \n\n```\n", - "events": [ - { - "name": "publish", - "summary": "Fired when the service has been published (or errored).", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "code", - "summary": "Error code", - "type": "Number" - }, - { - "name": "error", - "summary": "Error message", - "type": "String" - }, - { - "name": "success", - "summary": "Reports if the publish operation was successful", - "type": "Boolean" - }, - { - "name": "source", - "summary": "the service whose publish operation was completed/errored.", - "type": "Titanium.Network.BonjourService" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "resolve", - "summary": "Fired when the service has been resolved (or errored). If successful, the [socket](Titanium.Network.BonjourService.socket) property should now be available.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "code", - "summary": "Error code", - "type": "Number" - }, - { - "name": "error", - "summary": "Error message", - "type": "String" - }, - { - "name": "success", - "summary": "Reports if the resolve operation was successful", - "type": "Boolean" - }, - { - "name": "source", - "summary": "the service whose resolve operation was completed/errored.", - "type": "Titanium.Network.BonjourService" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "stop", - "summary": "Fired when a service's publish or resolution was stopped via ", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "code", - "summary": "Error code", - "type": "Number" - }, - { - "name": "error", - "summary": "Error message", - "type": "String" - }, - { - "name": "success", - "summary": "Reports if the stop operation was successful", - "type": "Boolean" - }, - { - "name": "source", - "summary": "the service whose publish or resolve operation was stopped.", - "type": "Titanium.Network.BonjourService" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Resolve local HTTP/TCP services", - "code": "The following code excerpt looks for http-based TCP zeroconf services on the local network.\nIt then attempts to resolve the service, establishing a socket that can be used for communications.\n\n``` js\n// Create the Bonjour Browser (looking for http)\nvar httpBonjourBrowser = Ti.Network.createBonjourBrowser({\n serviceType: '_http._tcp',\n domain: 'local'\n});\n\n// Handle updated services\nhttpBonjourBrowser.addEventListener('updatedservices', function (e) {\n for (var service of e.services) {\n // callback style\n service.resolve(120, (err, success) => {\n console.log(service.socket);\n console.log(service.socket.port);\n console.log(service.socket.host);\n });\n }\n});\n\n// Start searching\nhttpBonjourBrowser.search();\n```\n" - }, - { - "description": "Create and Publish a local HTTP/TCP service", - "code": "The following code excerpt creates a zeroconf bonjour service and publishes it out to the local network.\nA TCP Socket is used to handle listening for clients and communicating.\n\n``` js\n// Create the Bonjour Service\nvar localService = Ti.Network.createBonjourService({\n name: 'example',\n type: '_test._tcp',\n domain: 'local.'\n});\n\n// Create the socket we'll tie to the service\nvar bonjourSocket = Ti.Network.Socket.createTCP({\n host: '127.0.0.1',\n port: 40401,\n accepted: function (e) {\n // Here you handle clients connecting\n Ti.API.info(\"Listening socket <\" + e.socket + \"> accepted incoming connection <\" + e.inbound + \">\");\n e.inbound.write(Ti.createBuffer({\n value: 'You have been connected to a listening socket.\\r\\n'\n }));\n e.inbound.close();\n },\n error: function (e) {\n // handle errors...\n Ti.API.error(\"Socket <\" + e.socket + \"> encountered error when listening\");\n Ti.API.error(\" error code <\" + e.errorCode + \">\");\n Ti.API.error(\" error description <\" + e.error + \">\");\n }\n});\n\n// Make the socket listen for connections\nbonjourSocket.listen();\n\n// Make the socket accept incoming connections\nbonjourSocket.accept({ timeout: 10000 });\n\n// Publish the service\nlocalService.publish(bonjourSocket, function (err, bool) {\n // Now you can find the service on your network (including using a Ti.Network.BonjourBrowser)\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "publish", - "summary": "Asynchronously publish a Bonjour service to the network. Only works if isLocal is TRUE", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "socket", - "summary": "a TCPSocket object to associate with the Bonjour service.", - "type": "Titanium.Network.Socket.TCP" - }, - { - "name": "callback", - "summary": "Asynchronous callback function to receive the result of the publish operation", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "resolve", - "summary": "Asynchronously resolve a Bonjour service from the network. Must be done before attempting to access the service's socket information, if a remote service. You cannot resolve a locally published service.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "timeout", - "summary": "the timeout for service resolution, in seconds. Optional, default is 120s.", - "type": "Number", - "optional": true - }, - { - "name": "callback", - "summary": "Asynchronous callback function to receive the result of the resolve operation", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stop", - "summary": "Asynchronously halts a currently running attempt to publish or resolve a service.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "callback", - "summary": "Asynchronous callback function to receive the result of the stop operation", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "domain", - "summary": "the domain of the service", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "isLocal", - "summary": "whether or not the service is local to the device", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "name", - "summary": "the name of the service", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "socket", - "summary": "the TCPSocket object that is used to connect to the service", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Network.Socket.TCP" - }, - { - "name": "type", - "summary": "the type of the service", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "proxy" - }, - "Titanium.Network.Cookie": { - "name": "Titanium.Network.Cookie", - "summary": "Cookie object used to manage the system cookie store and HTTP client cookie store.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Cookie.yml", - "description": "Use to create a new `Cookie` object.\nThe following is an example of how to setup and read a cookie on a web view:\n\n``` js\nif (!Date.prototype.toISOString) {\n (function() {\n function pad(number) {\n var r = String(number);\n if (r.length === 1) {\n r = '0' + r;\n }\n return r;\n }\n\n Date.prototype.toISOString = function() {\n return this.getUTCFullYear() +\n '-' + pad(this.getUTCMonth() + 1) +\n '-' + pad(this.getUTCDate()) +\n 'T' + pad(this.getUTCHours()) +\n ':' + pad(this.getUTCMinutes()) +\n ':' + pad(this.getUTCSeconds()) +\n '.' + String((this.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5) +\n 'Z';\n };\n }());\n}\n\nvar cookieListTemplate = {\n properties: {\n accessoryType: Ti.UI.LIST_ACCESSORY_TYPE_DISCLOSURE,\n canEdit: true\n },\n childTemplates: [{\n type: 'Ti.UI.Label',\n bindId: 'cookie domain',\n properties: {\n top: 5,\n left: 10,\n height: 15,\n font: {\n fontFamily: 'Courier New'\n }\n }\n },\n {\n type: 'Ti.UI.Label',\n bindId: 'cookie name',\n properties: {\n top: 25,\n left: 10,\n height: 15,\n font: {\n fontFamily: 'Courier New'\n }\n }\n },\n {\n type: 'Ti.UI.Label',\n bindId: 'cookie path',\n properties: {\n top: 45,\n left: 10,\n height: 15,\n font: {\n fontFamily: 'Courier New'\n }\n }\n },\n {\n type: 'Ti.UI.Label',\n bindId: 'cookie expiryDate',\n properties: {\n top: 65,\n left: 10,\n height: 15,\n font: {\n fontFamily: 'Courier New'\n }\n }\n }\n ]\n};\nvar navigationController = Ti.UI.createNavigationWindow();\n\nfunction LoadCookiesWindow() {\n var close = Ti.UI.createButton({\n title: 'close',\n bottom: 10\n });\n var win = Ti.UI.createWindow({\n // rightNavButton: close\n backgroundColor: '#ccc'\n });\n var nav = Ti.UI.createNavigationWindow({\n window: win\n });\n var webview = Ti.UI.createWebView({\n url: 'http://titaniumsdk.com',\n bottom: 50\n });\n win.add(close);\n win.add(webview);\n close.addEventListener('click', function() {\n nav.close();\n });\n return nav;\n}\n\nfunction MainWindow() {\n\n var listViewData = [];\n var loadCookies = Ti.UI.createButton({\n title: \"cookies+\",\n left: 0,\n bottom: 5\n });\n var createCookies = Ti.UI.createButton({\n title: \"+\",\n right: 0,\n bottom: 5\n });\n\n var win = Ti.UI.createWindow({\n backgroundColor: '#ccc',\n title: 'Cookies for iOS!',\n // rightNavButton: loadCookies,\n // leftNavButton: createCookies\n });\n\n var deleteCookies = Ti.UI.createButton({\n title: 'delete all cookies',\n bottom: 5\n });\n win.add(createCookies);\n win.add(loadCookies);\n win.add(deleteCookies);\n\n deleteCookies.addEventListener('click', function() {\n Ti.Network.removeAllHTTPCookies();\n win.fireEvent('focus');\n });\n\n var listSection = Ti.UI.createListSection({\n items: []\n });\n\n var listView = Ti.UI.createListView({\n sections: [listSection],\n rowHeight: 95,\n bottom: 38,\n templates: {\n 'cookieListTemplate': cookieListTemplate\n }\n });\n win.add(listView);\n\n win.addEventListener('focus', function() {\n var cookies = Ti.Network.getAllHTTPCookies();\n listViewData = [];\n for (var i = 0; i < cookies.length; i++) {\n var obj = {};\n var date = new Date(cookies[i].expiryDate);\n obj['cookie domain'] = {\n text: 'Domain:\\t' + cookies[i].domain\n };\n obj['cookie name'] = {\n text: 'Name:\\t\\t' + cookies[i].name\n };\n obj['cookie path'] = {\n text: 'Path:\\t\\t' + cookies[i].path\n };\n obj['cookie expiryDate'] = {\n text: 'Exp Date:\\t' + (date.getMonth() + 1) + '/' + date.getDate() + '/' + date.getFullYear().toString().substr(2, 2)\n };\n obj['template'] = 'cookieListTemplate'\n obj.cookie = {\n domain: cookies[i].domain,\n name: cookies[i].name,\n path: cookies[i].path\n }\n listViewData.push(obj);\n }\n listSection.items = listViewData;\n });\n listView.addEventListener('itemclick', function(e) {\n var item = e.section.getItemAt(e.itemIndex);\n var cookie = Ti.Network.getHTTPCookies(\n item.cookie.domain,\n item.cookie.path,\n item.cookie.name\n );\n if (!cookie.length) {\n cookie = Ti.Network.getHTTPCookiesForDomain(item.cookie.domain);\n }\n var detailWindow = DetailWindow(cookie[0]);\n navigationController.openWindow(detailWindow);\n });\n listView.addEventListener('delete', function(e) {\n var item = listViewData[e.itemIndex];\n // check if cookie exist with domain, path, and name\n var cookie = Ti.Network.getHTTPCookies(\n item.cookie.domain,\n item.cookie.path,\n item.cookie.name\n );\n if (cookie.length) {\n Ti.Network.removeHTTPCookie(\n item.cookie.domain,\n item.cookie.path,\n item.cookie.name\n );\n } else {\n Ti.Network.removeHTTPCookiesForDomain(item.cookie.domain);\n }\n win.fireEvent('focus');\n });\n loadCookies.addEventListener('click', function() {\n LoadCookiesWindow().open({\n modal: true\n });\n });\n createCookies.addEventListener('click', function() {\n var detailWindow = DetailWindow(null);\n navigationController.openWindow(detailWindow);\n });\n return win;\n}\n\nfunction CustomField(_params) {\n var label = Ti.UI.createLabel({\n left: 10,\n right: 10,\n top: 0,\n text: _params.title,\n font: {\n fontFamily: 'Courier New'\n }\n });\n var field = Ti.UI.createTextArea({\n left: 10,\n right: 10,\n top: 8,\n height: Ti.UI.SIZE,\n value: _params.value,\n borderRadius: 5,\n font: {\n fontFamily: 'Courier New'\n }\n });\n if (_params.edit != undefined) {\n field.editable = _params.edit;\n }\n var container = Ti.UI.createView({\n layout: 'vertical',\n top: 8,\n bottom: 8,\n height: Ti.UI.SIZE\n });\n container.add(label);\n container.add(field);\n return {\n view: container,\n value: function() {\n return field.value.length ? field.value : null;\n },\n blur: function() {\n field.blur();\n }\n };\n}\n\nfunction DetailWindow(_params) {\n var hasCookie = _params != null;\n _params = _params || {};\n var win = Ti.UI.createWindow({\n title: hasCookie ? 'Edit Cookie' : 'Create New Cookie',\n backgroundColor: '#CCC'\n });\n\n var scroll = Ti.UI.createScrollView({\n layout: 'vertical',\n contentWidth: Ti.UI.FILL,\n contentHeight: Ti.UI.SIZE\n });\n\n var name = CustomField({\n title: 'name',\n value: _params.name || ''\n });\n scroll.add(name.view);\n var comment = CustomField({\n title: 'comment',\n value: _params.comment || ''\n });\n scroll.add(comment.view);\n var domain = CustomField({\n title: 'domain',\n value: _params.domain || ''\n });\n scroll.add(domain.view);\n var expiryDate = CustomField({\n title: 'expiryDate',\n value: _params.expiryDate ? new Date(_params.expiryDate).toISOString().replace('Z', '+0000') : ''\n });\n scroll.add(expiryDate.view);\n var path = CustomField({\n title: 'path',\n value: _params.path || ''\n });\n scroll.add(path.view);\n var value = CustomField({\n title: 'value',\n value: _params.value || ''\n });\n scroll.add(value.view);\n var httponly = CustomField({\n title: 'httponly',\n value: _params.httponly === undefined ? '' : _params.httponly,\n edit: false\n });\n scroll.add(httponly.view);\n var secure = CustomField({\n title: 'secure',\n value: _params.secure || ''\n });\n scroll.add(secure.view);\n var version = CustomField({\n title: 'version',\n value: _params.version || ''\n });\n scroll.add(version.view);\n\n win.add(scroll);\n\n function blurAll() {\n name.blur();\n comment.blur();\n domain.blur();\n expiryDate.blur();\n path.blur();\n value.blur();\n httponly.blur();\n secure.blur();\n version.blur();\n }\n\n scroll.addEventListener('touchstart', blurAll);\n scroll.addEventListener('dragstart', blurAll);\n\n var updateButton = Ti.UI.createButton({\n title: hasCookie ? 'Update Cookie' : 'Create Cookie',\n left: 10,\n right: 10,\n top: 20,\n backgroundColor: 'white'\n });\n scroll.add(updateButton)\n\n updateButton.addEventListener('click', function() {\n deleteCookie();\n var cookie = getCookie();\n if (cookie.isValid()) {\n Ti.Network.addHTTPCookie(cookie);\n Ti.UI.createAlertDialog({\n title: 'Success!',\n message: 'Cookie updated in the cookie storage'\n }).show();\n } else {\n Ti.UI.createAlertDialog({\n title: 'Fail!',\n message: 'Cookie was invalid'\n }).show();\n }\n });\n if (hasCookie) {\n var deleteButton = Ti.UI.createButton({\n title: 'Delete Cookie',\n left: 10,\n right: 10,\n top: 20,\n backgroundColor: 'white'\n });\n scroll.add(deleteButton)\n\n deleteButton.addEventListener('click', function() {\n deleteCookie();\n var cookie = getCookie();\n if (cookie.isValid()) {\n navigationController.closeWindow(win);\n } else {\n Ti.UI.createAlertDialog({\n title: 'Fail!',\n message: 'Cookie was invalid'\n }).show();\n }\n });\n }\n\n function deleteCookie() {\n Ti.Network.removeHTTPCookie(\n _params.domain || domain.value(),\n _params.path || path.value(),\n _params.name || name.value()\n );\n }\n\n function getCookie() {\n\n var date = expiryDate.value();\n var newDate = null;\n if (date != null && date.length > 0) {\n newDate = new Date(date);\n }\n var newCookie = Ti.Network.createCookie({\n name: name.value(),\n comment: comment.value(),\n domain: domain.value(),\n expiryDate: expiryDate.value(), // must be a JS Date object!\n // expiryDate : newDate, // must be a JS Date object!\n path: path.value() || '/',\n value: value.value(),\n httponly: httponly.value(), // Cannot set this one! ignored\n secure: secure.value(),\n version: version.value()\n });\n\n return newCookie;\n }\n return win;\n}\n\nnavigationController.window = MainWindow();\nnavigationController.open();\n```\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "isValid", - "summary": "Returns true if the cookie is valid.", - "description": "This method checks if the cookie is valid. For a cookie to be valid the minimum\nproperties required are `name`, `value`, `path` and either `domain` or `originalUrl` (iOS only)\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "comment", - "summary": "The comment describing the purpose of this cookie", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "domain", - "summary": "The domain attribute of the cookie.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "expiryDate", - "summary": "The expiration Date of the cookie.", - "description": "Date format is \"_yyyy_-_MM_-_dd_**T**_HH_**:**_mm_**:**_ss_**.**_SSS_**+0000**\"\n\nThis has been deprecated and removed since 5.0.0 in Android. Please use the property `maxAge`\nfor Cookies in Android.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "maxAge", - "summary": "Sets the Max-Age attribute of a Cookie, in delta-seconds.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "httponly", - "summary": "The httponly attribute of the cookie.", - "description": "On iOS this property cannot be set. On Android, when this property is set to `true`, the cookie will\nbe used only when transmitting HTTP (or HTTPS) requests.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "name", - "summary": "The name of the cookie.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "originalUrl", - "summary": "The original URL attribute of the cookie.", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "path", - "summary": "The path attribute of the cookie.", - "description": "In the system cookie store, the default value of the path is \"/\". In the HTTP client cookie store,\nthe default value of the path is `null`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "secure", - "summary": "The secure attribute of the cookie.", - "description": "Indicates whether this cookie requires a secure connection.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "value", - "summary": "The value of the cookie.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "version", - "summary": "The version of the cookie specification to which this cookie conforms.", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "Titanium.Network.HTTPClient": { - "name": "Titanium.Network.HTTPClient", - "summary": "HTTP client object that (mostly) implements the XMLHttpRequest specification.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml", - "description": "Use to create a new `HTTPClient` object.\n\nAn `HTTPClient` object is intended to be used for a single request. It may be\npossible to re-use an `HTTPClient` object, but this use case is not tested.\n\nThere are three steps in making a typical HTTP request:\n\n* Creating an `HTTPClient` object.\n* Opening the `HTTPClient` object.\n* Sending the request.\n\nBefore opening the request, you must define one or more callbacks to handle\nthe HTTP response, as well as errors, progress updates, and other conditions.\n\nThe `HTTPClient` callbacks operate somewhat differently from other\nTitanium callbacks, in accordance with the XMLHttpRequest specification.\n\nWhen the callbacks are invoked, the `this` value is set to either the\noriginal `HTTPClient` object itself, or a response object that holds all\nof the response-related properties defined for the `HTTPClient` object. So the\ncallbacks can use code like this to access the response values:\n\n``` js\nhttpResponse = this.responseText;\nstatus = this.status;\n```\n\n#### Content-Type Header\n\nWhen sending a POST request with the HTTP client, the Content-Type header is set automatically\ndepending on the platform and data type sent.\n\nOn the Android and iOS platforms:\n\n * If you are sending a JavaScript object, the content type is set to `multipart/form-data`.\n * For all other data types on Android, the content type is set to `application/x-www-form-urlencoded`.\n * For all other data types on iOS, the content type is **NOT** set.\n\nUse the [setRequestHeader](Titanium.Network.HTTPClient.setRequestHeader) method to override the\ndefault Content-Type header.\n\n#### Asynchronous vs. Synchronous HTTP Requests\n\nBy default, the `HTTPClient` makes asynchronous requests. Asynchronous requests do not block\nthe application and use callbacks to process responses when they are received.\n\nSynchronous requests block the execution of the application until it receives a response.\nOn the iOS platform, you can make synchronous requests by setting the optional\n`async` parameter to `false` when calling the [open](Titanium.Network.HTTPClient.open) method.\n\nThe Android platform does not support synchronous requests.\n\n#### TLS Support\n\nTransport Layer Security (TLS) is a protocol that ensures privacy between communicating applications\nand their users on the Internet. When a server and client communicate, TLS ensures that no third\nparty may eavesdrop or tamper with any message. TLS is the successor to the Secure Sockets Layer (SSL).\n\nTo communicate to servers with the TLS protocol, you need to use the same TLS version between\nthe client and server.\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
TLS versions by platform
ProtocolAndroidiOS
TLS 1.01.0+1.0+
TLS 1.14.1+5.0+
TLS 1.24.1+5.0+
TLS 1.310.0+12.2+
\n\nIn Titanium, if a connection with TLS 1.2 fails, Titanium will re-attempt the connection with\nTLS 1.1 and TLS 1.0. By default, TLS 1.2 is attempted first.\n\nOn Android, use the property to set the version of the TLS protocol\nif you know the version the server is running. If you do not know, do not set this property.\n\nOn iOS, add the `NSExceptionMinimumTLSVersion` key in the `` section of `tiapp.xml` to set a minimum TLS version.\nSee following example:\n\n```\nNSAppTransportSecurity\n\n NSExceptionDomains\n \n www.titaniumsdk.com\n \n NSExceptionMinimumTLSVersion\n TLSv1.3\n \n \n\n```\nTitanium will not fallback with a lower TLS version if the `tlsVersion` property in Android or `NSExceptionMinimumTLSVersion` in iOS, is set.\nSetting the TLS version saves time from re-attempting connections with lower TLS versions and\nprovides added security by denying attempts to use lower TLS versions.\n\n#### Caching Data\n\nYou can also use the HTTP client API to cache image, response data or related. A convenient\nway to do so is by setting the property to a path or target\nfile, which will be populated with the response data in a successful case (e.g. in the `onload`\ncallback). For more complex use cases, make sure to check [To.ImageCache](https://github.com/Topener/To.ImageCache/)\nwhich also supports expire-handling and extended cache control.\n\n#### Android Platform Implementation Notes\n\nOn Android, the `HTTPClient` uses its own cookie store which does not share cookies with the\nsystem cookie store used by . Developers can manage their cookies for both\ncookie stores using the methods , ,\n, , ,\n, , ,\n, .\n\n#### Connect to local network in iOS\n\nOn iOS 14 and later, while connecting to local network a prompt will be shown to request user's permission.\nAdd key `NSLocalNetworkUsageDescription` to the `ios plist` section of the tiapp.xml file to show the message on prompt.\nIf this key is not added default message will be shown in prompt.\n\nExample:\n\n``` xml\n\n \n \n \n \n \n NSLocalNetworkUsageDescription\n \n Specify the reason for accessing the local network.\n This appears in the alert dialog when asking the user\n for permission to access local network.\n \n \n \n \n \n\n```\n", - "examples": [ - { - "description": "Simple GET Request", - "code": "The following code excerpt does a simple GET request and logs the response text.\n\n``` js\nvar url = \"http://www.titaniumsdk.com\";\nvar client = Ti.Network.createHTTPClient({\n // function called when the response data is available\n onload : function(e) {\n Ti.API.info(\"Received text: \" + this.responseText);\n alert('success');\n },\n // function called when an error occurs, including a timeout\n onerror : function(e) {\n Ti.API.debug(e.error);\n alert('error');\n },\n timeout : 5000 // in milliseconds\n});\n// Prepare the connection.\nclient.open(\"GET\", url);\n// Send the request.\nclient.send();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "abort", - "summary": "Cancels a pending request.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearCookies", - "summary": "Clears any cookies stored for the host.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "host", - "summary": "The URL of the host/domain to clear cookies for.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getAllResponseHeaders", - "summary": "All of the response headers.", - "description": "Contains a single string, or an empty string if no headers are available.\n\nSee also: [getResponseHeader](Titanium.Network.HTTPClient.getResponseHeader).\n\nIntended to match the `XMLHTTPRequest` [getAllResponseHeaders API](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/getAllResponseHeaders).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "10.0.0", - "name": "iphone" - }, - { - "since": "10.0.0", - "name": "ipad" - }, - { - "since": "10.0.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getResponseHeader", - "summary": "Returns the value of the specified response header.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the header to retrieve.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "open", - "summary": "Opens the request and prepares the connection.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "method", - "summary": "HTTP method for this request, such as 'GET' or 'POST'. 'PATCH' is available on Android from SDK 4.1.0.", - "type": "String" - }, - { - "name": "url", - "summary": "URL for the request.", - "type": "String" - }, - { - "name": "async", - "summary": "Determines whether the request should be made asynchronously. Only used on iOS.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "send", - "summary": "Sends the request.", - "description": "For POST requests, use the `data` parameter to send POST data.\n\nIf you pass a serializable JavaScript object, it is automatically turned into form-encoded\nPOST data. You can also send an arbitrary string or binary data (in the form of a\n).\n\nTo send array data, specify each array element individually as a property of the object.\nFor example, normally, you specify an array in an object as:\n\n``` js\nvar payload = { myArray: [1, 2, 3] };\n```\n\nInstead, for the HTTP client to encode the data correctly, you need to send the data as:\n\n``` js\nvar payload = {\n \"myArray[0]\" : 1,\n \"myArray[1]\" : 2,\n \"myArray[2]\" : 3\n};\n```\n\nOn iOS, you can specify a synchronous request when you call `open` by passing `false` for\nthe `async` parameter. In the case of a synchronous request, `send` blocks until the request\nis complete.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "data", - "summary": "Data to send with a POST request.", - "type": [ - "Object", - "String", - "Titanium.Filesystem.File", - "Titanium.Blob" - ], - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setRequestHeader", - "summary": "Sets the value for the specified request header. Must be called after `open` but before `send`.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the header to set.", - "type": "String" - }, - { - "name": "value", - "summary": "Value to assign to the header. May be `null` to clear a default header value, such as\nX-Requested-With.\n", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "setTimeout", - "deprecated": { - "notes": "Use the property instead.", - "since": "10.0.0", - "removed": "10.0.0" - }, - "summary": "Sets the request timeout.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "timeout", - "summary": "Timeout in milliseconds.", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "DONE", - "summary": "Ready state constant indicating that the request is complete.", - "description": "In this ready state, either the data has been transferred, or an error has occurred.\n\nSee also [readyState](Titanium.Network.HTTPClient.readyState).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "HEADERS_RECEIVED", - "summary": "Ready state constant indicating that response headers have been received.", - "description": "See also [readyState](Titanium.Network.HTTPClient.readyState).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LOADING", - "summary": "Ready state constant indicating that response data is being received from the remote server.\n", - "description": "See also [readyState](Titanium.Network.HTTPClient.readyState).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "OPENED", - "summary": "Ready state constant indicating that the connection has been opened, but the request has\nnot yet been sent.\n", - "description": "See also [readyState](Titanium.Network.HTTPClient.readyState).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "UNSENT", - "summary": "Ready state constant indicating that HTTPClient request has not been opened or sent.", - "description": "See also [readyState](Titanium.Network.HTTPClient.readyState).", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "allResponseHeaders", - "summary": "All of the response headers.", - "description": "Contains a single string, or an empty string if no headers are available.\n\nSee also: [getResponseHeader](Titanium.Network.HTTPClient.getResponseHeader).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "responseHeaders", - "summary": "Returns all the response headers returned with the request.", - "description": "Contains a dictionary of response headers only after the http call has finished.\n\nSee also: [getResponseHeader](Titanium.Network.HTTPClient.getResponseHeader).\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary", - "permission": "read-only" - }, - { - "name": "autoEncodeUrl", - "summary": "Determines whether automatic encoding is enabled for the specified URL.", - "description": "Set to `false` to disable automatic URL-encoding.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "autoRedirect", - "summary": "Determines whether automatic automatic handling of HTTP redirects is enabled.", - "description": "Set to `false` to disable automatic HTTP redirects handling.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "connected", - "summary": "Indicates whether the response was successful.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "connectionType", - "summary": "Connection type, normally either `GET`, `POST` or `PATCH`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "domain", - "summary": "Sets the domain parameter for authentication credentials.", - "description": "Set this parameter when authentication against NTLM domains along with the [username](Titanium.Network.HTTPClient.username)\nand [password](Titanium.Network.HTTPClient.password) properties.\niOS supports NTLM authentication natively.\nAndroid can be extended using the [addAuthFactory](Titanium.Network.HTTPClient.addAuthFactory) method.\nMust be set before calling [open](Titanium.Network.HTTPClient.open).\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "Undefined" - }, - { - "name": "enableKeepAlive", - "summary": "Determines whether the client should attempt to keep a persistent connection.", - "description": "Set to `true` to maintain a persistent connection.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "file", - "summary": "Target local file or file path to receive data.", - "description": "This property can be set anytime prior to calling [send](Titanium.Network.HTTPClient.send).\nThe file must be writable such as the application data directory or temp directory.\n", - "platforms": [ - { - "since": "3.4.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.Filesystem.File" - ] - }, - { - "name": "location", - "summary": "Absolute URL of the request.", - "description": "If the request redirects, this property returns the URL of the redirected request.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ondatastream", - "summary": "Function to be called at regular intervals as the request data is being received.", - "description": "Must be set before calling `open`.\n\nThe `progress` property of the event will contain a value from 0.0-1.0 with the progress of\nthe request. If the progress can not be calculated,\nthe value will be [PROGRESS_UNKNOWN](Titanium.Network.PROGRESS_UNKNOWN).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "onerror", - "summary": "Function to be called upon a error response.", - "description": "Must be set before calling `open`.\nThe `code` property of the callback's argument is -1001 for timed-out requests.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "onload", - "summary": "Function to be called upon a successful response.", - "description": "Must be set before calling `open`.\n\nTo access response data and headers, access the `HTTPClient` object itself (accessible as\n`this` during the callback, or the `source` property of the callback event).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "onreadystatechange", - "summary": "Function to be called for each [readyState](Titanium.Network.HTTPClient.readyState) change.\n", - "description": "Must be set before calling `open`.\n\nWhen the callback is invoked, `this.readyState` is set to one of the\n`Titanium.Network.HTTPClient` ready-state constants,\n[OPENED](Titanium.Network.HTTPClient.OPENED),\n[HEADERS_RECEIVED](Titanium.Network.HTTPClient.HEADERS_RECEIVED),\n[LOADING](Titanium.Network.HTTPClient.LOADING),\nor [DONE](Titanium.Network.HTTPClient.DONE).\n\nDue to the asynchronous nature of the Titanium platform, the internal value of\n[readyState](Titanium.Network.HTTPClient.readyState) might be different from the state change\nfor which the event was fired. To address this discrepancy, the function is now invoked with a\npayload object of type . This is supported on the iOS and Android platforms.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "onsendstream", - "summary": "Function to be called at regular intervals as the request data is being transmitted.", - "description": "Must be set before calling `open`.\n\nThe `progress` property of the event will contain a value from 0.0-1.0 with the progress of\nthe upload.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "password", - "summary": "Sets the password parameter for authentication credentials.", - "description": "Must be set before calling [open](Titanium.Network.HTTPClient.open).", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "Undefined" - }, - { - "name": "readyState", - "summary": "The current ready state of this HTTP request.", - "description": "The ready state describes the current state of the request. The ready state is set to one of\nthe five `Titanium.Network.HTTPClient` ready state constants. A typical HTTP request goes\nthrough the states in this order:\n\n* [UNSENT](Titanium.Network.HTTPClient.UNSENT)\n* [OPENED](Titanium.Network.HTTPClient.OPENED)\n* [HEADERS_RECEIVED](Titanium.Network.HTTPClient.HEADERS_RECEIVED)\n* [LOADING](Titanium.Network.HTTPClient.LOADING)\n* [DONE](Titanium.Network.HTTPClient.DONE)\n\nThe `onreadystatechange` callback is invoked each time the ready state changes.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Network.HTTPClient.UNSENT", - "Titanium.Network.HTTPClient.OPENED", - "Titanium.Network.HTTPClient.HEADERS_RECEIVED", - "Titanium.Network.HTTPClient.LOADING", - "Titanium.Network.HTTPClient.DONE" - ] - }, - { - "name": "responseData", - "summary": "Response data as a `Blob` object.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Blob", - "permission": "read-only" - }, - { - "name": "responseText", - "summary": "Response as text.", - "description": "Set to `null` if an error was received or no data was returned.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "responseDictionary", - "summary": "Response as JSON object.", - "description": "Set to `null` if the content type returned by the server was not a JSON or if the content could not be parsed.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "responseXML", - "summary": "Response object as an XML DOM Document object.", - "description": "Set to `null` if the content type returned by the server was not XML or if the content could not be parsed.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.XML.Document", - "permission": "read-only" - }, - { - "name": "securityManager", - "summary": "The Security Manager for this client.", - "description": "This property **must** be specified during creation. Set this property on the HTTPClient to participate in the authentication and resource management of the connection. See for further information.", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "SecurityManagerProtocol", - "availability": "creation" - }, - { - "name": "status", - "summary": "Response HTTP status code.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "statusText", - "summary": "Human-readable status message associated with the status code.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "timeout", - "summary": "Timeout in milliseconds when the connection should be aborted.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "On iOS, the default is 15000 (15 seconds).\n" - }, - { - "name": "timeoutForResource", - "summary": "The maximum amount of time (in milliseconds) that a resource request should be allowed to take.\n", - "description": "The resource timeout controls how long (in milliseconds) to wait for an entire resource to transfer before giving up.\nThe resource timer starts when the request is initiated and counts until either the request completes or this timeout is reached, whichever comes first.\nFor more detail see [timeoutintervalforresource](https://developer.apple.com/documentation/foundation/nsurlsessionconfiguration/1408153-timeoutintervalforresource?language=objc)\nfrom Apple documentation.\nThis property also applies if is set to `true`.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Number", - "default": "The default is `7*24*60*60*1000` milliseconds (7 days).\n" - }, - { - "name": "waitsForConnectivity", - "summary": "A Boolean value that indicates whether the session should wait for connectivity to become available, or fail immediately.\n", - "description": "Causes tasks to wait for network connectivity to become available, rather than immediately failing\nwith an error when it is not. When waiting for connectivity, the \nproperty does not apply, but the property does.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "username", - "summary": "Sets the username parameter for authentication credentials.", - "description": "Must be set before calling [open](Titanium.Network.HTTPClient.open).", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": "Undefined" - }, - { - "name": "validatesSecureCertificate", - "summary": "Determines how SSL certification validation is performed on connection.", - "description": "On Android, this property is ignored if the `securityManager` property is used to create a custom SSL context and will handle the given URI.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": "False when running in the simulator or on device in testing mode, and true if built for\nrelease in distribution mode.\n" - }, - { - "name": "tlsVersion", - "summary": "Sets the TLS version to use for handshakes.", - "description": "If you experience handshake failures, set this value to a lower version using the TLS\nconstants in . 'undefined', 'null', or unsupported values use the default\nbehavior for that Android versions.\n\nSetting this property disables falling back to lower TLS versions.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Number", - "default": "undefined, behaves as `Ti.Network.TLS_VERSION_1_2`.\n", - "constants": [ - "Titanium.Network.TLS_VERSION_1_0", - "Titanium.Network.TLS_VERSION_1_1", - "Titanium.Network.TLS_VERSION_1_2", - "Titanium.Network.TLS_VERSION_1_3" - ] - }, - { - "name": "cache", - "summary": "Determines whether HTTP responses are cached.", - "description": "If `cache` is set to `true`, requests using this HTTP client will cache their responses\n(respecting headers such as \"no-cache\", \"no-store\", and cache expiry). In this case, repeated\nrequests to the same URL may retrieve the initial response rather than triggering a new\nrequest. The cache is shared between all instances of `HTTPClient`.\n\nCaching should only be enabled for HTTP requests which you expect the result to remain\nconsistent for.\n\nIf `cache` is `false`, any request on this HTTP client will result in a new HTTP request.\n\nThis property must be set before `open` is called.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - } - ], - "subtype": "proxy" - }, - "SecurityManagerProtocol": { - "name": "SecurityManagerProtocol", - "summary": "The protocol that the must implement.", - "extends": "Object", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml", - "description": "The object representing must implement this protocol.\nAssigning the securityManager property to an object that does not implement this protocol will cause an exception to be raised.\nAll methods in this protocol are required.\n", - "methods": [ - { - "name": "willHandleURL", - "summary": "Returns if the security manager will participate in authentication of this end point.", - "description": "The parameter passed to this method is a [NSURL](https://developer.apple.com/documentation/foundation/nsurl?language=objc)\non iOS and a [Uri](https://developer.android.com/reference/android/net/Uri.html) on android.\n\nReturn **true** to participate, **false** to allow default authentication flow.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "url", - "summary": "The Object representing representing the end point of this connection.", - "type": "Object" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "connectionDelegateForUrl", - "summary": "The for this connection.", - "description": "This method is only called if returns true.\nSee for further information.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "url", - "summary": "The [NSURL](https://developer.apple.com/documentation/foundation/nsurl?language=objc) representing the end point of this connection.", - "type": "Object" - } - ], - "returns": { - "type": "APSConnectionDelegate" - } - }, - { - "name": "getTrustManagers", - "summary": "Returns an array of objects implementing the [X509TrustManager](https://developer.android.com/reference/javax/net/ssl/X509TrustManager.html) protocol for the SSL Context.", - "description": "This method is only called if returns true.\n\nReturn null to set up a SSL Context with the default system trust managers.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "proxy", - "summary": "The representing this connection.", - "type": "Object" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getKeyManagers", - "summary": "Returns an array of objects implementing the [X509KeyManager](https://developer.android.com/reference/javax/net/ssl/X509KeyManager.html) protocol for the SSL Context.", - "description": "This method is only called if returns true.\n\nReturn null to set up a SSL Context with the default system key managers.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "proxy", - "summary": "The representing this connection.", - "type": "Object" - } - ], - "returns": { - "type": "Array" - } - } - ] - }, - "APSConnectionDelegate": { - "name": "APSConnectionDelegate", - "summary": "An extension of the [NSURLConnectionDelegate](https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLConnectionDelegate_Protocol/Reference/Reference.html#//apple_ref/occ/intf/NSURLConnectionDelegate) protocol to allow users to participate in authentication and resource management for this HTTPClient.", - "extends": "Object", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml", - "description": "The APSConnectionDelegate protocol is an extension of the NSURLConnectionDelegate protocol.\n\nAlthough all methods in this protocol are optional, the connection delegate must implement at least one of the methods to\nparticipate in the authentication and resource management.\n\nThe deprecated methods as defined by the NSURLConnectionDelegate protocol are not supported.\n\nIn addition to the methods defined in the NSURLConnectionDelegate protocol this protocol defines one additional method.\n\n`-(BOOL)willHandleChallenge:(NSURLAuthenticationChallenge *)challenge forConnection:(NSURLConnection *)connection`.\n\nThis method is called on the connection delegate only if it also implements the\n`connection:willSendRequestForAuthenticationChallenge:` method of the NSURLConnectionDelegate protocol.\nReturn `true` if the connection delegate wants to handle this challenge.\nReturn `false` if the default delegate will handle this challenge.\n\nIf the connection delegate does not implement this method but implements `connection:willSendRequestForAuthenticationChallenge:`, the return\nvalue is assumed to be `true` and all challenges will be forwarded to the connection delegate.\n" - }, - "ReadyStatePayload": { - "name": "ReadyStatePayload", - "summary": "An Object describing the current ready state. See [onreadystatechange](Titanium.Network.HTTPClient.onreadystatechange) for more information.", - "extends": "Object", - "platforms": [ - { - "since": "3.4.2", - "name": "android" - }, - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/HTTPClient.yml", - "properties": [ - { - "name": "readyState", - "summary": "The state for which `onreadystatechange` was invoked. Set to one of `Titanium.Network.HTTPClient` ready-state constants", - "platforms": [ - { - "since": "3.4.2", - "name": "android" - }, - { - "since": "3.4.2", - "name": "iphone" - }, - { - "since": "3.4.2", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium.Network": { - "name": "Titanium.Network", - "summary": "The top level network module.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml", - "description": "The `Network` module is used to access networking related functionality.\n\nFor TCP sockets, see .\n\nThe legacy object is still required\nby the [BonjourBrowser](Titanium.Network.BonjourBrowser) and\n[BonjourService](Titanium.Network.BonjourService) objects.\n\nFor all other socket needs, use .\n\n### App Transport Security\n\nStarting with iOS 9, Apple introduced new security and compatibility guidelines for networking\nand connectivity, which include:\n\n * All connections must support TLS 1.2 or greater, and use forward secrecy ciphers supported by iOS\n * Certificates must use at least a SHA-256 fingerprint with either a 2048-bit or greater RSA key,\n or a 256-bit or greater ECC key\n * Application must be compatible with IPv6 DNS64/NAT64 networks as part of App Store submissions\n\nBecause of the new requirements, Titanium disables the App Transport Security (ATS)\nrequirements, which only includes the TLS and certificate cipher requirements,\nto allow all connections by default.\n\nIf you wish to re-enable ATS, add the `NSAppTransportSecurity` dict to the `ios plist` section\nof the `tiapp.xml` file, then add the `NSAllowArbitraryLoads` key and set it to `false`, indicating\nthat you want to manage your whitelisted URL's yourself.\n\n``` xml\n\n \n \n \n \n NSAppTransportSecurity\n \n NSAllowsArbitraryLoads\n \n \n \n \n \n \n\n```\n\nListed below are other guidelines from Apple.\n\n**Avoid hard-coded IPv4 address literals**\n\nTry not to include hard-coded IPv4 address literals in your application, for example, 127.0.0.1.\n\n**Whitelist URLs**\n\nIf ATS is enabled and the web service you are trying to contact does not support the new security guidelines,\niOS will not allow you to connect to the service. An error will be returned in the network response\nstating the connection failed because it did not meet the ATS policy standards.\n\nTo allow the connection, you will need to add\na `NSAppTransportSecurity` dict to the `ios plist` section of the `tiapp.xml` file.\nIn the `NSAppTransportSecurity` dict, you add the `NSExceptionDomains` dict to whitelist\nspecific domains.\n\nFor more information, see\n[iOS Developer Library: App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW33).\n\nExample:\n\n``` xml\n\n \n \n \n \n NSAppTransportSecurity\n \n \n NSAllowsArbitraryLoads\n \n\n <-- 2) Alternative: Define whitelisted domains -->\n NSExceptionDomains\n \n \n www.foo.com\n \n \n NSExceptionMinimumTLSVersion\n TLSv1.0\n \n NSExceptionRequiresForwardSecrecy\n \n \n NSExceptionAllowsInsecureHTTPLoads\n \n \n \n \n \n \n \n \n\n```\n\n**Test IPV6 DNS64/NAT64**\n\nIf you submit your application to the App Store, you should setup an IPv6 DNS64/NAT64\nnetwork to test your application to verify it is compatible with IPv6.\n\nIf you are running macOS 10.11 or greater, you can use your computer to setup a local IPv6 Wi-Fi\nnetwork, which requires an Internet connection not through Wi-Fi.\n\nTo create the network, from System Preferences, enable Internet sharing with NAT64 network\nenabled to share your Wi-Fi connection.\n\nFor detailed instructions, see\n[Mac Developer Library: Test for IPv6 DNS64/NAT64 Compatibility](https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/NetworkingOverview/UnderstandingandPreparingfortheIPv6Transition/UnderstandingandPreparingfortheIPv6Transition.html#//apple_ref/doc/uid/TP40010220-CH213-SW16).\n", - "events": [ - { - "name": "change", - "summary": "Fired when network connectivity changes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "networkTypeName", - "summary": "New network type as a string.", - "type": "String" - }, - { - "name": "online", - "summary": "Boolean indicating if the device is connected to the network.", - "type": "Boolean" - }, - { - "name": "networkType", - "summary": "New network type", - "type": "Number" - }, - { - "name": "reason", - "summary": "Human-readable text describing the reason for the change.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addHTTPCookie", - "summary": "Adds a cookie to the HTTP client cookie store.\n", - "description": "On iOS, the cookie will override an existing cookie with the same name, domain and path, if any. The cookie's\n`expiryDate` property must be a date later than the creating date, otherwise the cookie will not persist in the\ncookie storage.\nOn Android, any existing cookie with the same domain and name will be replaced with the new cookie. This is a bug\nin [BasicCookieStore](https://developer.android.com/reference/org/apache/http/impl/cookie/BasicClientCookie.html)\nbecause based on `RFC6265`, an existing cookie can be evicted and replaced only when it has the same cookie-name,\ndomain-value and path-value with the new cookie.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "cookie", - "summary": "The cookie to add", - "type": "Titanium.Network.Cookie" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addSystemCookie", - "summary": "Adds a cookie to the system cookie store.\n", - "description": "On Android, uses the system cookie store. Any existing cookie with the same\ndomain, path and name will be replaced with the new cookie.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "cookie", - "summary": "The cookie to add", - "type": "Titanium.Network.Cookie" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createBonjourBrowser", - "summary": "Creates and returns a `BonjourBrowser` object.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "serviceType", - "summary": "Service to search for, must include the protocol type suffix (._tcp).", - "type": "String" - }, - { - "name": "domain", - "summary": "Bonjour service domain to conduct the search in.", - "type": "String" - }, - { - "name": "parameters", - "summary": "A dictionary object of properties defined in .\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Network.BonjourBrowser" - } - }, - { - "name": "createBonjourService", - "summary": "Creates and returns a `BonjourService` object.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "name", - "summary": "Name of the service. Must be a unique identifier for this service type and domain.", - "type": "String" - }, - { - "name": "type", - "summary": "Type of service. Must include the protocol identifier (._tcp).", - "type": "String" - }, - { - "name": "domain", - "summary": "Domain to publish the service in.", - "type": "String" - }, - { - "name": "parameters", - "summary": "Dictionary object of properties defined in .\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Network.BonjourService" - } - }, - { - "name": "decodeURIComponent", - "summary": "Returns a decoded version of a URI encoded value.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "URI encoded input value to be decoded.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "encodeURIComponent", - "summary": "Returns a URI encoded version of the specified URI component.", - "description": "On iOS, this also escapes the following characters, which are allowed in a\nURL but may not be allowed or desirable inside a path component:\n\n```\n!*'();:@+$,/?%#[]=&\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "value", - "summary": "Input value to be encoded.", - "type": "String" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "getHTTPCookies", - "summary": "Gets all the cookies with the domain, path and name matched with the given values from the HTTP client cookie store.\n", - "description": "The domain matching and path matching follow `RFC6265`. If name is null, return all the cookies with the domain and\npath matched.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to get. It is case-insensitive.", - "type": "String" - }, - { - "name": "path", - "summary": "The path of the cookie to get. It is case-sensitive.", - "type": "String" - }, - { - "name": "name", - "summary": "The name of the cookie to get. It is case-sensitive.", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getHTTPCookiesForDomain", - "summary": "Gets all the cookies with the domain matched with the given values from the HTTP client cookie store.\n", - "description": "The domain matching follows `RFC6265`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to get. It is case-insensitive.", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "getSystemCookies", - "summary": "Gets all the cookies with the domain, path and name matched with the given values from the system cookie store.\n", - "description": "On Android, uses the system cookie store. The domain matching and path matching follow `RFC6265`.\nIf name is null, return all the cookies with the domain and path matched. The returned cookies only have their\n[name](Titanium.Network.Cookie.name) and [value](Titanium.Network.Cookie.value) properties returned.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to get. It is case-insensitive.", - "type": "String" - }, - { - "name": "path", - "summary": "The path of the cookie to get. It is case-sensitive.", - "type": "String" - }, - { - "name": "name", - "summary": "The name of the cookie to get. It is case-sensitive.", - "type": "String" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "removeAllHTTPCookies", - "summary": "Removes all the cookies from the HTTP client cookie store.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllSystemCookies", - "summary": "Removes all the cookie from the system client cookie store.\n", - "description": "On Android, uses the system cookie store.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeHTTPCookie", - "summary": "Removes the cookie with the domain, path and name exactly the same as the given values from the HTTP client cookie store.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to remove. It is case-insensitive.", - "type": "String" - }, - { - "name": "path", - "summary": "The path of the cookie to remove. It is case-sensitive.", - "type": "String" - }, - { - "name": "name", - "summary": "The name of the cookie to remove. It is case-sensitive.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeHTTPCookiesForDomain", - "summary": "Removes the cookies with the domain matched with the given values from the HTTP client cookie store.\n", - "description": "The domain matching follows `RFC6265`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to remove. It is case-insensitive.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeSystemCookie", - "summary": "Removes the cookie with the domain, path and name exactly the same as the given values from the system cookie store.\n", - "description": "On Android, uses the system cookie store.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "domain", - "summary": "The domain of the cookie to remove. It is case-insensitive.", - "type": "String" - }, - { - "name": "path", - "summary": "The path of the cookie to remove. It is case-sensitive.", - "type": "String" - }, - { - "name": "name", - "summary": "The name of the cookie to remove. It is case-sensitive.", - "type": "String" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "registerForPushNotifications", - "summary": "Registers for push notifications with the Apple Push Notification Service.", - "description": "Call this method to allow remote push notifications. It should usually be called on application start.\n\n**iOS Notes**:\nBefore calling this method, the application needs to call the [Titanium.App.iOS.registerUserNotificationSettings](Titanium.App.iOS.registerUserNotificationSettings)\nmethod and pass it the notification types to use. Setting the notification types with this\nmethod will have no effect and throws a warning.\n\n**Android Notes**:\nMake sure to also add the `` permission in the `` tag of your tiapp.xml.\nExample:\n\n``` js\nconst win = Ti.UI.createWindow();\nwin.addEventListener(\"open\", function() {\n console.log(\"Is enabled\", Ti.Network.remoteNotificationsEnabled);\n\n Ti.Network.registerForPushNotifications({\n success: (e) => {\n console.log(\"success\", e);\n },\n error: (e) => {\n console.log(\"error\", e);\n }\n });\n});\nwin.open();\n```\nThe permission request will only be shown twice. After that it won't show up again and the user has to go to the app permissions to enable it.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "config", - "summary": "Dictionary specifying push-notification related options.", - "type": "PushNotificationConfig" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "unregisterForPushNotifications", - "summary": "Unregisters the application for push notifications.", - "description": "Per Apple's documentation, it is rarely necessary to call this method. See:\n[unregisterForRemoteNotifications in the UIApplication Class\nReference](https://developer.apple.com/documentation/uikit/uiapplication/1623093-unregisterforremotenotifications)\n\nFor example, calling this method would be required if a new version of\nyour application no longer supports push notifications.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createCookie", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Network.Cookie" - } - }, - { - "name": "createHTTPClient", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Network.HTTPClient" - } - }, - { - "name": "createTCPSocket", - "deprecated": { - "notes": "Use [Titanium.Network.Socket.TCP](Titanium.Network.Socket.TCP) where possible.\n", - "since": "1.7.0", - "removed": "9.0.0" - }, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.Network.TCPSocket" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "NETWORK_LAN", - "summary": "A [networkType](Titanium.Network.networkType) value indicating that the device is\ncommunicating over a local-area network.\n", - "description": "This constant is also a possible value for the `networkType` property of the\n[change](Titanium.Network.change) event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NETWORK_MOBILE", - "summary": "A [networkType](Titanium.Network.networkType) value indicating that the device is\ncommunicating over a mobile network.\n", - "description": "This constant is also a possible value for the `networkType` property of the\n[change](Titanium.Network.change) event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NETWORK_NONE", - "summary": "A [networkType](Titanium.Network.networkType) value indicating that no\nnetwork is available.\n", - "description": "This constant is also a possible value for the `networkType` property of the\n[change](Titanium.Network.change) event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NETWORK_UNKNOWN", - "summary": "A [networkType](Titanium.Network.networkType) value indicating that the\ncurrent network type is unknown.\n", - "description": "This constant is also a possible value for the `networkType` property of the\n[change](Titanium.Network.change) event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NETWORK_WIFI", - "summary": "A [networkType](Titanium.Network.networkType) value indicating that the\ndevice is communicating over a WiFi network.\n", - "description": "This constant is also a possible value for the `networkType` property of the\n[change](Titanium.Network.change) event.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NOTIFICATION_TYPE_ALERT", - "summary": "Constant value for an Alert style push notification.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NOTIFICATION_TYPE_BADGE", - "summary": "Constant value for a Badge style push notification.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NOTIFICATION_TYPE_SOUND", - "summary": "Constant value for a Sound style push notification.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "NOTIFICATION_TYPE_NEWSSTAND", - "summary": "Constant value for a Newsstand style push notification. Only available on iOS 5 and later", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TLS_VERSION_1_0", - "summary": "Constant value specifying TLS version 1.0 for SSL.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "1.8.0.1", - "name": "iphone" - }, - { - "since": "1.8.0.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TLS_VERSION_1_1", - "summary": "Constant value specifying TLS version 1.1 for SSL.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "1.8.0.1", - "name": "iphone" - }, - { - "since": "1.8.0.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TLS_VERSION_1_2", - "summary": "Constant value specifying TLS version 1.2 for SSL.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "1.8.0.1", - "name": "iphone" - }, - { - "since": "1.8.0.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TLS_VERSION_1_3", - "summary": "Constant value specifying TLS version 1.3 for SSL.", - "platforms": [ - { - "since": "8.3.0", - "name": "android" - }, - { - "since": "8.3.0", - "name": "iphone" - }, - { - "since": "8.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PROGRESS_UNKNOWN", - "summary": "Constant value specifying that the progress of a download can not be calculated.", - "platforms": [ - { - "since": "3.5.0", - "name": "android" - }, - { - "since": "3.5.0", - "name": "iphone" - }, - { - "since": "3.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "allHTTPCookies", - "summary": "A list of all cookies in the cookie storage.", - "platforms": [ - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "networkType", - "summary": "Network type value as a constant.", - "description": "One of the `NETWORK` constants defined in .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Network.NETWORK_LAN", - "Titanium.Network.NETWORK_MOBILE", - "Titanium.Network.NETWORK_NONE", - "Titanium.Network.NETWORK_UNKNOWN", - "Titanium.Network.NETWORK_WIFI" - ] - }, - { - "name": "networkTypeName", - "summary": "Network type as a String. Returns one of `NONE`, `WIFI`, `LAN`, `MOBILE`, or `UNKNOWN`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "online", - "summary": "Boolean value indicating if the device is connected to the network.", - "description": "The `online` property is `true` if the device has network access via WiFi,\nLAN, or mobile/cellular network.\n\nNote that if the device is connected to a private network without Internet access,\nthen this property will be `true` as well. This means you cannot assume the device\nhas Internet access if it's connected to the network.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "remoteDeviceUUID", - "summary": "Remote device UUID if the device is registered with the Apple Push Notification\nService, or null if it is not registered.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "remoteNotificationTypes", - "summary": "Array of push notification type constants enabled for the application.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "permission": "read-only" - }, - { - "name": "remoteNotificationsEnabled", - "summary": "Indicates whether push notifications have been enabled using\n[registerForPushNotifications](Titanium.Network.registerForPushNotifications).\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - } - ] - }, - "PushNotificationConfig": { - "name": "PushNotificationConfig", - "summary": "Simple object for specifying push notification options to\n[registerForPushNotifications](Titanium.Network.registerForPushNotifications).\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml", - "properties": [ - { - "name": "types", - "summary": "Array of `NOTIFICATION_TYPE` constants that the application would like to receive.", - "description": "Setting the `types` property with the method has no effect.\n\nUse the method to register the notification types to receive.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "constants": [ - "Titanium.Network.NOTIFICATION_TYPE_ALERT", - "Titanium.Network.NOTIFICATION_TYPE_BADGE", - "Titanium.Network.NOTIFICATION_TYPE_SOUND", - "Titanium.Network.NOTIFICATION_TYPE_NEWSSTAND" - ] - }, - { - "name": "success", - "summary": "Callback function called when the push registration is successfully completed.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "error", - "summary": "Callback function called when an error occurs during registration.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "callback", - "summary": "Callback function invoked upon receiving a new push notification.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - } - ] - }, - "PushNotificationSuccessArg": { - "name": "PushNotificationSuccessArg", - "summary": "A simple object passed to the\n[registerForPushNotifications](Titanium.Network.registerForPushNotifications) success callback.\n", - "extends": "SuccessResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `true`.", - "description": "Returns `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0.", - "description": "Error code will be 0.", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "type", - "summary": "The value of this string is always \"remote\".", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "deviceToken", - "summary": "The device token which this device was registered for.", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "PushNotificationErrorArg": { - "name": "PushNotificationErrorArg", - "summary": "A simple object passed to the\n[registerForPushNotifications](Titanium.Network.registerForPushNotifications) error callback.\n", - "extends": "FailureResponse", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `false`.", - "description": "Returns `false`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "May be undefined.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "FailureResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns a non-zero value.", - "description": "If the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "type", - "summary": "The value of this string is always \"remote\".", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ] - }, - "PushNotificationData": { - "name": "PushNotificationData", - "summary": "A simple object representing a push notification.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Network.yml", - "properties": [ - { - "name": "data", - "summary": "The `userinfo` dictionary passed to the Apple Push Notification Service.", - "description": "For more information, see the following item in the iOS Developer Library:\n\n[`application:didReceiveRemoteNotification:fetchCompletionHandler` in the UIApplicationDelegate Protocol\nReference](https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623013-application)\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Dictionary" - }, - { - "name": "inBackground", - "summary": "Boolean indicating if notification was received while app was in background.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - } - ] - }, - "Titanium.Network.Socket": { - "name": "Titanium.Network.Socket", - "summary": "Socket module, used for creating sockets.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/Socket.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createTCP", - "summary": "Returns a new TCP socket object.", - "description": "Takes a dictionary containing properties defined in . \nSome properties are only needed based on whether the socket will be a connecting \n(client) socket or a listening (server) socket.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Creation parameters.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "summary": "New TCP socket.", - "type": "Titanium.Network.Socket.TCP" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "INITIALIZED", - "summary": "State value representing an initialized socket.", - "description": "The initial state of a newly-created socket.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CONNECTED", - "summary": "State value representing a connected socket.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LISTENING", - "summary": "State value representing a socket that is listening for connections.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "CLOSED", - "summary": "State value representing a closed socket.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ERROR", - "summary": "State value indicating an error has occurred on the socket.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "Titanium.Network.Socket.TCP": { - "name": "Titanium.Network.Socket.TCP", - "summary": "TCP socket that implements the `Titanium.IOStream` interface.", - "extends": "Titanium.IOStream", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml", - "description": "Most socket operations are asynchronous. When you create a socket, you can define\ncallback functions to receive the results of API calls, as well as to handle incoming\ndata.\n\nFor example, for a client-side socket, you define\n[connected](Titanium.Network.Socket.TCP.connected) and\n[error](Titanium.Network.Socket.TCP.error) callback functions.\n\nTo connect to a remote host, call the socket's\n[connect](Titanium.Network.Socket.TCP.connect) method. If the socket connects\nsuccessfully, your `connected` callback is invoked, and you can send and receive data\non the socket. If the socket connection fails, your `error` callback is invoked.\n\nAfter a socket is connected, you can access it like any other .\nNote that the socket's `read` and `write` methods may block, so in most cases\nyou should use the asynchronous [read](Titanium.Stream.read), [write](Titanium.Stream.write)\nand [pump](Titanium.Stream.pump) methods provided by the module,\nrather than using the socket object's `read` and `write` methods directly.\n\nA familiarity with the basics of BSD socket programming is recommended before using\nsockets with Titanium.\n\nUse the method to create a TCP socket.\n", - "examples": [ - { - "description": "Simple Socket IO using Stream.pump", - "code": "The following example uses the [pump](Titanium.Stream.pump) method from the \nmodule to read data from a socket. The `pump` method registers a callback that is\ncalled repeatedly to process incoming data from the socket.\n\n``` js\nvar socket = Ti.Network.Socket.createTCP({\n host: 'blog.example.com', port: 80,\n connected: function (e) {\n Ti.API.info('Socket opened!');\n Ti.Stream.pump(e.socket, readCallback, 1024, true);\n Ti.Stream.write(socket, Ti.createBuffer({\n value: 'GET http://blog.example.com/index.html HTTP/1.1\\r\\n\\r\\n'\n }), writeCallback);\n },\n error: function (e) {\n Ti.API.info('Error (' + e.errorCode + '): ' + e.error);\n },\n});\nsocket.connect();\n\nfunction writeCallback(e) {\n Ti.API.info('Successfully wrote to socket.');\n}\n\nfunction readCallback(e) {\n if (e.bytesProcessed == -1)\n {\n // Error / EOF on socket. Do any cleanup here.\n ...\n }\n try {\n if(e.buffer) {\n var received = e.buffer.toString();\n Ti.API.info('Received: ' + received);\n } else {\n Ti.API.error('Error: read callback called with no buffer!');\n }\n } catch (ex) {\n Ti.API.error(ex);\n }\n}\n```\n" - }, - { - "description": "Listening Socket Example", - "code": "The following sample shows a trivial example of using a listening\nsocket. In this case, the application simply sends messages to itself,\nusing the loopback address.\n\n``` js\n// Hostname to listen on/connect to. Here we use the loopback\n// address. iOS also supports Ti.Platform.address (the address of\n// the WiFi interface).\n// Android supports only the loopback address.\n\nvar hostname = '127.0.0.1';\n\nvar clientSocket = Ti.Network.Socket.createTCP({\n host : hostname,\n port : 40404,\n connected : function(e) {\n Ti.API.info('Client socket connected!');\n Ti.Stream.pump(e.socket, pumpCallback, 1024, true);\n e.socket.write(Ti.createBuffer({\n value : 'A message from a connecting socket.'\n }));\n },\n error : function(e) {\n Ti.API.info('Error (' + e.errorCode + '): ' + e.error);\n }\n});\n\nfunction writeCallback(e) {\n Ti.API.info('Successfully wrote to socket.');\n}\n\nfunction pumpCallback(e) {\n // Has the remote socket closed its end?\n if (e.bytesProcessed < 0) {\n Ti.API.info(\"Closing client socket.\");\n clientSocket.close();\n return;\n }\n try {\n if(e.buffer) {\n var received = e.buffer.toString();\n Ti.API.info('Received: ' + received);\n } else {\n Ti.API.error('Error: read callback called with no buffer!');\n }\n } catch (ex) {\n Ti.API.error(ex);\n }\n}\n\n// Create a socket and listen for incoming connections\nvar listenSocket = Ti.Network.Socket.createTCP({\n host : hostname,\n port : 40404,\n accepted : function(e) {\n // This where you would usually store the newly-connected socket, e.inbound\n // so it can be used for read / write operations elsewhere in the app.\n // In this case, we simply send a message then close the socket.\n Ti.API.info(\"Listening socket <\" + e.socket + \"> accepted incoming connection <\" + e.inbound + \">\");\n e.inbound.write(Ti.createBuffer({\n value : 'You have been connected to a listening socket.\\r\\n'\n }));\n e.inbound.close();\n // close the accepted socket\n\n },\n error : function(e) {\n Ti.API.error(\"Socket <\" + e.socket + \"> encountered error when listening\");\n Ti.API.error(\" error code <\" + e.errorCode + \">\");\n Ti.API.error(\" error description <\" + e.error + \">\");\n }\n});\n// Starts the socket listening for connections, does not accept them\nlistenSocket.listen();\nTi.API.info(\"Listening now...\");\n\n// Tells socket to accept the next inbound connection. listenSocket.accepted gets\n// called when a connection is accepted via accept()\nTi.API.info(\"Calling accept.\");\nlistenSocket.accept({\n timeout : 10000\n});\n\n// Call connect after a short timeout to ensure the listening socket is ready to go.\nTi.API.info(\"Setting timer to connect.\");\nsetTimeout(function(e)\n{\n Ti.API.info(\"Calling connect on client socket.\");\n clientSocket.connect();\n}, 500);\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "read", - "summary": "Reads data from this stream into a buffer.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is written into the buffer starting at\nposition `offset`. Data is read from this stream until one of the following occurs:\n\n* the end of this stream is reached\n* the end of the buffer is reached\n* a total of `length` bytes have been read from the stream\n\nIf `offset` and `length` are omitted, data is written starting at the beginning\nof the buffer.\n\nWhen called synchronously: returns the number of bytes read, or -1 if the end of\nstream was reached before any data was read.\n\nReturns 0 when called asynchronously.\n\nThrows an exception on error. For example, if the `offset` value is past\nthe last byte of `buffer`.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to read stream data into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset into the buffer to start writing stream data.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to read.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes read.", - "type": "Number" - } - }, - { - "name": "write", - "summary": "Writes data from a buffer to this stream.", - "description": "Takes an optional `resultsCallback` function as the last argument. If specified,\nthe operation is done asynchronously. If no callback is passed in, the\noperation is done synchronously.\n\nIf `offset` and `length` are specified, data is read from the buffer starting at\n`offset`. Bytes are read from the buffer and written to the stream until:\n\n* the end of the buffer is reached\n* `length` bytes have been written\n* the stream returns an error\n\nIf `offset` and `length` are omitted, all of the data in the buffer is written to\nthis stream.\n\nReturns the number of bytes actually written when called synchronously.\n\nReturns 0 when called asynchronously.\n\nThrows an exception if an error is encountered.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "parameters": [ - { - "name": "buffer", - "summary": "Buffer to write to this stream.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset in the buffer of the first byte to write to the stream.\nIf specified, `length` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Maximum number of bytes to write to the stream.\nIf specified, `offset` must also be specified.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "summary": "Number of bytes written.", - "type": "Number" - } - }, - { - "name": "isWritable", - "summary": "Indicates whether this stream is writable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is writable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "isReadable", - "summary": "Indicates whether this stream is readable.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.IOStream", - "returns": { - "summary": "True if stream is readable, false otherwise.", - "type": "Boolean" - } - }, - { - "name": "close", - "summary": "Closes a socket.", - "description": "Throws exception if the socket is not in a [CONNECTED](Titanium.Network.Socket.CONNECTED)\nor [LISTENING](Titanium.Network.Socket.LISTENING) state. Blocking.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "connect", - "summary": "Attempts to connect the socket to its host/port.", - "description": "Throws an exception if the socket is in a [CONNECTED](Titanium.Network.Socket.CONNECTED)\nor [LISTENING](Titanium.Network.Socket.LISTENING) state.\nThrows an exception if a valid host and port has not been set on this socket.\n\nNon-blocking; connection attempts are asynchronous.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "listen", - "summary": "Attempts to start listening on the socket's host/port.", - "description": "The `listen` call will attempt to listen on the specified host and/or port\nproperty for the socket if they are set.\n\nNon-blocking; may return before the socket is fully open and listening.\n\nIf the socket is already in a [LISTENING](Titanium.Network.Socket.LISTENING) or\n[CONNECTED](Titanium.Network.Socket.CONNECTED) state, `listen` throws an exception\nand sets the socket state to [ERROR](Titanium.Network.Socket.ERROR), but does\n**not** fire the error callback.\n\nAny error encountered after the socket starts listening results in the error\ncallback being fired.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "accept", - "summary": "Tells a [LISTENING](Titanium.Network.Socket.LISTENING) socket to accept a connection request at the top of a listener's request queue when one becomes available.", - "description": "Non-blocking; if there are no connections in the queue, sets a flag so that\nthe socket accepts the next incoming connection immediately.\n\nTakes an argument, an object which assigns options to the new\nconnection. If the socket is already flagged to accept the next connection,\nthe existing accept options will be updated to use the newly specified `options`\nobject.\n\nThe `accepted` callback is called when a new connection is accepted as a result of\ncalling `accept`. The callback argument holds a reference to a new socket,\nrepresenting the accepted connection.\n\nNote that the connected callback is **not** called on the newly created socket.\nThis is because the socket is created in the\n[CONNECTED](Titanium.Network.Socket.CONNECTED) state, so it never transitions\nto the `CONNECTED` state.\n\nThrows an exception if called on a socket that is not in a\n[LISTENING](Titanium.Network.Socket.LISTENING) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Options to be set on next accepted socket.", - "type": "AcceptDict" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "host", - "summary": "The host to connect to or listen on.", - "description": "Can only be modified when this socket is in the [INITIALIZED](Titanium.Network.Socket.INITIALIZED) state.\n\nSupports both IPv4 and IPv6 addresses.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "port", - "summary": "The port to connect to or listen on.", - "description": "Can only be modified when this socket is in the [INITIALIZED](Titanium.Network.Socket.INITIALIZED) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "secure", - "summary": "Creates a secure socket.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "listenQueueSize", - "summary": "Max number of pending incoming connections to be allowed when the socket is in the [LISTENING](Titanium.Network.Socket.LISTENING) state.", - "description": "Any incoming connections received while the max number of pending connections has\nbeen reached will be rejected.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "timeout", - "summary": "Timeout, in milliseconds, for `connect` and all `write` operations.", - "description": "Can only be modified when this socket is in the [INITIALIZED](Titanium.Network.Socket.INITIALIZED) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "connected", - "summary": "Callback to be fired when the socket enters the \"connected\" state.", - "description": "Only invoked following a successful [connect](Titanium.Network.Socket.TCP.connect)\ncall.\n\nCan only be modified when this socket is in the [INITIALIZED](Titanium.Network.Socket.INITIALIZED) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "error", - "summary": "Callback to be fired when the socket enters the [ERROR](Titanium.Network.Socket.ERROR) state.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "accepted", - "summary": "Callback to be fired when a listener accepts a connection.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - }, - { - "name": "state", - "summary": "Current state of the socket.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Network.Socket.INITIALIZED", - "Titanium.Network.Socket.CONNECTED", - "Titanium.Network.Socket.LISTENING", - "Titanium.Network.Socket.CLOSED", - "Titanium.Network.Socket.ERROR" - ] - } - ], - "subtype": "proxy" - }, - "ConnectedCallbackArgs": { - "name": "ConnectedCallbackArgs", - "summary": "Argument object passed to the [connected](Titanium.Network.Socket.TCP.connected) callback when the socket connects.", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml", - "description": "Only invoked following a successful [connect](Titanium.Network.Socket.TCP.connect)\ncall.\n", - "properties": [ - { - "name": "socket", - "summary": "Socket instance that has been connected.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Network.Socket.TCP" - } - ] - }, - "ErrorCallbackArgs": { - "name": "ErrorCallbackArgs", - "summary": "Object passed to the error callback when the socket enters the [ERROR](Titanium.Network.Socket.ERROR) state.", - "extends": "FailureResponse", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded. Returns `false`.", - "description": "Returns `false`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "May be undefined.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "FailureResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns a non-zero value.", - "description": "If the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "socket", - "summary": "Socket that experienced the error.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Network.Socket.TCP" - } - ] - }, - "AcceptedCallbackArgs": { - "name": "AcceptedCallbackArgs", - "summary": "Argument object passed to the [accepted](Titanium.Network.Socket.TCP.accepted)\ncallback when a listener accepts a connection.\n", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml", - "properties": [ - { - "name": "socket", - "summary": "Socket which received the connection.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Network.Socket.TCP" - }, - { - "name": "inbound", - "summary": "Socket which represents the inbound connection.", - "description": "This should be considered a 'connected' socket and is created in\nthe [CONNECTED](Titanium.Network.Socket.CONNECTED) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Network.Socket.TCP" - } - ] - }, - "AcceptDict": { - "name": "AcceptDict", - "summary": "Options object for the [accept](Titanium.Network.Socket.TCP.accept) method.", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/Socket/TCP.yml", - "description": "Simple object that defines properties to be set on the next accepted socket.\n", - "properties": [ - { - "name": "timeout", - "summary": "Timeout, in milliseconds, for all `write` operations.", - "description": "Can only be modified when this socket is in the\n[INITIALIZED](Titanium.Network.Socket.INITIALIZED) state.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "error", - "summary": "Callback to be fired when the socket enters the [ERROR](Titanium.Network.Socket.ERROR) state.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Callback" - } - ] - }, - "Titanium.Network.TCPSocket": { - "name": "Titanium.Network.TCPSocket", - "summary": "The TCPSocket instance returned from . This object\nrepresents a socket which either listens locally on the device for connections,\nor connects to a remote machine.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Network/TCPSocket.yml", - "deprecated": { - "notes": "Use [Titanium.Network.Socket.TCP](Titanium.Network.Socket.TCP) where possible.\n", - "since": "1.7.0", - "removed": "9.0.0" - }, - "description": "Sockets are nontrivial; it is recommended that anyone using them be familiar with the basics of BSD sockets. All sockets use TCP connections, and are asynchronous for read operations, so your program should be ready to receive 'read' events at any point. Socket references cannot be transferred to socket objects, and vice-versa - socket references are an internal mechanism which is used only to determine which sockets to send data to and read data from. For listening sockets, it is highly recommended that you use the constant as the host name. If a window containing a socket is closed, the socket MUST be closed also unless you intend to continue to receive data, otherwise the socket will consume resources (and potentially cause conflicts with opening the window again, if a listener) until the program is restarted. Be aware of the differences between the listen() and connect() functions; attempting to use one when you mean the other may result in errors, unpredictable behavior, or both.", - "events": [ - { - "name": "read", - "summary": "new data was read off the socket", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "properties": [ - { - "name": "from", - "summary": "the reference for the socket that data was retrieved from", - "type": "Number" - }, - { - "name": "data", - "summary": "a blob representing the data read, can be interpreted via toString", - "type": "Titanium.Blob" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "readError", - "summary": "an error occurred when reading", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates a successful operation. Returns `false`.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. May be undefined.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nIf the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "writeError", - "summary": "an error occurred when writing", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "properties": [ - { - "name": "success", - "summary": "Indicates a successful operation. Returns `false`.", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned. May be undefined.", - "type": "String" - }, - { - "name": "code", - "summary": "Error code.\nIf the error was generated by the operating system, that system's error value\nis used. Otherwise, this value will be -1.\n", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "close", - "summary": "close the socket", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "connect", - "summary": "connect the socket to a TCP server", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "listen", - "summary": "set up the socket to receive connections", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "write", - "summary": "write data to the socket, if the mode is WRITE_MODE or READ_WRITE_MODE", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "parameters": [ - { - "name": "data", - "summary": "either a string or blob object representing the data to be transferred", - "type": [ - "Object", - "String" - ] - }, - { - "name": "sendTo", - "summary": "the socket reference to send the data to. Default is to send to all connected sockets", - "type": "Number" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "hostName", - "summary": "the host name to connect to. Must be or an identifier for the local device in order to listen", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "String" - }, - { - "name": "isValid", - "summary": "whether or not the socket is valid", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "Boolean" - }, - { - "name": "mode", - "summary": "the socket's mode", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "Number" - }, - { - "name": "port", - "summary": "the port to connect/listen on", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "Number" - }, - { - "name": "stripTerminator", - "summary": "strip terminating null character when sending string data; default is false", - "platforms": [ - { - "since": "1.2.0", - "name": "iphone" - }, - { - "since": "1.2.0", - "name": "ipad" - } - ], - "type": "Boolean" - } - ], - "subtype": "proxy" - }, - "Titanium.Platform.Android": { - "name": "Titanium.Platform.Android", - "summary": "The Android-specific Platform module, used to access the device's platform-related functionality.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Android/Android.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "API_LEVEL", - "summary": "Android API level identifier of the Operating System.", - "description": "See the official Android Developers documentation for more information about \n[API levels](https://developer.android.com/guide/appendix/api-levels.html).\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PHYSICAL_SIZE_CATEGORY_LARGE", - "summary": "Constant to indicate that the physical size category of the current device/emulator is large", - "description": "See the official Android Developers documentation for more information about\n[large screen sizes](https://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_LARGE)\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PHYSICAL_SIZE_CATEGORY_NORMAL", - "summary": "Constant to indicate that the physical size category of the current device/emulator is normal", - "description": "See the official Android Developers documentation for more information about\n[normal screen sizes](https://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_NORMAL)\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PHYSICAL_SIZE_CATEGORY_SMALL", - "summary": "Constant to indicate that the physical size category of the current device/emulator is small", - "description": "See the official Android Developers documentation for more information about\n[small screen sizes](https://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_SMALL)\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PHYSICAL_SIZE_CATEGORY_UNDEFINED", - "summary": "Constant to indicate that the physical size category of the current device/emulator is undefined", - "description": "See the official Android Developers documentation for more information about\n[undefined screen sizes](https://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_UNDEFINED)\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PHYSICAL_SIZE_CATEGORY_XLARGE", - "summary": "Constant to indicate that the physical size category of the current device/emulator is extra large", - "description": "See the official Android Developers documentation for more information about\n[extra large screen sizes](https://developer.android.com/reference/android/content/res/Configuration.html#SCREENLAYOUT_SIZE_XLARGE)\n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "physicalSizeCategory", - "summary": "The physical size category of the Android device or emulator. \n", - "platforms": [ - { - "since": "1.8.2", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Platform.Android.PHYSICAL_SIZE_CATEGORY_LARGE", - "Titanium.Platform.Android.PHYSICAL_SIZE_CATEGORY_NORMAL", - "Titanium.Platform.Android.PHYSICAL_SIZE_CATEGORY_SMALL", - "Titanium.Platform.Android.PHYSICAL_SIZE_CATEGORY_UNDEFINED", - "Titanium.Platform.Android.PHYSICAL_SIZE_CATEGORY_XLARGE" - ] - } - ] - }, - "Titanium.Platform.DisplayCaps": { - "name": "Titanium.Platform.DisplayCaps", - "summary": "The Display Caps object returned by the property.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/DisplayCaps.yml", - "description": "On iPhone and iPod devices with retina display, the `density` property is `high` and the `dpi`\nproperty is `320`. For other iPhone and iPod devices, `density` is `medium` and `dpi` is `160`.\n\nOn iPad devices with retina display, the `density` property is `high` and the `dpi`\nproperty is `260`. For other iPad devices, `density` is `medium` and `dpi` is `130`.\n\nNote that Xcode versions prior to 4.3.1 do not have the correct tools to detect the iPad 3\nretina display. Apps must be built with Xcode 4.3.1 or later to detect iPad 3 retina display.\n\nNote that the `displayCaps` property begins with a lowercase letter, which differentiates it\nfrom the `DisplayCaps` object that it returns. Refer to the example to understand how it should\nbe called.\n\nOn Android you have to make sure that the Activity is created before you fetch the displayCaps\nvalues. Use the window `onOpen` event or `win.activity.onCreate = () => {};`.\n", - "examples": [ - { - "description": "System Display Information", - "code": "Output the display properties to the system log.\n\n``` js\nTi.API.info('Ti.Platform.displayCaps.density: ' + Ti.Platform.displayCaps.density);\nTi.API.info('Ti.Platform.displayCaps.dpi: ' + Ti.Platform.displayCaps.dpi);\nTi.API.info('Ti.Platform.displayCaps.platformHeight: ' + Ti.Platform.displayCaps.platformHeight);\nTi.API.info('Ti.Platform.displayCaps.platformWidth: ' + Ti.Platform.displayCaps.platformWidth);\nif((Ti.Platform.osname === 'iphone')||(Ti.Platform.osname === 'ipad')||(Ti.Platform.osname === 'android')){\n Ti.API.info('Ti.Platform.displayCaps.logicalDensityFactor: ' + Ti.Platform.displayCaps.logicalDensityFactor);\n}\nif(Ti.Platform.osname === 'android'){\n Ti.API.info('Ti.Platform.displayCaps.xdpi: ' + Ti.Platform.displayCaps.xdpi);\n Ti.API.info('Ti.Platform.displayCaps.ydpi: ' + Ti.Platform.displayCaps.ydpi);\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "density", - "summary": "Logical density of the display.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "dpi", - "summary": "Display density expressed as dots-per-inch.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "logicalDensityFactor", - "summary": "Logical density of the display, as a scaling factor for the Density Independent Pixel (dip)\nunit.\n", - "description": "One dip is one pixel on a 160dpi display, approximately, with a 240x320, 1.5\"x2\" display\nproviding a baseline. For example, for a 160dpi display, this value will be 1, and for 120dpi,\nit will be .75.\n\nThis value does not precisely follow the real display size, as given by `xdpi` and `ydpi`,\nbut instead is used to scale the size of the overall UI in steps based on changes in the\ndisplay dpi. For example, a 240x320 screen will have a density of 1, whether its width is\n1.8\" or 1.3\". However, if the resolution is increased to 320x480 but the display remains\n1.5\"x2\" then the density would be increased to about 1.5.\n\nOn iOS devices, this property returns 1, 2 and 3 for @1x, @2x and @3x respectively.\nNote for iPhone 6+, this value is 3.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "3.4.1", - "name": "iphone" - }, - { - "since": "3.4.1", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "platformHeight", - "summary": "Absolute height of the display in relation to UI orientation. Measured in platform-specific\nunits; pixels on Android and density-independent pixels (dip) on iOS.\n", - "description": "This property depends on the orientation of the UI, rather than the physical orientation of\nthe device. While these may often be one in the same, it is not necessarily the case when\norientation is restricted by . See example for\nclarification.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Platform Width and Height", - "code": "Create a window and limit it to portrait mode. Start the app and observe that the platform\nwidth and height is output to the log. Change the physical orientation of the device and\nclick the window to test again. Note that the logged information relates to the UI rather\nthan the physical orientation of the device.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to output UI dimensions',\n backgroundColor: 'white',\n orientationModes: [ Titanium.UI.PORTRAIT ], // UI restricted to portrait mode\n fullscreen: false,\n exitOnClose: true\n});\n\nvar label = Ti.UI.createLabel({\n text:'Hello world'\n});\nwin.add(label);\n\nfunction logDisplayCaps(){\n Ti.API.info('Width x Height: ' + Ti.Platform.displayCaps.platformWidth + ' x ' + Ti.Platform.displayCaps.platformHeight);\n}\n\nwin.addEventListener('click',function(e){\n // as the UI orientation is restricted by orientationModes, this will only ever\n // output the dimensions of the UI in portrait mode. For example, 480 x 800 for the\n // Android device tested\n logDisplayCaps();\n});\n\nwin.open();\n\nlogDisplayCaps();\n```\n" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "platformWidth", - "summary": "Absolute width of the display in relation to UI orientation. Measured in platform-specific\nunits; pixels on Android and density-independent pixels (dip) on iOS.\n", - "description": "This property depends on the orientation of the UI, rather than the physical orientation of\nthe device. While these may often be one in the same, it is not necessarily the case when\norientation is restricted by . See example for\nclarification.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Platform Width and Height", - "code": "Create a window and limit it to portrait mode. Start the app and observe that the platform\nwidth and height is output to the log. Change the physical orientation of the device and\nclick the window to test again. Note that the logged information relates to the UI rather\nthan the physical orientation of the device.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to output UI dimensions',\n backgroundColor: 'white',\n orientationModes: [ Titanium.UI.PORTRAIT ], // UI restricted to portrait mode\n fullscreen: false,\n exitOnClose: true\n});\n\nvar label = Ti.UI.createLabel({\n text:'Hello world'\n});\nwin.add(label);\n\nfunction logDisplayCaps(){\n Ti.API.info('Width x Height: ' + Ti.Platform.displayCaps.platformWidth + ' x ' + Ti.Platform.displayCaps.platformHeight);\n}\n\nwin.addEventListener('click',function(e){\n // as the UI orientation is restricted by orientationModes, this will only ever\n // output the dimensions of the UI in portrait mode. For example, 480 x 800 for the\n // Android device tested\n logDisplayCaps();\n});\n\nwin.open();\n\nlogDisplayCaps();\n```\n" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "xdpi", - "summary": "Physical pixels per inch of the display in the X dimension.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "ydpi", - "summary": "Physical pixels per inch of the display in the Y dimension.", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - } - ], - "subtype": "proxy" - }, - "Titanium.Platform": { - "name": "Titanium.Platform", - "summary": "The top-level Platform module. The Platform module is used to access the device's platform-related\nfunctionality.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Platform.yml", - "events": [ - { - "name": "battery", - "summary": "Fired when the battery state changes. This is measured in 5% increments on iPhone/iPad.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "state", - "summary": "The battery state.", - "type": "Number" - }, - { - "name": "level", - "summary": "Percentage battery power level.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Battery Event Example", - "code": "Obtaining battery data when the battery state changes.\n\n``` js\nTitanium.Platform.addEventListener('battery', function(e){\n Ti.API.info('The battery state has changed to ' + e.state);\n Ti.API.info('The battery level is ' + e.level);\n Ti.API.info('The battery event source is ' + e.source);\n Ti.API.info('The battery event name ' + e.type);\n});\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "canOpenURL", - "summary": "Returns whether the system is configured with a default application to handle the URL's protocol/scheme.\n", - "description": "As of iOS 9, this method may return `false` if you have not added the URL schemes you query to the\n\"tiapp.xml\" file. You can do this by adding a `LSApplicationQueriesSchemes` plist section\nas shown [here](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Appendices/tiapp.xml_and_timodule.xml_Reference.html#ios9-security-and-canopenurl).\n\nAs of Android 11, this method may return `false` if you have not added the URL schemes to a ``\nmanifest section in the \"tiapp.xml\" file. Google documents examples how to do\nthis [here](https://developer.android.com/preview/privacy/package-visibility).\n\n```xml\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n```\n", - "platforms": [ - { - "since": "8.1.0", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "url", - "summary": "The URL to check.", - "type": "String" - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "cpus", - "summary": "Returns an array of basic CPU information for all logical processors\n", - "description": "This is intended to provide an implementation similar to Node's `os.cpus()`.\n", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - } - ], - "returns": { - "type": "Array" - } - }, - { - "name": "createUUID", - "summary": "Creates a globally-unique identifier.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "openURL", - "summary": "Opens this URL using the system's default application for its protocol/scheme.\n", - "description": "Here are some example URL strings this can be set to.\n\n * `'https://www.titaniumsdk.com'` (Opens in web browser.)\n * `'mailto:user@domain.com'` (Opens a new draft in e-mail app.)\n * `'mailto:user@domain.com?cc=johndoe@domain.com,janedoe@domain.com&subject=My%20Subject&body=The%20body.'`\n * `'tel:123-456-7890'` (Opens phone app if applicable.)\n * `'geo:37.774,-122.431?z=12'` (Opens map on Android.)\n * `'maps:?address=London,UK'` (Opens map on iOS.)\n\nYou can use the method to determine if the system has a registered\napplication for the given URL before invoking the method.\n\n**iOS Note**: For iOS 10 and later, this method is performed asynchronously\nand will call the function passed as an (optional) third parameter instead\nof returning a boolean synchronously.\n\nExample:\n``` js\nTi.Platform.openURL('myapp://', {\n 'UIApplicationOpenURLOptionUniversalLinksOnly': true\n}, function(e) {\n Ti.API.info('URL open successfully? ' + e.success);\n});\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "url", - "summary": "The URL to open.", - "type": "String" - }, - { - "name": "options", - "summary": "The optional options to pass to the URL handling (iOS 10+). Pass a\ndictionary with one or more of the following string-keys:\n * `UIApplicationOpenURLOptionsSourceApplicationKey` (String value)\n * `UIApplicationOpenURLOptionsAnnotationKey` (Array value)\n * `UIApplicationOpenURLOptionsOpenInPlaceKey` (Boolean value)\n * `UIApplicationOpenURLOptionUniversalLinksOnly` (Boolean value)\nRead more about the available keys in the [Apple documentation](https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey?language=objc).\n", - "type": "OpenURLOptions", - "optional": true - }, - { - "name": "callback", - "summary": "The optional callback that is called once the URL is opened (iOS 10+).\nAlso supported on Android as of Titanium 9.1.0.\n", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "Boolean" - } - }, - { - "name": "is24HourTimeFormat", - "summary": "Returns whether the system settings are configured to show times in 24-hour format.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "returns": { - "type": "Boolean" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "BATTERY_STATE_CHARGING", - "summary": "Constant to indicate that the system is plugged in and currently being charged.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "BATTERY_STATE_FULL", - "summary": "Constant to indicate that the battery is fully charged.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "BATTERY_STATE_UNKNOWN", - "summary": "Constant to indicate that the battery state is not known or monitoring is disabled.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "BATTERY_STATE_UNPLUGGED", - "summary": "Constant to indicate that the system is unplugged.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "address", - "summary": "System's WIFI IP address. No other network types are supported.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "architecture", - "summary": "System's processor architecture.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "availableMemory", - "summary": "System's unused memory, measured in bytes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "batteryLevel", - "summary": "Battery level in percent, accessible only when `batteryMonitoring` is enabled. Measured\nin 5% increments on iPhone/iPad.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "batteryMonitoring", - "summary": "Determines whether battery monitoring is enabled.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "batteryState", - "summary": "Indicates the state of the battery. Accessible only when `batteryMonitoring` is enabled.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only", - "constants": [ - "Titanium.Platform.BATTERY_STATE_CHARGING", - "Titanium.Platform.BATTERY_STATE_FULL", - "Titanium.Platform.BATTERY_STATE_UNKNOWN", - "Titanium.Platform.BATTERY_STATE_UNPLUGGED" - ] - }, - { - "name": "displayCaps", - "summary": "Returns the DisplayCaps object.\n", - "description": "Note that the `displayCaps` property begins with a lowercase letter, which differentiates it\nfrom the `DisplayCaps` object that it returns.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Platform.DisplayCaps", - "permission": "read-only" - }, - { - "name": "id", - "summary": "Applications's globally-unique ID (UUID).", - "description": "On Android, this may be the UDID (unique device ID). For iOS, this\nis a unique identifier for this install of the application.\n\nPreviously on iOS this may have been a UDID, but access to\nthis has been restricted by Apple. For more information, see\n[UUID Article on NSHipster](http://nshipster.com/uuid-udid-unique-identifier/)\ndocumentation.\n\nTo use a UUID across different applications of the same vendor,\nuse instead.\n\nTo use a UUID for tracking / advertising purposes,\nuse instead.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "identifierForVendor", - "summary": "An alphanumeric string that uniquely identifies a device to the app's vendor.", - "description": "The value of this property is the same for apps that come from the same\nvendor running on the same device. A different value is returned for apps\non the same device that come from different vendors, and for apps on\ndifferent devices regardless of vendor. See the [Apple docs](https://developer.apple.com/reference/uikit/uidevice/1620059-identifierforvendor) for more infos.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "identifierForAdvertising", - "summary": "An alphanumeric string unique to each device, used only for serving advertisements.", - "description": "Unlike the property, the same\nvalue is returned to all vendors. This identifier may change, for example,\nif the user erases the device, so you should not cache it.\n\nIn iOS 10.0 and later, the value of this property is all zeroes when the\nuser has limited ad tracking.\n\nIf the value is `null`, wait and get the value again later. This happens,\nfor example, after the device has been restarted but before the user has\nunlocked the device.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "isAdvertisingTrackingEnabled", - "summary": "A Boolean value that indicates whether the user has limited ad tracking.", - "description": "Check the value of this property before performing any advertising tracking.\nIf the value is false, use the advertising identifier only for the following\npurposes: frequency capping, attribution, conversion events, estimating the\nnumber of unique users, advertising fraud detection, and debugging.\n", - "platforms": [ - { - "since": "7.0.0", - "name": "iphone" - }, - { - "since": "7.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "isTranslatedBinaryOnAppleSilicon", - "summary": "A Boolean value that indicates whether the current app is running as a translated\nbinary using Rosetta on an Apple Silicon device.\n", - "description": "Use this utility property to guard API's that may not be available on a non-iOS\ndevice, e.g. motion activity or some authorization components.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "iphone" - }, - { - "since": "12.0.0", - "name": "ipad" - }, - { - "since": "12.0.0", - "name": "macos" - } - ], - "type": "Boolean", - "permission": "read-only" - }, - { - "name": "locale", - "summary": "System's default language.", - "description": "Locale, as a combination of ISO 2-letter language and country codes. For example,\n`en-US` or `en-GB`. See the\n[ISO 639-1](http://en.wikipedia.org/wiki/ISO_639-1) and\n[ISO 3166-1 alpha-2](http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2#Officially_assigned_code_elements)\nsections of wikipedia for reference.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "macaddress", - "summary": "System's network interface mac address, or app UUID.", - "description": "On iOS, this value is the app's UUID. Apple does not allow\naccess to any hardware identifier information as it can be used for\nunique device identification, which they have prohibited.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "manufacturer", - "summary": "Manufacturer of the device.", - "description": "Returns the manufacturer of the device, for example, `motorola`.\nVirtual devices return `unknown`.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "model", - "summary": "Model of the device.", - "description": "An identifier of the hardware model of the device. For example, `HTC Sensation Z710e`.\n\nVirtual devices will also return a value. For example, `sdk` for the standard Android SDK\nand `google_sdk` for the enhanced Android Google APIs SDK running in an emulator, and\n`Simulator` for iOS running in a simulator.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Testing for a Virtual Device", - "code": "Determine whether the application is running on a virtual device.\n\n``` js\nif (Ti.Platform.model.indexOf('Simulator') !== -1 || Ti.Platform.model.indexOf('sdk') !== -1 ){\n alert('Accelerometer does not work on a virtual device');\n} else {\n // Add Accelerometer event listener\n}\n```\n" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "name", - "summary": "Name of the platform. Returns `android` for the Android platform, `iPhone OS` for the iOS\nplatform (iPhone, iPad, or iPod Touch), and `windows` for the Windows platform.\n\nThis property returns `iOS` for for the iOS platform (iPhone & iPod Touch). For the iPad,\nit returns `iOS` for iOS < 13 and `iPadOS` for iPadOS > 13 as part of the iPadOS rebranding\nfor the iPad. If you need one identifier for both iOS and iPadOS, use \ninstead.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "netmask", - "summary": "System's WIFI network mask. No other network types are supported.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "osname", - "summary": "Short name of the system's Operating System. Returns `android` for the Android platform,\n`iphone` for the iPhone or iPod Touch, `ipad` for the iPad, `windowsphone` for Windows Phone, and `windowsstore` for Windows Store\nplatform.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "ostype", - "summary": "Operating System architecture. On Android, this is `32bit`.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "processorCount", - "summary": "Number of logical processing cores.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "runtime", - "summary": "Short name of the JavaScript runtime in use.", - "description": "On iOS this is \"javascriptcore\", on Android either \"v8\" or \"rhino\".\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "totalMemory", - "summary": "System's total memory, measured in bytes.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "uptime", - "summary": "System uptime since last boot in seconds.", - "description": "**Important**: When developing for the Apple ecosystem, using this API requires the `NSPrivacyAccessedAPICategorySystemBootTime`\nproperty set in the privacy manifest that was introduced in iOS 17. You can learn more about it [here](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api).\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "username", - "summary": "System name, if set. On iOS, this can be found in Settings > General > About > Name.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "version", - "summary": "The operating system's version string.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "versionMajor", - "summary": "The operating system's major version number.", - "description": "This returns the same value as the [OS_VERSION_MAJOR](Global.OS_VERSION_MAJOR) constant.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "versionMinor", - "summary": "The operating system's minor version number.", - "description": "This returns the same value as the [OS_VERSION_MINOR](Global.OS_VERSION_MINOR) constant.\n\nWill return zero if the OS does not have a minor version.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "versionPatch", - "summary": "The operating system's patch version number.", - "description": "This returns the same value as the [OS_VERSION_PATCH](Global.OS_VERSION_PATCH) constant.\n\nWill return zero if the OS does not have a patch version.\n", - "platforms": [ - { - "since": "9.2.0", - "name": "android" - }, - { - "since": "9.2.0", - "name": "iphone" - }, - { - "since": "9.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "CPU": { - "name": "CPU", - "summary": "Simple object holding the data for a logical cpu.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Platform.yml", - "properties": [ - { - "name": "model", - "summary": "General description of the CPU", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "speed", - "summary": "Speed of the CPU in MHz", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "times", - "summary": "A collection of timings for this logical CPU.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "CPUTimes" - } - ] - }, - "CPUTimes": { - "name": "CPUTimes", - "summary": "Simple object holding the data for a logical CPU execution times.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Platform.yml", - "properties": [ - { - "name": "user", - "summary": "The number of milliseconds the CPU has spent in user mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "nice", - "summary": "The number of milliseconds the CPU has spent in nice mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "sys", - "summary": "The number of milliseconds the CPU has spent in sys mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "idle", - "summary": "The number of milliseconds the CPU has spent in idle mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "irq", - "summary": "The number of milliseconds the CPU has spent in irq mode.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "OpenURLOptions": { - "name": "OpenURLOptions", - "summary": "The optional options to pass to the URL handling (iOS 10+). Pass a\ndictionary with one or more of the following string-keys:\n * `UIApplicationOpenURLOptionsSourceApplicationKey` (String value)\n * `UIApplicationOpenURLOptionsAnnotationKey` (Array value)\n * `UIApplicationOpenURLOptionsOpenInPlaceKey` (Boolean value)\n * `UIApplicationOpenURLOptionUniversalLinksOnly` (Boolean value)\nRead more about the available keys in the [Apple documentation](https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey?language=objc).\n", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Platform/Platform.yml", - "properties": [ - { - "name": "UIApplicationOpenURLOptionsSourceApplicationKey", - "summary": "The value of this key is an String containing the bundle ID of the app that made the request. If the request originated from another app belonging to your team, UIKit sets the value of this key to the ID of that app. If the team identifier of the originating app is different than the team identifier of the current app, the value of the key is nil.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "optional": true - }, - { - "name": "UIApplicationOpenURLOptionsAnnotationKey", - "summary": "contains the information passed to a document interaction controller object's annotation property.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "optional": true - }, - { - "name": "UIApplicationOpenURLOptionsOpenInPlaceKey", - "summary": "When the value of this property is `false`, you must copy the document to maintain access to it. If the flag is not set, you also must copy the document before you can use it.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "optional": true - }, - { - "name": "UIApplicationOpenURLOptionUniversalLinksOnly", - "summary": "When you include this key in the options dictionary, the method opens the URL only if the URL is a valid universal link and there is an installed app capable of opening that URL.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "optional": true - } - ] - }, - "Titanium.Stream": { - "name": "Titanium.Stream", - "summary": "Stream module containing stream utility methods.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "description": "This module provides a set of methods for interacting with\n[IOStream](Titanium.IOStream) objects, including asynchronous versions of the\n`read` and `write` methods offered by all stream objects. These\nmethods should be used in any place where reading from or writing\nto a stream might block.\n\nSee also:\n\n* \n* \n* \n* \n* \n", - "examples": [ - { - "description": "Stream.pump Example", - "code": "The following example shows how to use the [pump](Titanium.Stream.pump) method.\n\n``` js\nvar pumpCallback = function(arg) {\n if(arg.bytesProcessed == -1) {\n Ti.API.info(\"At end of stream.\");\n } else {\n Ti.API.info(String.format(\"Received %.0f bytes. Total: %.0f bytes.\",\n arg.bytesProcessed, arg.totalBytesProcessed));\n // do something useful with the data in arg.buffer\n }\n}\nTi.Stream.pump(inputStream, pumpCallback, 1024);\n```\n" - }, - { - "description": "Write Stream to File", - "code": "The following example uses the [writeStream](Titanium.Stream.writeStream) method\nto copy the contents of an input stream to a file. This can be used for any kind\nof input stream -- `BufferStream`, `FileStream`, or `Socket.TCP`.\n\n``` js\nvar outFileStream = Ti.Filesystem.getFile('outfile.txt').open(Ti.Filesystem.MODE_WRITE);\n\n// writes all data from inputStream to outFileStream in chunks of 1024 bytes\nvar bytesWritten = Ti.Stream.writeStream(inputStream, outFileStream, 1024);\nTi.API.info('Wrote ' + bytesWritten + ' bytes, closing both streams.');\n\ninputStream.close();\noutFileStream.close();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createStream", - "summary": "Creates stream from a `Buffer` or `Blob` object.", - "description": "Returns or depending on whether a\n`Buffer` or `Blob` is provided as the `source` property in `params`.\n\n\n`Blob` objects are read only. Throws an exception if `MODE_WRITE` or `MODE_APPEND` is\nspecified along with a blob object.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "params", - "summary": "Parameter object, for specifying the source object and mode.", - "type": "CreateStreamArgs" - } - ], - "returns": { - "type": "Titanium.IOStream" - } - }, - { - "name": "read", - "summary": "Asynchronously reads data from an [IOStream](Titanium.IOStream) into a buffer.\n", - "description": "Reads data from the stream and writes it to the buffer. The first byte is\nwritten to `buffer[offset]`. Reads until the provided buffer is full, the end of\nthe stream is detected, or the requested number of bytes have been read. Does not\nresize the supplied buffer.\n\nA request must include both `offset` and `length` parameters, or omit them both.\n\nIf the stream is not readable, an error is reported:\n\n* On iOS, throws an exception.\n\n* On Android, calls the callback with an error.\n\nIf `offset` is past the last byte of the buffer, throws an exception.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sourceStream", - "summary": "Stream to read from.", - "type": "Titanium.IOStream" - }, - { - "name": "buffer", - "summary": "Buffer to read into.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset to start reading stream data from, in bytes.\nIf specified, `length` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Number of bytes of data to read from the stream.\nIf specified, `offset` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "readAll", - "summary": "Reads all data from the specified [IOStream](Titanium.IOStream).", - "description": "Reads data from the stream, either synchronously or asynchronously.\n\nThrows an exception if a read error is encountered or data can't be written to the\nbuffer.\n\nIf the optional `buffer` and `resultsCallback` arguments are specified, the read operation\ntakes place asynchronously, and the results are passed to the callback.\nThe data is written to the provided buffer, which is resized if necessary.\n\nIf the `buffer` and `resultsCallback` arguments are omitted, a new buffer is\nallocated and returned.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "sourceStream", - "summary": "Stream to read from.", - "type": "Titanium.IOStream" - }, - { - "name": "buffer", - "summary": "Buffer to read into. If specified, `resultsCallback` must be specified as\nwell.\n", - "type": "Titanium.Buffer", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the read operation.\nIf specified, `resultsCallback` must be specified as well.\n", - "type": "Callback", - "optional": true - } - ], - "returns": [ - { - "type": "Titanium.Buffer" - }, - { - "type": "void" - } - ] - }, - { - "name": "write", - "summary": "Asynchronously writes data from a buffer to an [IOStream](Titanium.IOStream).", - "description": "Data is read from the buffer and written to the stream.\n\nIf the `offset` and `length` arguments are specified, data is read from the buffer\nstarting at `offset`, up to `offset+length-1` or the end of the buffer, whichever\ncomes first.\n\nIf `offset` and `length` are omitted, the entire buffer is written to the stream.\n\nIf the output stream is not writable, an error is reported:\n\n* On iOS, an exception is thrown.\n\n* On Android, the callback is invoked with an error.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "outputStream", - "summary": "Stream to write to.", - "type": "Titanium.IOStream" - }, - { - "name": "buffer", - "summary": "Buffer to write from.", - "type": "Titanium.Buffer" - }, - { - "name": "offset", - "summary": "Offset to start writing buffer data from.\nIf specified, `length` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "length", - "summary": "Bytes of data to write. If specified, `offset` must be specified as well.\n", - "type": "Number", - "optional": true - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the write operation.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "writeStream", - "summary": "Writes all data from an input stream to an output stream.", - "description": "If the optional `resultsCallback` argument is supplied, the operation is\nperformed asynchronously.\n\nIf the callback is omitted, this method is synchronous, and blocks until all data has been written.\nThe synchronous version Returns the total number of bytes written.\n\nIf no data can be read from the input stream because the input\nstream is at end of stream, behavior varies by platform:\n\n* iOS throws an exception.\n\n* Android returns 0, or calls the callback with `bytesProcessed` set to 0.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "inputStream", - "summary": "Stream to read from.", - "type": "Titanium.IOStream" - }, - { - "name": "outputStream", - "summary": "Stream to write to.", - "type": "Titanium.IOStream" - }, - { - "name": "maxChunkSize", - "summary": "Maximum number of bytes to copy from `inputStream` to `outputStream` in a\nsingle operation.\n", - "type": "Number" - }, - { - "name": "resultsCallback", - "summary": "Function to call with the results of the `writeStream` operation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "pump", - "summary": "Reads data from input stream and passes it to a handler method.", - "description": "After the end of the input stream is reached, the handler is called\na final time with no data and `bytesProcessed` set to -1 to indicate\nthe end of the input data.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "inputStream", - "summary": "Stream to pump from.", - "type": "Titanium.IOStream" - }, - { - "name": "handler", - "summary": "Handler method that will receive data from `inputStream`.", - "type": "Callback" - }, - { - "name": "maxChunkSize", - "summary": "Maximum number of bytes to pass to `handler` in a single call.\n", - "type": "Number" - }, - { - "name": "isAsync", - "summary": "Specifies if the `pump` operation should run asynchronously.", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "MODE_READ", - "summary": "Use with [createStream](Titanium.Stream.createStream) to open a stream in read\nmode.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MODE_WRITE", - "summary": "Use with [createStream](Titanium.Stream.createStream) to open a stream in write\nmode.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "MODE_APPEND", - "summary": "Use with [createStream](Titanium.Stream.createStream) to open a stream in append\nmode.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "CreateStreamArgs": { - "name": "CreateStreamArgs", - "summary": "Argument passed to [createStream](Titanium.Stream.createStream).", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "properties": [ - { - "name": "source", - "summary": "Object that the stream will read from or write to.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Titanium.Blob", - "Titanium.Buffer" - ] - }, - { - "name": "mode", - "summary": "Mode to open the stream in.", - "description": "For `Blob` objects, only `MODE_READ` is supported.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.Stream.MODE_READ", - "Titanium.Stream.MODE_WRITE", - "Titanium.Stream.MODE_APPEND" - ] - } - ] - }, - "ReadCallbackArgs": { - "name": "ReadCallbackArgs", - "summary": "Argument passed to the read callback when an asynchronous [read](Titanium.Stream.read) operation\nfinishes.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "source", - "summary": "Stream being read.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.IOStream" - }, - { - "name": "bytesProcessed", - "summary": "Number of bytes processed, or -1 in the event of an error or end of stream.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "WriteCallbackArgs": { - "name": "WriteCallbackArgs", - "summary": "Argument passed to the write callback when an asynchronous\n[write](Titanium.Stream.write) operation\nfinishes.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "source", - "summary": "Stream being written to.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.IOStream" - }, - { - "name": "bytesProcessed", - "summary": "Number of bytes processed, or -1 in the event of an error or end of stream.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "WriteStreamCallbackArgs": { - "name": "WriteStreamCallbackArgs", - "summary": "Argument passed to the callback when an asynchronous\n[writeStream](Titanium.Stream.writeStream) operation finishes.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "ErrorResponse", - "type": "Number" - }, - { - "name": "fromStream", - "summary": "Stream being read from.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.IOStream" - }, - { - "name": "toStream", - "summary": "Stream being written to.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.IOStream" - }, - { - "name": "bytesProcessed", - "summary": "Number of bytes processed, or -1 in the event of an error or end of stream.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "PumpCallbackArgs": { - "name": "PumpCallbackArgs", - "summary": "Argument passed to the callback each time the\n[pump](Titanium.Stream.pump) operation has new data to deliver.\n", - "extends": "ErrorResponse", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Stream/Stream.yml", - "description": "A callback with `bytesProcessed` set to -1 indicates the end of the\npump operation, either because of an error or because the end of the\nstream has been reached.\n", - "properties": [ - { - "name": "success", - "summary": "Indicates if the operation succeeded.", - "description": "Returns `true` if request succeeded, `false` otherwise.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "error", - "summary": "Error message, if any returned.", - "description": "Will be undefined if `success` is `true`.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "code", - "summary": "Error code. Returns 0 if `success` is `true`.", - "description": "Error code will be 0 if `success` is `true`, nonzero otherwise. If the error\nwas generated by the operating system, that system's error value is used.\nOtherwise, this value will be -1.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "3.1.0", - "name": "iphone" - }, - { - "since": "3.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "source", - "summary": "Stream being read from.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.IOStream" - }, - { - "name": "buffer", - "summary": "Buffer object holding the data currently being pumped to the handler method.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.Buffer" - }, - { - "name": "bytesProcessed", - "summary": "Number of bytes being passed to this invocation of the handler, or\n-1 in the event of an error or end of stream.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "totalBytesProcessed", - "summary": "Total number of bytes read from the stream so far,\nincluding the data passed to this current invocation of the handler.\n", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ] - }, - "Titanium": { - "name": "Titanium", - "summary": "The top-level Titanium module.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Titanium.yml", - "description": "The Titanium module provides the Titanium Mobile API, allowing developers to access native\nfeatures of each target environment. Currently, the Android and iOSenvironments are supported.\n\n#### Titanium Namespace\n\nThe complete Titanium API is accessible from the `Titanium` namespace but, for convenience and\nbrevity, the alias `Ti` is also provided. As the `Titanium` namespace is functionally-identical\nto its `Ti` alias, it is always recommended to use `Ti` in your code.\n\nFor example, the following pairs of Titanium calls behave exactly the same.\n\n``` js\nTitanium.API.info('Hello Titanium!');\nTi.API.info('Hello Titanium!');\n\nTitanium.Utils.sha256('Hello Titanium!');\nTi.Utils.sha256('Hello Titanium!');\n\nTitanium.App.Properties.setString('hello_msg','Hello Titanium!');\nTi.App.Properties.setString('hello_msg','Hello Titanium!');\n\nTitanium.Database.open('mydb');\nTi.Database.open('mydb');\n```\n\n#### Global APIs\n\nTitanium includes a number of built-in JavaScript objects that are not part of the Titanium\nnamespace, including String formatting, timers, and the CommonJS `require` function.\nSee [Global APIs](Global) for details.\n", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "createBuffer", - "summary": "Creates a new buffer based on the params.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "examples": [ - { - "description": "Create a buffer with 1K bytes", - "code": "``` js\nvar buffer = Ti.createBuffer({ length: 1024 });\n```\n" - }, - { - "description": "Create a buffer with string", - "code": "Create a buffer with the string \"hello world\" encoded in UTF-8\n``` js\nvar buffer = Ti.createBuffer({ value: \"hello world\" });\n```\n" - }, - { - "description": "Create a buffer with encoded float", - "code": "Create a buffer with the encoded value of the double-precision floating point\nnumber 1.234567 in Big Endian (network) byte order\n``` js\nvar buffer = Ti.createBuffer({ value: 1.234567, type: Ti.Codec.TYPE_DOUBLE, byteOrder: Ti.Codec.BIG_ENDIAN });\n```\n" - } - ], - "parameters": [ - { - "name": "params", - "summary": "creation arguments", - "type": "CreateBufferArgs" - } - ], - "returns": { - "summary": "The new buffer.", - "type": "Titanium.Buffer" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "userAgent", - "summary": "User-agent string used by Titanium.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "version", - "summary": "Version of Titanium that is executing.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "buildDate", - "summary": "Date of the Titanium build.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - }, - { - "name": "buildHash", - "summary": "Git hash of the Titanium build.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "permission": "read-only" - } - ] - }, - "CreateBufferArgs": { - "name": "CreateBufferArgs", - "summary": "Arguments to be passed to createBuffer", - "extends": "Object", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/Titanium.yml", - "properties": [ - { - "name": "value", - "summary": "An initial value which will be encoded and placed in the buffer. If value is a Number, type must also be set. (this is simply a convenient way of calling or and placing the encoded value in the returned buffer.)", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number" - ], - "optional": true - }, - { - "name": "length", - "summary": "The length of the buffer.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "0, unless `value` is specified, in which case the length of the encoded data is used.", - "optional": true - }, - { - "name": "type", - "summary": "The type of data encoding to use with `value`.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "default": " if `value` is a String, If `value` is a Number, this argument is required", - "optional": true - }, - { - "name": "byteOrder", - "summary": "The byte order of this buffer.", - "platforms": [ - { - "since": "1.7", - "name": "android" - }, - { - "since": "1.7", - "name": "iphone" - }, - { - "since": "1.7", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "The OS native byte order is used by default. See ", - "optional": true - } - ] - }, - "Titanium.UI.ActivityIndicator": { - "name": "Titanium.UI.ActivityIndicator", - "summary": "An activity indicator that lets the user know an action is taking place.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ActivityIndicator.yml", - "description": "| Android | iOS |\n| ------- | --- |\n| ![Android](./activityindicator_android.png) | ![iOS](./activityindicator_ios.png) |\n\nAn activity indicator can be used to show the progress of an operation in the UI to let the\nuser know that some action is taking place. An activity indicator consists of a spinning\nanimation and an optional text message, and is used to indicate an ongoing activity of\nindeterminate length. To show progress, use instead.\n\nUse the method or **``** Alloy element to\ncreate an `ActivityIndicator` object.\n\n`ActivityIndicator` is a view and, like any view, must be added to a window or other top-level\nview before it can be shown. Unlike most views, `ActivityIndicator` is hidden by\ndefault and must be shown explicitly by calling its method.\n", - "events": [ - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "12.7.0", - "name": "iphone" - }, - { - "since": "12.7.0", - "name": "ipad" - }, - { - "since": "12.7.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple Activity Indicator", - "code": "Open a yellow window immediately after a blue window. Show an activity indicator while\nsome code executes and hide it on completion. Then close the yellow window.\n\n``` js\nTi.UI.backgroundColor = 'white';\n\nvar win1 = Ti.UI.createWindow({\n backgroundColor: 'blue'\n});\n\nvar win2 = Ti.UI.createWindow({\n backgroundColor: 'yellow'\n});\n\nvar activityIndicator = Ti.UI.createActivityIndicator({\n color: 'green',\n message: 'Loading ...',\n style: Ti.UI.ActivityIndicatorStyle.DARK,\n top: 10,\n left: 10,\n height: Ti.UI.SIZE,\n width: Ti.UI.SIZE\n});\n\n// The activity indicator must be added to a window or view for it to appear\nwin2.add(activityIndicator);\n\n// eventListeners must always be loaded before the event is likely to fire\n// hence, the open() method must be positioned before the window is opened\nwin2.addEventListener('open', function (e) {\n activityIndicator.show();\n // do some work that takes 6 seconds\n // ie. replace the following setTimeout block with your code\n setTimeout(function() {\n e.source.close();\n activityIndicator.hide();\n }, 6000);\n});\n\nwin1.open();\nwin2.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous example as two Alloy views.\n\nwin1.xml:\n``` xml\n\n \n\n```\n\nwin1.js:\n``` js\nfunction openWin2 () {\n var win2 = Alloy.createController('win2').getView();\n win2.open();\n}\n```\n\nwin2.xml:\n``` xml\n\n \n \n \n \n\n```\n\nwin2.js:\n``` js\nfunction showIndicator(e) {\n $.activityIndicator.show();\n // do some work that takes 6 seconds\n // ie. replace the following setTimeout block with your code\n setTimeout(function() {\n e.source.close();\n $.activityIndicator.hide();\n }, 6000);\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearMotionEffects", - "summary": "Removes all previously added motion effects.", - "description": "Use this method together with and .", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides the activity indicator and stops the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Shows the activity indicator and starts the animation.", - "description": "Remember to add the activity indicator to a parent view first,\nso it centers properly. This is optional for Android and required\nfor iOS.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "bottom", - "summary": "Bottom position of the view.", - "description": "Determines the absolute position of the view relative to its parent.\n\nCan be either a float value or a dimension string (for example `100` or `'50%'`.)\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "Width of the view. Only accepts value of , which must be explicitly set in order to\ndisplay the message and to position the view correctly.\n", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "constants": [ - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "horizontalMotionEffect", - "summary": "Adds a horizontal parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "Left position of the view.", - "description": "Determines the absolute position of the view relative to its parent.\n\nCan be either a float value or a dimension string (for example `100` or `'50%'`.)\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "previewContext", - "summary": "The preview context used in the 3D-Touch feature \"Peek and Pop\".", - "description": "Preview context to present the \"Peek and Pop\" of a view. Use an configured instance\nof here.\n\nNote: This property can only be used on devices running iOS 9 or later and supporting 3D-Touch.\nIt is ignored on older devices and can manually be checked using .\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - } - ], - "inherits": "Titanium.UI.View", - "type": "Titanium.UI.iOS.PreviewContext" - }, - { - "name": "right", - "summary": "Right position of the view.", - "description": "Determines the absolute position of the view relative to its parent.\n\nCan be either a float value or a dimension string (for example `100` or `'50%'`.)\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "12.3.0", - "name": "iphone" - }, - { - "since": "12.3.0", - "name": "ipad" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - }, - { - "since": "12.1.0", - "name": "iphone" - }, - { - "since": "12.1.0", - "name": "ipad" - }, - { - "since": "12.1.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "Top position of the view.", - "description": "Determines the absolute position of the view relative to its parent.\n\nCan be either a float value or a dimension string (for example `100` or`'50%'`.)\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "verticalMotionEffect", - "summary": "Adds a vertical parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "width", - "summary": "Width of the view. Only accepts value of , which must be explicitly set in order to\ndisplay the message and to position the view correctly.\n", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String", - "constants": [ - "Titanium.UI.SIZE" - ] - }, - { - "name": "color", - "summary": "Color of the message text, as a color name or hex triplet.\n", - "description": "For information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "font", - "summary": "Font used for the message text.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Font" - }, - { - "name": "indicatorColor", - "summary": "Color of the animated indicator.", - "description": "For information about color values, see the \"Colors\" section of .", - "platforms": [ - { - "since": "2.1.0", - "name": "android" - }, - { - "since": "2.1.0", - "name": "iphone" - }, - { - "since": "2.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ], - "default": "white" - }, - { - "name": "message", - "summary": "Message text.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "messageid", - "summary": "Key identifying a string in the locale file to use for the message text.", - "description": "Only one of `message` or `messageid` should be specified.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "style", - "summary": "The style for the activity indicator.", - "description": "One of the activity indicator style constants.\n\nSee also: [indicatorColor](Titanium.UI.ActivityIndicator.indicatorColor)\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.ActivityIndicatorStyle.BIG", - "Titanium.UI.ActivityIndicatorStyle.DARK", - "Titanium.UI.ActivityIndicatorStyle.BIG_DARK", - "Titanium.UI.ActivityIndicatorStyle.PLAIN" - ] - } - ], - "subtype": "view" - }, - "Titanium.UI.ActivityIndicatorStyle": { - "name": "Titanium.UI.ActivityIndicatorStyle", - "summary": "A set of constants for the styles available for objects.", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/ActivityIndicatorStyle.yml", - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "BIG", - "summary": "Large white spinning indicator.", - "description": "Used with the property.\n\nOne of the group of activity indicator style constants\n[DARK](Titanium.UI.ActivityIndicatorStyle.DARK),\n[BIG](Titanium.UI.ActivityIndicatorStyle.BIG),\n[BIG_DARK](Titanium.UI.ActivityIndicatorStyle.BIG_DARK),\nand [PLAIN](Titanium.UI.ActivityIndicatorStyle.PLAIN).\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "DARK", - "summary": "Small gray spinning indicator.", - "description": "Used with the property.\n\nOne of the group of activity indicator style constants\n[DARK](Titanium.UI.ActivityIndicatorStyle.DARK),\n[BIG](Titanium.UI.ActivityIndicatorStyle.BIG),\n[BIG_DARK](Titanium.UI.ActivityIndicatorStyle.BIG_DARK),\nand [PLAIN](Titanium.UI.ActivityIndicatorStyle.PLAIN).\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "BIG_DARK", - "summary": "Large gray spinning indicator.", - "description": "Used with the property.\n\nNote: Although this constant is not available on iOS, you accomplish\nthis behavior by setting the style to `Ti.UI.ActivityIndicatorStyle.BIG`\nand use the property to\ntint the indicator.\n\nOne of the group of activity indicator style constants\n[DARK](Titanium.UI.ActivityIndicatorStyle.DARK),\n[BIG](Titanium.UI.ActivityIndicatorStyle.BIG),\n[BIG_DARK](Titanium.UI.ActivityIndicatorStyle.BIG_DARK),\nand [PLAIN](Titanium.UI.ActivityIndicatorStyle.PLAIN).\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PLAIN", - "summary": "Small white spinning indicator (default).", - "description": "Used with the property.\n\nOne of the group of activity indicator style constants\n[DARK](Titanium.UI.ActivityIndicatorStyle.DARK),\n[BIG](Titanium.UI.ActivityIndicatorStyle.BIG),\n[BIG_DARK](Titanium.UI.ActivityIndicatorStyle.BIG_DARK),\nand [PLAIN](Titanium.UI.ActivityIndicatorStyle.PLAIN).\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "Titanium.UI.AlertDialog": { - "name": "Titanium.UI.AlertDialog", - "summary": "An alert dialog is a modal view that includes an optional title, a message and buttons,\npositioned in the middle of the display.\n", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AlertDialog.yml", - "description": "| Android | iOS |\n| ------- | --- |\n| ![Android](./alertdialog_android.png) | ![iOS](./alertdialog_ios.png) |\n\nAn alert dialog is created using or **``** Alloy element.\n\nAlthough this dialog always appears in the middle of the display (not touching the edges),\nother aspects of its aesthetics and the way the user interacts with it are different for each\nplatform, as described below.\n\n#### Android\n\nOn Android, the default alert dialog displays text information, via a title and message, without\nany buttons. As the user can use the system hardware `back` button to dismiss it, a button is\noptional.\n\nButtons are shown if the `buttonNames` property is defined, and are rendered horizontally below\nthe message.\n\nTo create a custom layout, a view may be added and, in turn, a hierarchy of views added to that\nchild view.\n\n#### iOS\n\nOn iOS, the default alert dialog displays text information, via a title and message, with\na single button to allow it to be dismissed.\n\nButtons are defined using the `buttonNames` property and are rendered vertically below\nthe message. Alert dialogs are automatically cancelled when the application is\npaused/suspended. This behavior can be avoided by setting `persistent` property on alert dialog\nto be `true`.\n\nThe `style` property can be used to allow the user to enter plain text,\nobscured text or login identifier and password. Entered values can be captured with listening\n`cancel` event.\n\nStarting at Titanium SDK 5.1.0, you can also specify the `placeholder`, `keyboardType` and `returnKeyType`\nproperties when using the alert dialog style or\n.\nWhen using the alert dialog style , you can\nspecify the `loginPlaceholder`, `loginKeyboardType` and `loginReturnKeyType` properties for the login field,\nas well as the `passwordPlaceholder`, `passwordKeyboardType` and `passwordReturnKeyType` properties for the password field.\n\n#### Global Alias\n\nA global method `alert()` is aliased to this object, and can be invoked with a single message.\nFor example\n\n``` js\nalert('this is a message');\n```\n\nThis will generate an alert with a title of \"Alert\" and an \"OK\" button.\n\n#### Caveats\n\nMultiple alerts should not be shown at once.\n\nThe `title` and `ok` properties cannot be changed while the alert dialog is being displayed. On\nAndroid only, you can change the `message` property while the alert dialog is being displayed.\n", - "events": [ - { - "name": "click", - "summary": "Fired when a button in the dialog is clicked.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "properties": [ - { - "name": "cancel", - "summary": "Boolean type on Android; Number on iOS.\n\nOn Android, indicates whether the cancel button was clicked, in which\ncase returns `true`.\n\nOn iOS, the value of the [cancel](Titanium.UI.AlertDialog.cancel) property is\nreturned, if defined, or `-1` otherwise. Also note that the cancel button may not be\nused on the iPad, because iOS will internally decide whether or not to show it in\nthe current context (e.g. in a popover).\n\nSee the `Three-button Alert Dialog` example for a cross-platform workaround for this\nparity issue.\n", - "type": [ - "Boolean", - "Number" - ] - }, - { - "name": "index", - "summary": "Index of the button that was clicked.", - "type": "Number" - }, - { - "name": "login", - "summary": "Value of login field if dialog `style` property is defined as\n.\n", - "type": "String" - }, - { - "name": "password", - "summary": "Value of password field if dialog `style` property is defined as\n.\n", - "type": "String" - }, - { - "name": "text", - "summary": "Value of text field if dialog `style` property is defined as\n or\n.\n", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "12.7.0", - "name": "iphone" - }, - { - "since": "12.7.0", - "name": "ipad" - }, - { - "since": "12.7.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Single-button Alert Dialog (using alias)", - "code": "Create a single-button alert dialog using the global `alert()` alias.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to test',\n backgroundColor: 'white'\n});\n\nwin.addEventListener('click', function(e) {\n alert('The file has been deleted');\n});\nwin.open();\n```\n" - }, - { - "description": "Single-button Alert Dialog (standard)", - "code": "Create a single-button alert dialog, without explicitly defining it using the `buttonNames`\nproperty, which is invoked when the app window is clicked.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to test',\n backgroundColor: 'white'\n});\n\nwin.addEventListener('click', function(e) {\n var dialog = Ti.UI.createAlertDialog({\n message: 'The file has been deleted',\n ok: 'Okay',\n title: 'File Deleted'\n });\n dialog.show();\n});\nwin.open();\n```\n" - }, - { - "description": "Three-button Alert Dialog", - "code": "Create a three-button alert dialog, which is invoked when the app window is clicked.\nOutput a message to the log when the cancel button is clicked.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to test',\n backgroundColor: 'white'\n});\nwin.addEventListener('click', function(e) {\n var dialog = Ti.UI.createAlertDialog({\n cancel: 1,\n buttonNames: ['Confirm', 'Cancel', 'Help'],\n message: 'Would you like to delete the file?',\n title: 'Delete'\n });\n dialog.addEventListener('click', function(e) {\n if (e.index === e.source.cancel) {\n Ti.API.info('The cancel button was clicked');\n }\n Ti.API.info('e.cancel: ' + e.cancel);\n Ti.API.info('e.source.cancel: ' + e.source.cancel);\n Ti.API.info('e.index: ' + e.index);\n });\n dialog.show();\n});\nwin.open();\n```\n" - }, - { - "description": "Alert Dialog with Plain Text Input", - "code": "Create an alert dialog and allow the user enter plain text, which is invoked when the\napp window is clicked.\nOutput entered text value to the log when the OK button is clicked.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Click window to test'\n});\nwin.addEventListener('click', function(e) {\n var dialog = Ti.UI.createAlertDialog({\n title: 'Enter text',\n style: Ti.UI.iOS.AlertDialogStyle.PLAIN_TEXT_INPUT,\n buttonNames: ['OK']\n });\n dialog.addEventListener('click', function(e) {\n Ti.API.info('e.text: ' + e.text);\n });\n dialog.show();\n});\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous three-button alert dialog example as an Alloy view.\n\nalertdialog.xml:\n``` xml\n\n \n\n \n\n \n \n Confirm\n Cancel\n Help\n \n \n \n\n```\n\nalertdialog.js:\n``` js\nfunction showDialog() {\n $.dialog.show();\n}\n\nfunction doClick(e) {\n Ti.API.info('e.text: ' + e.text);\n}\n\n$.win.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "clearMotionEffects", - "summary": "Removes all previously added motion effects.", - "description": "Use this method together with and .", - "platforms": [ - { - "since": "8.2.0", - "name": "iphone" - }, - { - "since": "8.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this dialog.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - }, - { - "since": "3.3.0", - "name": "iphone" - }, - { - "since": "3.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Shows this dialog.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - }, - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "horizontalMotionEffect", - "summary": "Adds a horizontal parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "previewContext", - "summary": "The preview context used in the 3D-Touch feature \"Peek and Pop\".", - "description": "Preview context to present the \"Peek and Pop\" of a view. Use an configured instance\nof here.\n\nNote: This property can only be used on devices running iOS 9 or later and supporting 3D-Touch.\nIt is ignored on older devices and can manually be checked using .\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - } - ], - "inherits": "Titanium.UI.View", - "type": "Titanium.UI.iOS.PreviewContext" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - }, - { - "since": "12.3.0", - "name": "iphone" - }, - { - "since": "12.3.0", - "name": "ipad" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "tintColor", - "summary": "The tint-color of the dialog.", - "description": "This property is a direct correspondent of the `tintColor` property of\nUIView on iOS. For a dialog, it will tint the color of it's buttons.\nFor information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ], - "default": null - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - }, - { - "since": "12.1.0", - "name": "iphone" - }, - { - "since": "12.1.0", - "name": "ipad" - }, - { - "since": "12.1.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "verticalMotionEffect", - "summary": "Adds a vertical parallax effect to the view", - "description": "Note that the parallax effect only happens by tilting the device so results can not be seen on Simulator.\nTo clear all motion effects, use the method.\n", - "platforms": [ - { - "since": "7.3.0", - "name": "iphone" - }, - { - "since": "7.3.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "type": "MinMaxOptions" - }, - { - "name": "androidView", - "summary": "View to load inside the message area, to create a custom layout.", - "description": "In an Alloy application you can specify this property with either an `` or\n`` element inside the `` element, for example:\n\n``` xml\n\n \n\n \n \n \n\n \n Confirm\n Cancel\n \n \n\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - } - ], - "type": "Titanium.UI.View", - "availability": "creation" - }, - { - "name": "buttonNames", - "summary": "Name of each button to create.", - "description": "On iOS, a button will automatically be created if none are explicitly defined, because\nwithout it users would be unable to dismiss the dialog. Conversely, a dialog with no\nbuttons may be created on Android, as the hardware `back` button may be used instead.\n\nA maximum of 3 buttons is supported on Android.\n\nAlloy applications can specify this property with a `` element containing\none or more `` elements (see example).\n\n``` xml\n\n \n \n Confirm\n Cancel\n Help\n \n \n\n```\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "availability": "creation", - "default": "No buttons (Android), Single \"OK\" button (iOS)" - }, - { - "name": "cancel", - "summary": "Index to define the cancel button.", - "description": "On iOS, set to `-1` to disable the cancel option.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "undefined (Android), -1 (iOS)" - }, - { - "name": "buttonClickRequired", - "summary": "Setting this to true requires the end-user to click a dialog button to close the dialog.\n", - "description": "Set to true to prevent the dialog from being dismissed via back navigation or tapping outside of the dialog.\nThis requires the end-user to click on one of the dialog buttons provided by property buttonNames. Note that\nif the dialog does not have any buttons, then the dialog can only be closed programmatically via the hide() method.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "type": "Boolean", - "default": "false on Android" - }, - { - "name": "canceledOnTouchOutside", - "summary": "When this is set to `true`, the dialog is canceled when touched outside the window's bounds.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "android" - } - ], - "type": "Boolean", - "default": "true on Android" - }, - { - "name": "destructive", - "summary": "Index to define the destructive button.", - "description": "Setting this property to -1 disables this option.", - "platforms": [ - { - "since": "3.5.0", - "name": "iphone" - }, - { - "since": "3.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": -1 - }, - { - "name": "hintText", - "summary": "Hint text of the text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "hinttextid", - "summary": "Key identifying a string from the locale file to use for the\n[hintText](Titanium.UI.AlertDialog.hintText) property.\n", - "description": "Only one of `hintText` or `hinttextid` should be specified.", - "platforms": [ - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "keyboardType", - "summary": "Keyboard type to display when this text field inside the dialog is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.KEYBOARD_TYPE_DECIMAL_PAD", - "Titanium.UI.KEYBOARD_TYPE_ASCII", - "Titanium.UI.KEYBOARD_TYPE_DEFAULT", - "Titanium.UI.KEYBOARD_TYPE_EMAIL", - "Titanium.UI.KEYBOARD_TYPE_NAMEPHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION", - "Titanium.UI.KEYBOARD_TYPE_NUMBER_PAD", - "Titanium.UI.KEYBOARD_TYPE_PHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_WEBSEARCH", - "Titanium.UI.KEYBOARD_TYPE_TWITTER", - "Titanium.UI.KEYBOARD_TYPE_URL" - ] - }, - { - "name": "keyboardAppearance", - "summary": "Keyboard appearance to be displayed when the text field inside the dialog is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "iphone" - }, - { - "since": "5.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT", - "Titanium.UI.KEYBOARD_APPEARANCE_DARK", - "Titanium.UI.KEYBOARD_APPEARANCE_LIGHT" - ] - }, - { - "name": "loginPlaceholder", - "deprecated": { - "notes": "Use [Titanium.UI.AlertDialog.loginHintText](Titanium.UI.AlertDialog.loginHintText) instead.", - "since": "5.4.0" - }, - "summary": "Placeholder of the login text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "loginHintText", - "summary": "Hint text of the login text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "loginhinttextid", - "summary": "Key identifying a string from the locale file to use for the\n[loginHintText](Titanium.UI.AlertDialog.loginHintText) property.\n", - "description": "Only one of `loginHintText` or `loginhinttextid` should be specified.", - "platforms": [ - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "loginReturnKeyType", - "summary": "Specifies the text to display on the keyboard `Return` key when this field is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.RETURNKEY_CONTINUE", - "Titanium.UI.RETURNKEY_DEFAULT", - "Titanium.UI.RETURNKEY_DONE", - "Titanium.UI.RETURNKEY_EMERGENCY_CALL", - "Titanium.UI.RETURNKEY_GO", - "Titanium.UI.RETURNKEY_GOOGLE", - "Titanium.UI.RETURNKEY_JOIN", - "Titanium.UI.RETURNKEY_NEXT", - "Titanium.UI.RETURNKEY_ROUTE", - "Titanium.UI.RETURNKEY_SEARCH", - "Titanium.UI.RETURNKEY_SEND", - "Titanium.UI.RETURNKEY_YAHOO" - ] - }, - { - "name": "loginValue", - "summary": "Value of the login text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "loginKeyboardType", - "summary": "Keyboard type to display when this text field inside the dialog is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT", - "Titanium.UI.KEYBOARD_APPEARANCE_DARK", - "Titanium.UI.KEYBOARD_APPEARANCE_LIGHT", - "Titanium.UI.KEYBOARD_TYPE_DECIMAL_PAD", - "Titanium.UI.KEYBOARD_TYPE_ASCII", - "Titanium.UI.KEYBOARD_TYPE_DEFAULT", - "Titanium.UI.KEYBOARD_TYPE_EMAIL", - "Titanium.UI.KEYBOARD_TYPE_NAMEPHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION", - "Titanium.UI.KEYBOARD_TYPE_NUMBER_PAD", - "Titanium.UI.KEYBOARD_TYPE_PHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_WEBSEARCH", - "Titanium.UI.KEYBOARD_TYPE_TWITTER", - "Titanium.UI.KEYBOARD_TYPE_URL" - ] - }, - { - "name": "message", - "summary": "Dialog message.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "messageid", - "summary": "Key identifying a string in the locale file to use for the message text.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "ok", - "summary": "Text for the `OK` button.", - "description": "This property is useful when only one button is required, as it negates the need to define\nthe `buttonNames` property. If `buttonNames` is defined, this property is ignored.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "okid", - "summary": "Key identifying a string in the locale file to use for the `ok` text.", - "description": "If `buttonNames` is defined, this property is ignored.\n", - "platforms": [ - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "passwordPlaceholder", - "deprecated": { - "notes": "Use [Titanium.UI.AlertDialog.passwordHintText](Titanium.UI.AlertDialog.passwordHintText) instead.", - "since": "5.4.0" - }, - "summary": "Placeholder of the password text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "passwordHintText", - "summary": "Hint text of the password text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "passwordhinttextid", - "summary": "Key identifying a string from the locale file to use for the\n[passwordHintText](Titanium.UI.AlertDialog.passwordHintText) property.\n", - "description": "Only one of `passwordHintText` or `hinttextid` should be specified.", - "platforms": [ - { - "since": "6.2.0", - "name": "iphone" - }, - { - "since": "6.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "passwordReturnKeyType", - "summary": "Specifies the text to display on the keyboard `Return` key when this field is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.RETURNKEY_CONTINUE", - "Titanium.UI.RETURNKEY_DEFAULT", - "Titanium.UI.RETURNKEY_DONE", - "Titanium.UI.RETURNKEY_EMERGENCY_CALL", - "Titanium.UI.RETURNKEY_GO", - "Titanium.UI.RETURNKEY_GOOGLE", - "Titanium.UI.RETURNKEY_JOIN", - "Titanium.UI.RETURNKEY_NEXT", - "Titanium.UI.RETURNKEY_ROUTE", - "Titanium.UI.RETURNKEY_SEARCH", - "Titanium.UI.RETURNKEY_SEND", - "Titanium.UI.RETURNKEY_YAHOO" - ] - }, - { - "name": "passwordValue", - "summary": "Value of the password text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "passwordKeyboardType", - "summary": "Keyboard type to display when this text field inside the dialog is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - }, - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.KEYBOARD_APPEARANCE_DEFAULT", - "Titanium.UI.KEYBOARD_APPEARANCE_DARK", - "Titanium.UI.KEYBOARD_APPEARANCE_LIGHT", - "Titanium.UI.KEYBOARD_TYPE_DECIMAL_PAD", - "Titanium.UI.KEYBOARD_TYPE_ASCII", - "Titanium.UI.KEYBOARD_TYPE_DEFAULT", - "Titanium.UI.KEYBOARD_TYPE_EMAIL", - "Titanium.UI.KEYBOARD_TYPE_NAMEPHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION", - "Titanium.UI.KEYBOARD_TYPE_NUMBER_PAD", - "Titanium.UI.KEYBOARD_TYPE_PHONE_PAD", - "Titanium.UI.KEYBOARD_TYPE_WEBSEARCH", - "Titanium.UI.KEYBOARD_TYPE_TWITTER", - "Titanium.UI.KEYBOARD_TYPE_URL" - ] - }, - { - "name": "placeholder", - "deprecated": { - "notes": "Use [Titanium.UI.AlertDialog.hintText](Titanium.UI.AlertDialog.hintText) instead.", - "since": "5.4.0" - }, - "summary": "Placeholder of the text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "persistent", - "summary": "Boolean value indicating if the alert dialog should only be cancelled by user gesture or by hide method.", - "description": "This property is useful to ensure that the alert dialog will not be ignored\nby the user when the application is paused/suspended.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": "false on iOS, true on Android" - }, - { - "name": "preferred", - "summary": "Index to define the preferred button.", - "description": "When you specify a preferred action, the alert dialog highlights the text of that\naction to give it emphasis. (If the alert also contains a cancel button, the preferred\naction receives the highlighting instead of the cancel button.) If the iOS device is\nconnected to a physical keyboard, pressing the Return key triggers the preferred action.\n\nNote that this property is only available on iOS 9 or above.\n", - "platforms": [ - { - "since": "6.0.0", - "name": "iphone" - }, - { - "since": "6.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": -1 - }, - { - "name": "returnKeyType", - "summary": "Specifies the text to display on the keyboard `Return` key when this field is focused.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "iphone" - }, - { - "since": "5.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.RETURNKEY_CONTINUE", - "Titanium.UI.RETURNKEY_DEFAULT", - "Titanium.UI.RETURNKEY_DONE", - "Titanium.UI.RETURNKEY_EMERGENCY_CALL", - "Titanium.UI.RETURNKEY_GO", - "Titanium.UI.RETURNKEY_GOOGLE", - "Titanium.UI.RETURNKEY_JOIN", - "Titanium.UI.RETURNKEY_NEXT", - "Titanium.UI.RETURNKEY_ROUTE", - "Titanium.UI.RETURNKEY_SEARCH", - "Titanium.UI.RETURNKEY_SEND", - "Titanium.UI.RETURNKEY_YAHOO" - ] - }, - { - "name": "style", - "summary": "The style for the alert dialog.", - "description": "Style of the alert dialog, specified using one of the constants from\n. Using styles other than default one can break\nyour dialog layout if more than two buttons used. All styles can handle up to two\nbuttons comfortably, except for default style can handle up to six buttons when `title`\nand `message` is empty or not given. Note that this property is only available on\niOS SDK 5 or above.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "" - }, - { - "name": "severity", - "summary": "Indicates the severity of the alert in apps built with Mac Catalyst.", - "description": "This property defines the severity options used by the severity property\nof UIAlertController. In apps built with Mac Catalyst, the severity\ndetermines the style of the presented alert. A \nalert appears with a caution icon, and an alert with a \nseverity doesn’t. UIKit ignores the alert severity on iOS.\n\nYou should only use the severity if an alert truly requires\nspecial attention from the user.\n\nFor more information, see the [Human Interface Guidelines](https://developer.apple.com/design/human-interface-guidelines/macos/windows-and-views/alerts/) on alerts.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "iphone" - }, - { - "since": "12.0.0", - "name": "ipad" - }, - { - "since": "12.0.0", - "name": "macos" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.iOS.ALERT_SEVERITY_DEFAULT", - "Titanium.UI.iOS.ALERT_SEVERITY_CRITICAL" - ] - }, - { - "name": "title", - "summary": "Title of the dialog.", - "description": "If not set, a dialog with no title bar will be created.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "titleid", - "summary": "Key identifying a string in the locale file to use for the title text.", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "value", - "summary": "Value of the text field inside the dialog.", - "description": "Note that this property is only available if dialog `style` property is defined as\n or\n.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "iphone" - }, - { - "since": "6.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android": { - "name": "Titanium.UI.Android", - "summary": "The Android-specific UI capabilities. All properties, methods and events in this namespace will\nonly work on Android systems.\n\n#### Drawer Layout\n\nThe drawer-layout components acts as a top-level container for window content that allows\nfor interactive \"drawer\" views to be pulled out from one or both vertical edges of the window.\nIt is represented by a `centerView` and optional `leftView` and `rightView` components that\ncan be swiped in and out with additional configuration and transitions. Learn more about\ndrawer-layouts in it's dedicated docs.\n", - "extends": "Titanium.Module", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "module", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/Android.yml", - "examples": [ - { - "description": "Android Preferences Example", - "code": "Create preferences interface for the application.\n\n#### `app.js`\n``` js\nvar button = Ti.UI.createButton({\n title:\t'Click to Open Preferences'\n});\nbutton.addEventListener('click', function() {\n Ti.API.info('Current value for editText: ' + Ti.App.Properties.getString('editText'));\n Ti.UI.Android.openPreferences();\n});\ncurrentWindow.add(button);\n```\n\n#### `platform/android/res/xml/preferences.xml`\n``` xml\n\n\n \n \n \n \n \n \n \n \n \n \n\n```\n\n#### `platform/android/res/values/array/array.xml`\n``` xml\n\n\n \n 5 Minutes\n 10 Minutes\n 15 Minutes\n 30 Minutes\n 60 Minutes\n \n \n 5\n 10\n 15\n 30\n 60\n \n\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "harmonizedColor", - "summary": "Creates a harmonizing color", - "description": "Shifts the hue of the input color towards the hue of colorPrimary and returns a new color\nas a hex string. Usage: `Ti.UI.Android.harmonizedColor(\"#ff0000\");`\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "color", - "summary": "Input Color", - "type": [ - "String", - "Titanium.UI.Color" - ] - } - ], - "returns": { - "type": "String" - } - }, - { - "name": "moveToBackground", - "summary": "Moves the app to the background", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hideSoftKeyboard", - "summary": "Hides the soft keyboard.\n", - "description": "Be aware that it is not currently possible in the native Android API to detect that the\nkeyboard is already visible or to globally show the keyboard.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openPreferences", - "summary": "Opens an application preferences dialog, using the native Android system settings interface,\ndefined by the platform-specific `preferences.xml` and `array.xml` files.\n", - "description": "The preferences configuration files must be created in the project folders,\n`platform/android/res/xml/preferences.xml` and `platform/android/res/values/array/array.xml`.\n\nThe preferences values can be accessed via .\n\nSee the example for a demonstration, and the official Android Developer documentation for\nthe [preferences.xml](https://developer.android.com/guide/topics/ui/settings.html#DefiningPrefs)\nformat.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "getColorResource", - "summary": "Returns a instance for a color defined by the system or user resources (colors.xml)\n", - "description": "This method allows converting a known color resource id or short name to an actual color instance.\n\nThe resource id values can be accessed via and properties.\n\nSee the official Android Developer documentation for\nthe [R.color](https://developer.android.com/reference/android/R.color) constants.\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "resourceIdOrColorName", - "summary": "integer resource id for a color, or the name of the color defined in the application resources (colors.xml).", - "type": [ - "Number", - "String" - ] - } - ], - "returns": { - "type": "Titanium.UI.Color" - } - }, - { - "name": "createCardView", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.CardView" - } - }, - { - "name": "createCollapseToolbar", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.CollapseToolbar" - } - }, - { - "name": "createDrawerLayout", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.DrawerLayout" - } - }, - { - "name": "createFloatingActionButton", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.FloatingActionButton" - } - }, - { - "name": "createProgressIndicator", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.ProgressIndicator" - } - }, - { - "name": "createSearchView", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.SearchView" - } - }, - { - "name": "createSnackbar", - "deprecated": null, - "summary": "Creates and returns an instance of .\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "parameters", - "summary": "Properties to set on a new object, including any defined by except those marked not-creation or read-only.\n", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "Titanium.UI.Android.Snackbar" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "FLAG_LAYOUT_NO_LIMITS", - "summary": "Flag allowing window to extend into the status bar and navigation bar.", - "description": "When assigned to [Window.windowFlags](Titanium.UI.Window.windowFlags), this flag will make the\nwindow ignore the system's insets such as the top status bar and bottom navigation bar so that\nthey overlap the window. The system may make the status bar and navigation bar completely transparent,\nbut this behavior is not guaranteed to happen.\n\nWhen using this flag, it's also recommended to set the\n[Window.extendSafeArea](Titanium.UI.Window.extendSafeArea) property to `true`.\n\nWarning: Using this flag causes [Window.safeAreaPadding](Titanium.UI.Window.safeAreaPadding)\nto return all zeros. This flag also breaks keyboard `adjustPan` support.\n", - "platforms": [ - { - "since": "10.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_TRANSLUCENT_NAVIGATION", - "summary": "Window flag which makes the Android system's navigation bar semi-transparent.", - "description": "When assigned to , this flag will make the Android\nsystem's bottom navigation bar semi-transparent. This flag will only work if you also set the\n[Window.extendSafeArea](Titanium.UI.Window.extendSafeArea) property to `true`.\n\nThis flag is only supported by Android 4.4 and newer OS versions. This flag is ignored on older versions.\nOn Android 4.4, navigation bar can only be translucent in portrait mode while newer OS versions support\nthis flag for all orientations.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "FLAG_TRANSLUCENT_STATUS", - "summary": "Window flag which makes the Android system's top status bar semi-transparent.", - "description": "When assigned to , this flag will make the Android\nsystem's top status bar semi-transparent. This flag will only work if you also set the\n property to `true`.\n\nThis flag is only supported by Android 4.4 and newer OS versions. This flag is ignored on older versions.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_CLIP", - "summary": "Raw bit controlling whether the right/bottom edge is clipped to its container, based on the gravity direction being applied.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_PULL_AFTER", - "summary": "Raw bit controlling how the right/bottom edge is placed.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_PULL_BEFORE", - "summary": "Raw bit controlling how the left/top edge is placed.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_SPECIFIED", - "summary": "Raw bit indicating the gravity for an axis has been specified.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_X_SHIFT", - "summary": "Bits defining the horizontal axis.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_AXIS_Y_SHIFT", - "summary": "Bits defining the vertical axis.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_BOTTOM", - "summary": "Push object to the bottom of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_CENTER", - "summary": "Place the object in the center of its container in both the vertical and horizontal axis, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_CENTER_HORIZONTAL", - "summary": "Place object in the horizontal center of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_CENTER_VERTICAL", - "summary": "Place object in the vertical center of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_CLIP_HORIZONTAL", - "summary": "Flag to clip the edges of the object to its container along the horizontal axis.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_CLIP_VERTICAL", - "summary": "Flag to clip the edges of the object to its container along the vertical axis.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_DISPLAY_CLIP_HORIZONTAL", - "summary": "Special constant to enable clipping to an overall display along the horizontal dimension.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_DISPLAY_CLIP_VERTICAL", - "summary": "Special constant to enable clipping to an overall display along the vertical dimension.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_END", - "summary": "Push object to x-axis position at the end of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_FILL", - "summary": "Grow the horizontal and vertical size of the object if needed so it completely fills its container.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_FILL_HORIZONTAL", - "summary": "Grow the horizontal size of the object if needed so it completely fills its container.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_FILL_VERTICAL", - "summary": "Grow the vertical size of the object if needed so it completely fills its container.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_HORIZONTAL_GRAVITY_MASK", - "summary": "Binary mask to get the absolute horizontal gravity of a gravity.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_LEFT", - "summary": "Push object to the left of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_NO_GRAVITY", - "summary": "Constant indicating that no gravity has been set", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_RELATIVE_HORIZONTAL_GRAVITY_MASK", - "summary": "Binary mask for the horizontal gravity and script specific direction bit.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_RELATIVE_LAYOUT_DIRECTION", - "summary": "Raw bit controlling whether the layout direction is relative or not (GRAVITY_START/GRAVITY_END instead of absolute GRAVITY_LEFT/GRAVITY_RIGHT).", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_RIGHT", - "summary": "Push object to the right of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_START", - "summary": "Push object to x-axis position at the start of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_TOP", - "summary": "Push object to the top of its container, not changing its size.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "GRAVITY_VERTICAL_GRAVITY_MASK", - "summary": "Binary mask to get the vertical gravity of a gravity.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "OVER_SCROLL_ALWAYS", - "summary": "Always allow a user to over-scroll this view, provided it is a view that can scroll.", - "description": "Use this with the following properties - , ,\n and .\n\nOnly applicable when is 9 or above.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "OVER_SCROLL_IF_CONTENT_SCROLLS", - "summary": "Allow a user to over-scroll this view only if the content is large enough to meaningfully scroll, provided it is a view that can scroll.", - "description": "Use this with the following properties - , ,\n and .\n\nOnly applicable when is 9 or above.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "OVER_SCROLL_NEVER", - "summary": "Never allow a user to over-scroll this view.", - "description": "Use this with the following properties - , ,\n and .\n\nOnly applicable when is 9 or above.\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_A_8", - "summary": "Android A_8 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_LA_88", - "summary": "Android LA_88 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_L_8", - "summary": "Android L_8 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_OPAQUE", - "summary": "Android OPAQUE pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGBA_4444", - "summary": "Android RGBA_4444 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGBA_5551", - "summary": "Android RGBA_5551 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGBA_8888", - "summary": "Android RGBA_8888 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGBX_8888", - "summary": "Android RGBX_8888 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGB_332", - "summary": "Android RGB_332 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGB_565", - "summary": "Android RGB_565 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_RGB_888", - "summary": "Android RGB_888 pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_TRANSLUCENT", - "summary": "Android TRANSLUCENT pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_TRANSPARENT", - "summary": "Android A_8 pixel format for . Selecting the correct pixel format can\nimprove image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PIXEL_FORMAT_UNKNOWN", - "summary": "Android UNKNOWN pixel format for . Selecting the correct pixel format\ncan improve image clarity and performance.\n", - "description": "See the Android Developer website for official documentation about the\n[PixelFormat](https://developer.android.com/reference/android/graphics/PixelFormat.html)\nconstants.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PROGRESS_INDICATOR_DIALOG", - "summary": "Display as a modal dialog. (default)", - "description": "Used with the property.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PROGRESS_INDICATOR_STATUS_BAR", - "summary": "Display as a horizontal progress bar in the title of\nthe window.\n", - "description": "Used with the property.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PROGRESS_INDICATOR_INDETERMINANT", - "summary": "Used with the property to indicate an ongoing\nactivity of indeterminate length. (default)\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "PROGRESS_INDICATOR_DETERMINANT", - "summary": "Used with the property to indicate an ongoing\nactivity of determinate length.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_ADJUST_PAN", - "summary": "Pan the current heavyweight window when the input method (ie software keyboard) is shown, to\nensure that its contents are not obscured.\n", - "description": "Used with the property.\n\nOne of the group of soft input adjustment constants,\n[SOFT_INPUT_ADJUST_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_ADJUST_UNSPECIFIED),\n[SOFT_INPUT_ADJUST_RESIZE](Titanium.UI.Android.SOFT_INPUT_ADJUST_RESIZE),\nand [SOFT_INPUT_ADJUST_PAN](Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_ADJUST_RESIZE", - "summary": "Resize the current heavyweight window when the input method (ie software keyboard) is shown,\nto ensure that its contents are not obscured.\n", - "description": "Used with the property.\n\nOne of the group of soft input adjustment constants,\n[SOFT_INPUT_ADJUST_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_ADJUST_UNSPECIFIED),\n[SOFT_INPUT_ADJUST_RESIZE](Titanium.UI.Android.SOFT_INPUT_ADJUST_RESIZE),\nand [SOFT_INPUT_ADJUST_PAN](Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_ADJUST_NOTHING", - "summary": "The window will not be resized, and it will not be panned to make its focus visible.\n", - "description": "Used with the property.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_ADJUST_UNSPECIFIED", - "summary": "Use the system-default behavior to determine how the soft input area (ie software keyboard)\nis accomodated by the current heavyweight window when it receives focus (default.)\n", - "description": "Depends on the `AndroidManifest.xml` setting if defined or system-default otherwise to\ndetermine how to accomodate the soft keyboard when visible.\n\nUsed with the property.\n\nOne of the group of soft input adjustment constants,\n[SOFT_INPUT_ADJUST_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_ADJUST_UNSPECIFIED),\n[SOFT_INPUT_ADJUST_RESIZE](Titanium.UI.Android.SOFT_INPUT_ADJUST_RESIZE),\nand [SOFT_INPUT_ADJUST_PAN](Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_STATE_ALWAYS_HIDDEN", - "summary": "Always hide the soft input area (ie software keyboard) when the current heavyweight window\nreceives focus.\n", - "description": "Note that the unresolved bug [#7115](https://code.google.com/p/android/issues/detail?id=7115)\non the Official Android Project website affects this functionality.\n\nUsed with the property.\n\nOne of the group of soft input visibility constants,\n[SOFT_INPUT_STATE_ALWAYS_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN),\n[SOFT_INPUT_STATE_ALWAYS_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE),\n[SOFT_INPUT_STATE_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_HIDDEN),\n[SOFT_INPUT_STATE_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED),\nand [SOFT_INPUT_STATE_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_VISIBLE).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_STATE_ALWAYS_VISIBLE", - "summary": "Always show the soft input area (ie software keyboard) when the current heavyweight window\nreceives focus.\n", - "description": "Used with the property.\n\nThis constant is one of the group of soft input visibility constants,\n[SOFT_INPUT_STATE_ALWAYS_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN),\n[SOFT_INPUT_STATE_ALWAYS_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE),\n[SOFT_INPUT_STATE_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_HIDDEN),\n[SOFT_INPUT_STATE_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED),\nand [SOFT_INPUT_STATE_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_VISIBLE).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_STATE_HIDDEN", - "summary": "Attempt to hide the soft input area (ie software keyboard) when the current heavyweight\nwindow receives focus.\n", - "description": "Used with the property.\n\nThis constant is one of the group of soft input visibility constants,\n[SOFT_INPUT_STATE_ALWAYS_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN),\n[SOFT_INPUT_STATE_ALWAYS_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE),\n[SOFT_INPUT_STATE_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_HIDDEN),\n[SOFT_INPUT_STATE_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED),\nand [SOFT_INPUT_STATE_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_VISIBLE).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_STATE_UNSPECIFIED", - "summary": "Use the system-default behavior to determine whether to show the soft input area\n(ie software keyboard) when the current heavyweight window receives focus.\n", - "description": "Used with the property.\n\nThis constant is one of the group of soft input visibility constants,\n[SOFT_INPUT_STATE_ALWAYS_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN),\n[SOFT_INPUT_STATE_ALWAYS_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE),\n[SOFT_INPUT_STATE_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_HIDDEN),\n[SOFT_INPUT_STATE_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED),\nand [SOFT_INPUT_STATE_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_VISIBLE).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_INPUT_STATE_VISIBLE", - "summary": "Attempt to show the soft input area (ie software keyboard) when the current heavyweight\nwindow receives focus.\n", - "description": "Used with the property.\n\nThis constant is one of the group of soft input visibility constants,\n[SOFT_INPUT_STATE_ALWAYS_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN),\n[SOFT_INPUT_STATE_ALWAYS_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE),\n[SOFT_INPUT_STATE_HIDDEN](Titanium.UI.Android.SOFT_INPUT_STATE_HIDDEN),\n[SOFT_INPUT_STATE_UNSPECIFIED](Titanium.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED),\nand [SOFT_INPUT_STATE_VISIBLE](Titanium.UI.Android.SOFT_INPUT_STATE_VISIBLE).\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "summary": "Use Android default behavior to handle keyboard visibility when a view receives focus.\n(default)\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_KEYBOARD_HIDE_ON_FOCUS", - "summary": "Attempt to hide the soft keyboard when a view receives focus. Note: system can override\nrequest.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SOFT_KEYBOARD_SHOW_ON_FOCUS", - "summary": "Attempt to show the soft keyboard when a view receives focus. Note: system can override\nrequest.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "STATUS_BAR_LIGHT", - "summary": "Sets the color of the status bar to light mode. Needs Android API level 23.", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SWITCH_STYLE_CHECKBOX", - "deprecated": { - "notes": "Use instead.", - "since": "10.0.0" - }, - "summary": "Display a checkbox.", - "description": "Use with the property.", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SWITCH_STYLE_TOGGLEBUTTON", - "deprecated": { - "notes": "Use instead.", - "since": "10.0.0" - }, - "summary": "Display a toggle button.", - "description": "Use with the property.", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SWITCH_STYLE_SWITCH", - "deprecated": { - "notes": "Use instead.", - "since": "10.0.0" - }, - "summary": "Display a switch.", - "description": "Use with the property.", - "platforms": [ - { - "since": "4.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_PLUGINS_OFF", - "summary": "Use with [WebView.pluginState](Titanium.UI.WebView.pluginState) to disable plugins in a web view.\n", - "description": "Content that requires a plugin, is not loaded, and any\nalternative content is displayed instead.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_PLUGINS_ON", - "summary": "Use with [WebView.pluginState](Titanium.UI.WebView.pluginState) to enable plugins in a web view.\n", - "description": "Content that requires a plugin,, is always loaded, whether or not a plugin is\navailable for the content.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_PLUGINS_ON_DEMAND", - "summary": "Display a placeholder and only load plugins when user selects it.", - "description": "Content that requires a plugin, is replaced by a placeholder. When\nthe user clicks on the placeholder, the plugin is loaded and the content is displayed.\n\nUse with [WebView.pluginState](Titanium.UI.WebView.pluginState) to load plugins on demand.\n", - "platforms": [ - { - "since": "1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_LOAD_DEFAULT", - "summary": "Use with [WebView.cacheMode](Titanium.UI.WebView.cacheMode) to override how the cache is used in a web view.\n", - "description": "This is the default cache usage mode.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_LOAD_NO_CACHE", - "summary": "Use with [WebView.cacheMode](Titanium.UI.WebView.cacheMode) to override how the cache is used in a web view.\n", - "description": "Don't use cache, load from the network.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_LOAD_CACHE_ONLY", - "summary": "Use with [WebView.cacheMode](Titanium.UI.WebView.cacheMode) to override how the cache is used in a web view.\n", - "description": "Don't use network, load from the cache only.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_LOAD_CACHE_ELSE_NETWORK", - "summary": "Use with [WebView.cacheMode](Titanium.UI.WebView.cacheMode) to override how the cache is used in a web view.\n", - "description": "Use cached resources when they're available, even when they're expired. Otherwise load resources via network.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_EXPLODE", - "summary": "Moves views in or out from the edges of the scene.\n", - "description": "Use this only for activity transition.\nRefers to [Explode](https://developer.android.com/reference/android/transition/Explode.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_FADE_IN", - "summary": "Fades in the views.\n", - "description": "Use this only for activity transition.\nRefers to [Fade](https://developer.android.com/reference/android/transition/Fade.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_FADE_OUT", - "summary": "Fades out the views.\n", - "description": "Use this only for activity transition.\nRefers to [Fade](https://developer.android.com/reference/android/transition/Fade.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_SLIDE_TOP", - "summary": "Moves views to top.\n", - "description": "Use this only for activity transition.\nRefers to [Slide](https://developer.android.com/reference/android/transition/Slide.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_SLIDE_RIGHT", - "summary": "Moves views to right.\n", - "description": "Use this only for activity transition.\nRefers to [Slide](https://developer.android.com/reference/android/transition/Slide.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_SLIDE_BOTTOM", - "summary": "Moves views to bottom.\n", - "description": "Use this only for activity transition.\nRefers to [Slide](https://developer.android.com/reference/android/transition/Slide.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_SLIDE_LEFT", - "summary": "Moves views to left.\n", - "description": "Use this only for activity transition.\nRefers to [Slide](https://developer.android.com/reference/android/transition/Slide.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_CHANGE_BOUNDS", - "summary": "Captures layout bounds of target views before and after the scene change and animates those changes during the transition.\n", - "description": "Use this only for shared element transition.\nRefers to [ChangeBounds](https://developer.android.com/reference/android/transition/ChangeBounds.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_CHANGE_CLIP_BOUNDS", - "summary": "Captures the clip bounds before and after the scene change and animates those changes during the transition.\n", - "description": "Use this only for shared element transition.\nRefers to [ChangeClipBounds](https://developer.android.com/reference/android/transition/ChangeClipBounds.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_CHANGE_TRANSFORM", - "summary": "Captures scale and rotation for Views before and after the scene change and animates those changes during the transition.\n", - "description": "Use this only for shared element transition.\nRefers to [ChangeTransform](https://developer.android.com/reference/android/transition/ChangeTransform.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_CHANGE_IMAGE_TRANSFORM", - "summary": "Captures an ImageView's matrix before and after the scene change and animates it during the transition.\n", - "description": "Use this only for shared element transition.\nRefers to [ChangeImageTransform](https://developer.android.com/reference/android/transition/ChangeImageTransform.html) transition.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TRANSITION_NONE", - "summary": "Resets transition to platform default.\n", - "description": "Can be used with activity and shared element transtion.\n", - "platforms": [ - { - "since": "5.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TABS_STYLE_DEFAULT", - "summary": "The default TabGroup style that places the Tabs bellow the ActionBar and above the Window content.", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TABS_STYLE_BOTTOM_NAVIGATION", - "summary": "TabGroup style taking advantage of a bottom navigation controller for switching between tabs.", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "TAB_MODE_FIXED", - "summary": "Set the TabGroup tab mode to fixed (default).", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation" - }, - { - "name": "TAB_MODE_SCROLLABLE", - "summary": "Set the TabGroup tab mode to scrollable.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number", - "availability": "creation" - }, - { - "name": "SCROLL_FLAG_ENTER_ALWAYS", - "summary": "When entering (scrolling on screen) the view will scroll on any downwards scroll event, regardless of whether the scrolling view is also scrolling. This is commonly referred to as the 'quick return' pattern.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED", - "summary": "An additional flag for 'enterAlways' which modifies the returning view to only initially scroll back to it's collapsed height. Once the scrolling view has reached the end of it's scroll range, the remainder of this view will be scrolled into view. The collapsed height is defined by the view's minimum height.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_EXIT_UNTIL_COLLAPSED", - "summary": "When exiting (scrolling off screen) the view will be scrolled until it is 'collapsed'. The collapsed height is defined by the view's minimum height.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_NO_SCROLL", - "summary": "Disable scrolling on the view. This flag should not be combined with any of the other scroll flags.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_SCROLL", - "summary": "The view will be scroll in direct relation to scroll events. This flag needs to be set for any of the other flags to take effect. If any sibling views before this one do not have this flag, then this value has no effect.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_SNAP", - "summary": "Upon a scroll ending, if the view is only partially visible then it will be snapped and scrolled to its closest edge. For example, if the view only has its bottom 25% displayed, it will be scrolled off screen completely. Conversely, if its bottom 75% is visible then it will be scrolled fully into view.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "SCROLL_FLAG_SNAP_MARGINS", - "summary": "An additional flag to be used with 'snap'. If set, the view will be snapped to its top and bottom margins, as opposed to the edges of the view itself.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_SCROLLBARS_DEFAULT", - "summary": "Show horizontal and vertical scrollbar in a Ti.UI.WebView.", - "platforms": [ - { - "since": "12.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_SCROLLBARS_HIDE_VERTICAL", - "summary": "Hide vertical scrollbar in a Ti.UI.WebView.", - "platforms": [ - { - "since": "12.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_SCROLLBARS_HIDE_HORIZONTAL", - "summary": "Hide horizontal scrollbar in a Ti.UI.WebView.", - "platforms": [ - { - "since": "12.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "WEBVIEW_SCROLLBARS_HIDE_ALL", - "summary": "Hide all scrollbars in a Ti.UI.WebView.", - "platforms": [ - { - "since": "12.3.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - } - ] - }, - "Titanium.UI.Android.CardView": { - "name": "Titanium.UI.Android.CardView", - "summary": "CardView provides a layout container with rounded corners and a shadow indicating the view is elevated.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/CardView.yml", - "description": "| Android |\n| ------- |\n| ![Android](./cardview_android.png) |\n\nUse a CardView to layout content that:\n\n * Comprises multiple data types\n * Does not require direct comparison\n * Supports variable length content or displays more than three lines of text\n * Contains rich content or interactive elements, such as comments or a favorite button\n\nIf you are displaying a collection of the same type in a uniform layout without many actions,\nuse a [ListView](Titanium.UI.ListView) or [TableView](Titanium.UI.TableView) instead.\n\nFor design guidelines, see\n[Google Design Guidelines: Cards](http://www.google.com/design/spec/components/cards.html)\n\nCardView does not support , , or .\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "focus", - "summary": "Fired when the view element gains focus.", - "description": "This event only fires when using the trackball to navigate.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longclick", - "summary": "Fired when the device detects a long click.", - "description": "A long click is generated by touching and holding on the touchscreen or holding down the\ntrackball button.\n\nThe event occurs before the finger/button is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nAs the trackball can fire this event, it is not intended to return the `x` and `y`\ncoordinates of the touch, even when it is generated by the touchscreen.\n\nA `longclick` blocks a `click`, meaning that a `click` event will not fire when a\n`longclick` listener exists.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "pinch", - "summary": "Fired when the device detects a pinch gesture.", - "description": "A pinch is a touch and expand or contract\nwith two fingers. The event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "scale", - "summary": "The scale factor relative to the points of the two touches in screen coordinates.", - "type": "Number" - }, - { - "name": "velocity", - "summary": "The velocity of the pinch in scale factor per second.", - "type": "Number" - }, - { - "name": "time", - "summary": "The event time of the current event being processed.", - "type": "Number" - }, - { - "name": "timeDelta", - "summary": "The time difference in milliseconds between the previous accepted scaling event and the\ncurrent scaling event.\n", - "type": "Number" - }, - { - "name": "currentSpan", - "summary": "The average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanX", - "summary": "The average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanY", - "summary": "The average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpan", - "summary": "The previous average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanX", - "summary": "The previous average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanY", - "summary": "The previous average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "focusX", - "summary": "The X coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "focusY", - "summary": "The Y coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "inProgress", - "summary": "Returns `true` if a scale gesture is in progress, `false` otherwise.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the single tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch\nevents, so this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "twofingertap", - "summary": "Fired when the device detects a two-finger tap against the view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple Alloy example", - "code": "``` xml\n\n \n \n \n \n\n```\n" - }, - { - "description": "CardView used in a ScrollView", - "code": "The following example creates a CardView used in a ScrollView.\n\n``` js\nvar win = Ti.UI.createWindow({\n title: 'Card Demo'\n});\nvar scrollView = Ti.UI.createScrollView({\n layout: 'vertical'\n});\nfor (var index = 1; index <= 10; index++) {\n var cardView = Ti.UI.Android.createCardView({\n layout: 'vertical',\n padding: '16dp',\n top: '10dp',\n left: '10dp',\n right: '10dp',\n });\n cardView.add(Ti.UI.createLabel({\n text: 'Card ' + index,\n maxLines: 1,\n font: {\n fontSize: '20dp',\n fontWeight: 'bold'\n },\n width: Ti.UI.FILL\n }));\n cardView.add(Ti.UI.createLabel({\n text: 'This is the card view description text.\\nThis is the 2nd line of text.',\n textAlign: Ti.UI.TEXT_ALIGNMENT_LEFT,\n width: Ti.UI.FILL\n }));\n scrollView.add(cardView);\n}\nwin.add(scrollView);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Adds a child to this view's hierarchy.", - "description": "The child view is added as the last child in this view's hierarchy.\n\nAlthough all views inherit from , not all views are capable of\ncontaining other views. In particular:\n\n* Some views are not designed to be containers at all.\n* Some views are special-purpose containers that can only contain certain other\n views.\n* Some views are top-level containers that cannot (or should not) be added to other views.\n\n#### Non-Container Views\n\nThe following views are not intended to act as containers that can hold other\nviews:\n\n* [ActivityIndicator](Titanium.UI.ActivityIndicator)\n* [Button](Titanium.UI.Button)\n* [ImageView](Titanium.UI.ImageView)\n* [Label](Titanium.UI.Label)\n* [ProgressBar](Titanium.UI.ProgressBar)\n* [SearchBar](Titanium.UI.SearchBar)\n* [Slider](Titanium.UI.Slider)\n* [Switch](Titanium.UI.Switch)\n* [TableView](Titanium.UI.TableView)\n* [TextArea](Titanium.UI.TextArea)\n* [TextField](Titanium.UI.TextField)\n* [WebView](Titanium.UI.WebView)\n\nAdding children to the these views _may_ be supported on some platforms,\nbut is not guaranteed to work across platforms. Where it is supported, it may not\nwork as expected.\n\nFor maximum portability, these views should be treated as if they do not support children.\nInstead of adding children to these views, applications can position other views as\nsiblings. For example, instead of adding a button as a child of a `WebView`, you can add\nthe button to the web view's parent such that it appears on top of the web view.\n\n#### Special-Purpose Containers\n\nA few view objects act as special-purpose containers--that is, they only manage\ncertain types of children, and many of them support a special means of adding\nthese children, instead of the general `add` method. These containers include:\n\n* [ButtonBar](Titanium.UI.ButtonBar) and [TabbedBar](Titanium.UI.iOS.TabbedBar) are designed\n to hold their own internally-created buttons, assigned by adding strings to the \"labels\" array.\n Views added using the `add` method are displayed on top of these buttons.\n\n* [Picker](Titanium.UI.Picker). Can only hold `PickerRows` and `PickerColumns`, which\n are added using the `add` method. Adding other types of views to a `Picker` is not\n supported.\n\n* [TableView](Titanium.UI.TableView) is a specialized container for\n `TableViewSection` and `TableViewRow` objects. These objects must be\n added using the properties and methods that `TableView` provides\n for adding and removing sections and rows.\n\n On some platforms, it is possible to add arbitrary child views to a table view\n using the `add` method. However, this is not guaranteed to work on all platforms,\n and in general, should be avoided.\n\n* [TableViewSection](Titanium.UI.TableViewSection) is a specialized container\n for `TableViewRow` objects, which _are_ added using the `add` method. The `add` method\n on `TableViewSection` can only be used to add `TableViewRow` objects.\n\n* [Toolbar](Titanium.UI.iOS.Toolbar) is designed to hold buttons and certain\n other controls, added to its `items` array. Views added using the `add` method are\n displayed on top of the controls in the `items` array.\n\n* The `Tab`, `TabGroup`, `NavigationWindow` and `SplitWindow` objects are\n special containers that manage windows. These are discussed in the\n \"Top-Level Containers\" section.\n\n\n#### Top-Level Containers\n\nThere are certain top-level containers that are not intended to be added\nas the children of other views. These top-level containers include\n, , ,\nand . Other types of views must be added\nto a top-level container in order to be displayed on screen.\n\nThe special containers ,\n, , and\n manage windows.\nThese managed windows may be referred to as *children* of the\ncontainer, but they are not added using the `add` method.\n\n`Tab` is another kind of special container: it is not itself a top-level container,\nbut can only be used within a `TabGroup`. You cannot `add` a `Tab` to an arbitrary\ncontainer.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to add to this view's hierarchy.\n\nYou may pass an array of views, e.g. `view.add([subview1, subview2]`.\n", - "type": [ - "Titanium.UI.View", - "Array" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "animate", - "summary": "Animates this view.", - "description": "The [Animation](Titanium.UI.Animation) object or dictionary passed to this method defines\nthe end state for the animation, the duration of the animation, and other properties.\n\nNote that on SDKs older than 9.1.0 - if you use `animate` to move a view, the view's actual *position* is changed, but\nits layout properties, such as `top`, `left`, `center` and so on are not changed--these\nreflect the original values set by the user, not the actual position of the view.\n\nAs of SDK 9.1.0, the final values of the animation will be set on the view just before the `complete` event and/or the callback is fired.\n\nThe [rect](Titanium.UI.View.rect) property can be used to determine the actual size and\nposition of the view.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "animation", - "summary": "Either a dictionary of animation properties or an\n[Animation](Titanium.UI.Animation) object.\n", - "type": [ - "Titanium.UI.Animation", - "Dictionary" - ] - }, - { - "name": "callback", - "summary": "Function to be invoked upon completion of the animation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "remove", - "summary": "Removes a child view from this view's hierarchy.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to remove from this view's hierarchy.", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllChildren", - "summary": "Removes all child views from this view's hierarchy.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "toImage", - "summary": "Returns an image of the rendered view, as a Blob.", - "description": "The `honorScaleFactor` argument is only supported on iOS.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "callback", - "summary": "Function to be invoked upon completion. If non-null, this method will be performed\nasynchronously. If null, it will be performed immediately.\n", - "type": "Callback", - "optional": true - }, - { - "name": "honorScaleFactor", - "summary": "Determines whether the image is scaled based on scale factor of main screen. (iOS only)\n\nWhen set to true, image is scale factor is honored. When set to false, the image in the\nblob has the same dimensions for retina and non-retina devices.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "convertPointToView", - "summary": "Translates a point from this view's coordinate system to another view's coordinate system.\n", - "description": "Returns `null` if either view is not in the view hierarchy.\n\nKeep in mind that views may be removed from the view hierarchy if their window is blurred\nor if the view is offscreen (such as in some situations with ).\n\nIf this view is a , the view's x and y offsets are subtracted from\nthe return value.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "point", - "summary": "A point in this view's coordinate system.\n\nIf this argument is missing an `x` or `y` property, or the properties can not be\nconverted into numbers, an exception will be raised.\n", - "type": "Point" - }, - { - "name": "destinationView", - "summary": "View that specifies the destination coordinate system to convert to. If this argument\nis not a view, an exception will be raised.\n", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "Point" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHidden", - "summary": "Whether the view should be \"hidden\" from (i.e., ignored by) the accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityElementsHidden` property defined in the\n[UIAccessibility\nProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\n\nOn Android, setting `accessibilityHidden` calls the native\n[View.setImportantForAccessibility](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29)\nmethod. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and\nlater; if this property is specified on earlier versions of Android, it is ignored.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "On iOS this is a direct analog of the `accessibilityHint` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityLabel` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to Title or label of the control.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityValue` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to State or value of the control.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on iOS only. For Android, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nSee the \"Using an anchorPoint\" example in for a demonstration.\nThe default is center of this view.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "backgroundColor", - "summary": "Background color for CardView as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "backgroundDisabledColor", - "summary": "Disabled background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundDisabledImage", - "summary": "Disabled background image for the view, specified as a local file path or URL.", - "description": "If `backgroundDisabledImage` is undefined, and the normal background image`backgroundImage`\nis set, the normal image is used when this view is disabled.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedColor", - "summary": "Focused background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nFor normal views, the focused color is only used if `focusable` is `true`.\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedImage", - "summary": "Focused background image for the view, specified as a local file path or URL.", - "description": "For normal views, the focused background is only used if `focusable` is `true`.\nIf `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage`\nis set, the normal image is used when this view is focused.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundSelectedColor", - "summary": "Selected background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to transparent, so the background color of this view will be used.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundSelectedImage", - "summary": "Selected background image URL for the view, specified as a local file path or URL.", - "description": "For normal views, the selected background is only used if `focusable` is `true`.\n\nIf `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set\nthe normal image is used when this view is selected.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "borderRadius", - "summary": "Corner radius for CardView.", - "description": "Each corner is rounded using an arc of a circle.\nValues for each corner can be specified. For example, '20px 20px' will set both left and right corners to `20px`.\nSpecifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.\n\nIf you have issues with dark artifacts on Android you can try to disable Hardware acceleration by setting a\n`backgroundColor` with a small amount of transparency: `backgroundColor:\"rgba(255,255,255,254)\"`.\n", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number", - "default": 0 - }, - { - "name": "borderWidth", - "summary": "Border width of the view.", - "description": "If [borderColor](Titanium.UI.View.borderColor) is set without [borderWidth](Titanium.UI.View.borderWidth), this value\nwill be changed to 1 of the unit declared as 'ti.ui.defaultunit' in tiapp.xml descriptor.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": 0 - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "center", - "summary": "View's center position, in the parent view's coordinates.", - "description": "This is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "children", - "summary": "Array of this view's child views.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Array", - "permission": "read-only" - }, - { - "name": "elevation", - "summary": "Elevation for CardView.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "focusable", - "summary": "Whether view should be focusable while navigating with the trackball.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "layout", - "summary": "Specifies how the view positions its children.\nOne of: 'composite', 'vertical', or 'horizontal'.\n", - "description": "There are three layout options:\n\n* `composite` (or `absolute`). Default layout. A child view is positioned based on its\n positioning properties or \"pins\" (`top`, `bottom`, `left`, `right` and `center`).\n If no positioning properties are specified, the child is centered.\n\n The child is always sized based on its `width` and `height` properties, if these are\n specified. If the child's height or width is *not* specified explicitly, it may be\n calculated implicitly from the positioning properties. For example, if both `left` and\n `center.x` are specified, they can be used to calculate the width of the child control.\n\n Because the size and position properties can conflict, there is a specific precedence\n order for the layout properties. For vertical positioning, the precedence\n order is: `height`, `top`, `center.y`, `bottom`.\n\n The following table summarizes the various combinations of properties that can\n be used for vertical positioning, in order from highest precedence to lowest.\n (For example, if `height`, `center.y` and `bottom` are all specified, the\n `height` and `center.y` values take precedence.)\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScenarioBehavior
height & top specified\n Child positioned top unit from parent's top, using specified height;\n any center.y and bottom values are ignored.\n
height & center.y specified\n Child positioned with center at center.y, using specified height;\n any bottom value is ignored.\n
height & bottom specifiedChild positioned bottom units from parent's bottom, using specified height.
top & center.y specified\n Child positioned with top edge top units from parent's top and center at\n center.y. Height is determined implicitly; any bottom value is ignored.\n
top & bottom specified\n Child positioned with top edge top units from parent's top and bottom edge\n bottom units from parent's bottom. Height is determined implicitly.\n
Only top specified\n Child positioned top units from parent's top, and uses the default height\n calculation for the view type.\n
center.y and bottom specified\n Child positioned with center at center.y and bottom edge bottom\n units from parent's bottom. Height is determined implicitly.\n
Only center.y specifiedChild positioned with center at center.y, and uses the default height calculation for the view type.
Only bottom specifiedChild positioned with bottom edge bottom units from parent's bottom, and uses the default height calculation for the view type.
height, top, center.y, and bottom unspecifiedChild entered vertically in the parent and uses the default height calculation for the child view type.
\n\n Horizontal positioning works like vertical positioning, except that the\n precedence is `width`, `left`, `center.x`, `right`.\n\n For complete details on composite layout rules, see\n [Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n in the Titanium Mobile Guides.\n\n * `vertical`. Children are laid out vertically from top to bottom. The first child\n is laid out `top` units from its parent's bounding box. Each subsequent child is\n laid out below the previous child. The space between children is equal to the\n upper child's `bottom` value plus the lower child's `top` value.\n\n Each child is positioned horizontally as in the composite layout mode.\n\n * `horizontal`. Horizontal layouts have different behavior depending on whether wrapping\n is enabled. Wrapping is enabled by default (the `horizontalWrap` property is `true`).\n\n With wrapping behavior, the children are laid out horizontally from left to right,\n _in rows_. If a child requires more horizontal space than exists in the current row,\n it is wrapped to a new row. The height of each row is equal to the maximum height of\n the children in that row.\n\n Wrapping behavior is available on iOS and Android. When the `horizontalWrap` property is\n set to true, the first row is placed at the top of the parent view, and successive rows\n are placed below the first row. Each child is positioned vertically _within its row_ somewhat\n like composite layout mode. In particular:\n\n * If neither `top` or `bottom` is specified, the child is centered in the\n row.\n * If either `top` or `bottom` is specified, the child is aligned to either\n the top or bottom of the row, with the specified amount of padding.\n * If *both* `top` and `bottom` is specified for a given child, the properties\n are both treated as padding.\n\n If the `horizontalWrap` property is false, the behavior is more equivalent to a vertical layout.\n Children are laid or horizontally from left to right in a single row. The `left` and\n `right` properties are used as padding between the children, and the `top` and `bottom`\n properties are used to position the children vertically.\n\n Defaults to Composite layout.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "opacity", - "summary": "Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque).", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "overrideCurrentAnimation", - "summary": "When on, animate call overrides current animation if applicable.", - "description": "If this property is set to false, the animate call is ignored if the view is currently being animated.\n\nDefaults to `undefined` but behaves as false\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation" - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "rect", - "summary": "The bounding box of the view relative to its parent, in system units.\n", - "description": "The view's bounding box is defined by its size and position.\n\nThe view's size is `rect.width` x `rect.height`. The view's top-left position relative to\nits parent is (`rect.x` , `rect.y`).\n\nOn Android it will also return `rect.absoluteX` and 'rect.absoluteY' which are relative to\nthe main window.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "DimensionWithAbsolutes", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "size", - "summary": "The size of the view in system units.\n", - "description": "Although property returns a dictionary, only the `width` and `height`\nproperties are valid. The position properties--`x` and `y`--are always 0.\n\nTo find the position _and_ size of the view, use the [rect](Titanium.UI.View.rect)\nproperty instead.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Dimension", - "permission": "read-only" - }, - { - "name": "softKeyboardOnFocus", - "summary": "Determines keyboard behavior when this view is focused. Defaults to .", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS" - ] - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchEnabled", - "summary": "Determines whether view should receive touch events.", - "description": "If false, will forward the events to peers.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the view.", - "description": "Android only supports Matrix2D transforms.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ], - "default": "Identity matrix" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "viewShadowColor", - "summary": "Determines the color of the shadow.", - "description": "iOS Defaults to `undefined`. Behaves as if transparent. Android default is black.\nOn Android you can set `0.5` and\n`0.5` in your theme to change the\nopacity.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "width", - "summary": "View's width, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "horizontalWrap", - "summary": "Determines whether the layout has wrapping behavior.", - "description": "For more information, see the discussion of horizontal layout mode in the description of\nthe [layout](Titanium.UI.View.layout) property.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "zIndex", - "summary": "Z-index stack order position, relative to other sibling views.", - "description": "A view does not have a default z-index value, meaning that it is undefined by default.\nWhen this property is explicitly set, regardless of its value, it causes the view to be\npositioned in front of any sibling that has an undefined z-index.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "keepScreenOn", - "summary": "Determines whether to keep the device screen on.", - "description": "When `true` the screen will not power down. Note: enabling this feature will use more\npower, thereby adversely affecting run time when on battery.\nFor iOS look at [Titanium.App.idleTimerDisabled](Titanium.App.idleTimerDisabled).\n", - "platforms": [ - { - "since": "5.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "maxElevation", - "summary": "Maximum Elevation for CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number", - "availability": "creation" - }, - { - "name": "preventCornerOverlap", - "summary": "Add padding to CardView on API level 20 and before to prevent intersections between\nthe Card content and rounded corners.\n", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "useCompatPadding", - "summary": "Add padding on API level 21 and above to have the same measurements with previous versions.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "padding", - "summary": "Inner padding between the edges of the Card and children of the CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "paddingBottom", - "summary": "Inner padding between the bottom edge of the Card and children of the CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "paddingLeft", - "summary": "Inner padding between the left edge of the Card and children of the CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "paddingRight", - "summary": "Inner padding between the right edge of the Card and children of the CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "paddingTop", - "summary": "Inner padding between the top edge of the Card and children of the CardView.", - "platforms": [ - { - "since": "5.1.2", - "name": "android" - } - ], - "type": "Number" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.CollapseToolbar": { - "name": "Titanium.UI.Android.CollapseToolbar", - "summary": "A collapsing toolbar layout.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/CollapseToolbar.yml", - "description": "| Android |\n| ------- |\n| ![Android](./collpasetoolbar_android.jpg) |\n\nCollapseToolbar acts as a top-level container for window content that allows to set a parallax image and title\nin the toolbar. The main content goes into `centerView` and will automatically be scrollable.\n", - "events": [ - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple setup", - "code": "The following code shows a simple drawer-layout usage.\n\n``` js\nconst win = Ti.UI.createWindow({\n\ttheme: \"Theme.Titanium.DayNight.NoTitleBar\"\n});\n\nconst centerView = Ti.UI.createView({\n\tlayout: \"vertical\",\n\theight: Ti.UI.SIZE\n});\n\nfor (let i = 0; i < 40; ++i) {\n\tlet lbl = Ti.UI.createLabel({\n\t\ttext: \"test \" + i,\n\t\theight: 40\n\t});\n\tcenterView.add(lbl);\n}\n\nconst collapsingToolbar = Ti.UI.Android.createCollapseToolbar({\n\tcontentScrimColor: \"#333\",\n\ttop: 0,\n\timage: \"default.png\",\n\ttitle: \"Collapsing toolbar\"\n});\n\n\nwin.addEventListener('open', function() {\n\tcollapsingToolbar.contentView = centerView;\n\tcollapsingToolbar.onHomeIconItemSelected = function() {\n\t\talert(\"click click\");\n\t};\n\tcollapsingToolbar.displayHomeAsUp = true;\n});\n\nwin.add(collapsingToolbar);\nwin.open();\n```\n" - }, - { - "description": "Alloy example", - "code": "``` js\n\n\t\n\n\t\t\n\n\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\n\n\t\n\n```\n" - } - ], - "methods": [ - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "barColor", - "summary": "Background color of the extended toolbar when no image is shown.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "contentScrimColor", - "summary": "Background color of the small toolbar when the content is scrolled up.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "image", - "summary": "Background image for the full size toolbar. Has a parallax effect when scrolling upwards.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "imageHeight", - "summary": "Height of the image. Use `height` for the height of the extended toolbar.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "default": 250 - }, - { - "name": "title", - "summary": "Title of the toolbar.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "color", - "summary": "Color of the title.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "navigationIconColor", - "summary": "Color of the back arrow.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "contentView", - "summary": "Main view below the toolbar.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "displayHomeAsUp", - "summary": "Displays an \"up\" affordance on the \"home\" area of the action bar.", - "description": "See also: [setDisplayHomeAsUpEnabled](https://developer.android.com/reference/android/app/ActionBar.html#setDisplayHomeAsUpEnabled(boolean))\nin the Android Developer Reference.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Boolean", - "permission": "write-only" - }, - { - "name": "flags", - "summary": "Scroll flags. Check [Android documentation](https://developer.android.com/reference/com/google/android/material/appbar/AppBarLayout.LayoutParams#constants_1) for more details.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.Android.SCROLL_FLAG_ENTER_ALWAYS", - "Titanium.UI.Android.SCROLL_FLAG_ENTER_ALWAYS_COLLAPSED", - "Titanium.UI.Android.SCROLL_FLAG_EXIT_UNTIL_COLLAPSED", - "Titanium.UI.Android.SCROLL_FLAG_NO_SCROLL", - "Titanium.UI.Android.SCROLL_FLAG_SCROLL", - "Titanium.UI.Android.SCROLL_FLAG_SNAP", - "Titanium.UI.Android.SCROLL_FLAG_SNAP_MARGINS" - ] - }, - { - "name": "onHomeIconItemSelected", - "summary": "Callback function called when the home icon is clicked.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "type": "Callback", - "permission": "write-only" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.DrawerLayout": { - "name": "Titanium.UI.Android.DrawerLayout", - "summary": "A panel that displays the app's main navigation options on the left edge of the screen.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/DrawerLayout.yml", - "description": "| Android |\n| ------- |\n| ![Android](./drawerlayout_android.png) |\n\nDrawerLayout acts as a top-level container for window content that allows for interactive \"drawer\"\nviews to be pulled out from one or both vertical edges of the window.\n\nAs per the Android Design guide, any drawers positioned to the left/start should always contain\ncontent for navigating around the application, whereas any drawers positioned to the right/end\nshould always contain actions to take on the current content.\n\nFor design guidelines, see\n[Google Design Guidelines: DrawerLayout](https://developer.android.com/training/implementing-navigation/nav-drawer.html)\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "focus", - "summary": "Fired when the view element gains focus.", - "description": "This event only fires when using the trackball to navigate.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longclick", - "summary": "Fired when the device detects a long click.", - "description": "A long click is generated by touching and holding on the touchscreen or holding down the\ntrackball button.\n\nThe event occurs before the finger/button is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nAs the trackball can fire this event, it is not intended to return the `x` and `y`\ncoordinates of the touch, even when it is generated by the touchscreen.\n\nA `longclick` blocks a `click`, meaning that a `click` event will not fire when a\n`longclick` listener exists.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "pinch", - "summary": "Fired when the device detects a pinch gesture.", - "description": "A pinch is a touch and expand or contract\nwith two fingers. The event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "scale", - "summary": "The scale factor relative to the points of the two touches in screen coordinates.", - "type": "Number" - }, - { - "name": "velocity", - "summary": "The velocity of the pinch in scale factor per second.", - "type": "Number" - }, - { - "name": "time", - "summary": "The event time of the current event being processed.", - "type": "Number" - }, - { - "name": "timeDelta", - "summary": "The time difference in milliseconds between the previous accepted scaling event and the\ncurrent scaling event.\n", - "type": "Number" - }, - { - "name": "currentSpan", - "summary": "The average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanX", - "summary": "The average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanY", - "summary": "The average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpan", - "summary": "The previous average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanX", - "summary": "The previous average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanY", - "summary": "The previous average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "focusX", - "summary": "The X coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "focusY", - "summary": "The Y coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "inProgress", - "summary": "Returns `true` if a scale gesture is in progress, `false` otherwise.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the single tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch\nevents, so this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "twofingertap", - "summary": "Fired when the device detects a two-finger tap against the view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "open", - "summary": "Fired when the drawer view is opened.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "properties": [ - { - "name": "drawer", - "summary": "Contains the drawer frame type. Either `left` or `right`.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "close", - "summary": "Fired when the drawer view is closed.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "properties": [ - { - "name": "drawer", - "summary": "Contains the drawer frame type. Either `left` or `right`.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "change", - "summary": "Fired when the motion state of the drawer view changes.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "properties": [ - { - "name": "drawer", - "summary": "Contains the drawer frame type. Either `left` or `right`.", - "type": "String" - }, - { - "name": "state", - "summary": "The current drawer state.", - "type": "Number" - }, - { - "name": "idle", - "summary": "Whether or not the drawer is currently idle.", - "type": "Boolean" - }, - { - "name": "dragging", - "summary": "Whether or not the drawer is currently dragging.", - "type": "Boolean" - }, - { - "name": "settling", - "summary": "Whether or not the drawer is currently settling.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "slide", - "summary": "Fired when the drawer view changes it's position.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "properties": [ - { - "name": "drawer", - "summary": "Contains the drawer frame type. Either `left` or `right`.", - "type": "String" - }, - { - "name": "offset", - "summary": "The current drawer offset.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple DrawerLayout", - "code": "The following code shows a simple drawer-layout usage.\n\n``` js\nvar win = Ti.UI.createWindow();\n\nvar leftView = Ti.UI.createView({ backgroundColor:'red' });\nvar centerView = Ti.UI.createView({ backgroundColor:'yellow' });\nvar rightView = Ti.UI.createView({ backgroundColor:'orange' });\n\nvar drawer = Ti.UI.Android.createDrawerLayout({\n leftView: leftView,\n centerView: centerView,\n rightView: rightView\n});\nvar btn = Ti.UI.createButton({ title: 'RIGHT' });\n\nbtn.addEventListener('click', function() {\n drawer.toggleRight();\n});\n\ncenterView.add(btn);\n\nwin.addEventListener('open', function(){\n var activity = win.activity,\n actionBar = activity.actionBar;\n\n if (actionBar) {\n actionBar.displayHomeAsUp = true;\n actionBar.onHomeIconItemSelected = function() {\n drawer.toggleLeft();\n };\n }\n});\n\nwin.add(drawer);\nwin.open();\n```\n" - }, - { - "description": "Alloy DrawerLayout example", - "code": "The following code shows an Alloy version of the drawer-layout.\n``` xml\n\n \n \n \n \n \n \n \n \n \n \n \n \n\n```\n\n``` js\nfunction onClickDrawer(e){\n $.drawer.toggleLeft();\n}\n\n$.index.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "add", - "summary": "Adds a child to this view's hierarchy.", - "description": "The child view is added as the last child in this view's hierarchy.\n\nAlthough all views inherit from , not all views are capable of\ncontaining other views. In particular:\n\n* Some views are not designed to be containers at all.\n* Some views are special-purpose containers that can only contain certain other\n views.\n* Some views are top-level containers that cannot (or should not) be added to other views.\n\n#### Non-Container Views\n\nThe following views are not intended to act as containers that can hold other\nviews:\n\n* [ActivityIndicator](Titanium.UI.ActivityIndicator)\n* [Button](Titanium.UI.Button)\n* [ImageView](Titanium.UI.ImageView)\n* [Label](Titanium.UI.Label)\n* [ProgressBar](Titanium.UI.ProgressBar)\n* [SearchBar](Titanium.UI.SearchBar)\n* [Slider](Titanium.UI.Slider)\n* [Switch](Titanium.UI.Switch)\n* [TableView](Titanium.UI.TableView)\n* [TextArea](Titanium.UI.TextArea)\n* [TextField](Titanium.UI.TextField)\n* [WebView](Titanium.UI.WebView)\n\nAdding children to the these views _may_ be supported on some platforms,\nbut is not guaranteed to work across platforms. Where it is supported, it may not\nwork as expected.\n\nFor maximum portability, these views should be treated as if they do not support children.\nInstead of adding children to these views, applications can position other views as\nsiblings. For example, instead of adding a button as a child of a `WebView`, you can add\nthe button to the web view's parent such that it appears on top of the web view.\n\n#### Special-Purpose Containers\n\nA few view objects act as special-purpose containers--that is, they only manage\ncertain types of children, and many of them support a special means of adding\nthese children, instead of the general `add` method. These containers include:\n\n* [ButtonBar](Titanium.UI.ButtonBar) and [TabbedBar](Titanium.UI.iOS.TabbedBar) are designed\n to hold their own internally-created buttons, assigned by adding strings to the \"labels\" array.\n Views added using the `add` method are displayed on top of these buttons.\n\n* [Picker](Titanium.UI.Picker). Can only hold `PickerRows` and `PickerColumns`, which\n are added using the `add` method. Adding other types of views to a `Picker` is not\n supported.\n\n* [TableView](Titanium.UI.TableView) is a specialized container for\n `TableViewSection` and `TableViewRow` objects. These objects must be\n added using the properties and methods that `TableView` provides\n for adding and removing sections and rows.\n\n On some platforms, it is possible to add arbitrary child views to a table view\n using the `add` method. However, this is not guaranteed to work on all platforms,\n and in general, should be avoided.\n\n* [TableViewSection](Titanium.UI.TableViewSection) is a specialized container\n for `TableViewRow` objects, which _are_ added using the `add` method. The `add` method\n on `TableViewSection` can only be used to add `TableViewRow` objects.\n\n* [Toolbar](Titanium.UI.iOS.Toolbar) is designed to hold buttons and certain\n other controls, added to its `items` array. Views added using the `add` method are\n displayed on top of the controls in the `items` array.\n\n* The `Tab`, `TabGroup`, `NavigationWindow` and `SplitWindow` objects are\n special containers that manage windows. These are discussed in the\n \"Top-Level Containers\" section.\n\n\n#### Top-Level Containers\n\nThere are certain top-level containers that are not intended to be added\nas the children of other views. These top-level containers include\n, , ,\nand . Other types of views must be added\nto a top-level container in order to be displayed on screen.\n\nThe special containers ,\n, , and\n manage windows.\nThese managed windows may be referred to as *children* of the\ncontainer, but they are not added using the `add` method.\n\n`Tab` is another kind of special container: it is not itself a top-level container,\nbut can only be used within a `TabGroup`. You cannot `add` a `Tab` to an arbitrary\ncontainer.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to add to this view's hierarchy.\n\nYou may pass an array of views, e.g. `view.add([subview1, subview2]`.\n", - "type": [ - "Titanium.UI.View", - "Array" - ] - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "animate", - "summary": "Animates this view.", - "description": "The [Animation](Titanium.UI.Animation) object or dictionary passed to this method defines\nthe end state for the animation, the duration of the animation, and other properties.\n\nNote that on SDKs older than 9.1.0 - if you use `animate` to move a view, the view's actual *position* is changed, but\nits layout properties, such as `top`, `left`, `center` and so on are not changed--these\nreflect the original values set by the user, not the actual position of the view.\n\nAs of SDK 9.1.0, the final values of the animation will be set on the view just before the `complete` event and/or the callback is fired.\n\nThe [rect](Titanium.UI.View.rect) property can be used to determine the actual size and\nposition of the view.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "animation", - "summary": "Either a dictionary of animation properties or an\n[Animation](Titanium.UI.Animation) object.\n", - "type": [ - "Titanium.UI.Animation", - "Dictionary" - ] - }, - { - "name": "callback", - "summary": "Function to be invoked upon completion of the animation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "remove", - "summary": "Removes a child view from this view's hierarchy.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to remove from this view's hierarchy.", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllChildren", - "summary": "Removes all child views from this view's hierarchy.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "toImage", - "summary": "Returns an image of the rendered view, as a Blob.", - "description": "The `honorScaleFactor` argument is only supported on iOS.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "callback", - "summary": "Function to be invoked upon completion. If non-null, this method will be performed\nasynchronously. If null, it will be performed immediately.\n", - "type": "Callback", - "optional": true - }, - { - "name": "honorScaleFactor", - "summary": "Determines whether the image is scaled based on scale factor of main screen. (iOS only)\n\nWhen set to true, image is scale factor is honored. When set to false, the image in the\nblob has the same dimensions for retina and non-retina devices.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "convertPointToView", - "summary": "Translates a point from this view's coordinate system to another view's coordinate system.\n", - "description": "Returns `null` if either view is not in the view hierarchy.\n\nKeep in mind that views may be removed from the view hierarchy if their window is blurred\nor if the view is offscreen (such as in some situations with ).\n\nIf this view is a , the view's x and y offsets are subtracted from\nthe return value.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "point", - "summary": "A point in this view's coordinate system.\n\nIf this argument is missing an `x` or `y` property, or the properties can not be\nconverted into numbers, an exception will be raised.\n", - "type": "Point" - }, - { - "name": "destinationView", - "summary": "View that specifies the destination coordinate system to convert to. If this argument\nis not a view, an exception will be raised.\n", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "Point" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - }, - { - "name": "toggleLeft", - "summary": "Toggle the visibility of the left view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openLeft", - "summary": "Open the left view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "closeLeft", - "summary": "Close the left view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "toggleRight", - "summary": "Toggle the visibility of the right view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "openRight", - "summary": "Open the right view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "closeRight", - "summary": "Close the right view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "interceptTouchEvent", - "summary": "Disallow touch events on a specific view.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "view", - "summary": "View to intercept touch events.", - "type": "Titanium.UI.View" - }, - { - "name": "disallowIntercept", - "summary": "Whether to disallow the interception of touch events.", - "type": "Boolean" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHidden", - "summary": "Whether the view should be \"hidden\" from (i.e., ignored by) the accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityElementsHidden` property defined in the\n[UIAccessibility\nProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\n\nOn Android, setting `accessibilityHidden` calls the native\n[View.setImportantForAccessibility](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29)\nmethod. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and\nlater; if this property is specified on earlier versions of Android, it is ignored.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "On iOS this is a direct analog of the `accessibilityHint` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityLabel` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to Title or label of the control.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityValue` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to State or value of the control.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on iOS only. For Android, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nSee the \"Using an anchorPoint\" example in for a demonstration.\nThe default is center of this view.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "backgroundColor", - "summary": "Background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of . Defaults to `Transparent`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundDisabledColor", - "summary": "Disabled background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundDisabledImage", - "summary": "Disabled background image for the view, specified as a local file path or URL.", - "description": "If `backgroundDisabledImage` is undefined, and the normal background image`backgroundImage`\nis set, the normal image is used when this view is disabled.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedColor", - "summary": "Focused background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nFor normal views, the focused color is only used if `focusable` is `true`.\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedImage", - "summary": "Focused background image for the view, specified as a local file path or URL.", - "description": "For normal views, the focused background is only used if `focusable` is `true`.\nIf `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage`\nis set, the normal image is used when this view is focused.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundGradient", - "summary": "A background gradient for the view.", - "description": "A gradient can be defined as either linear or radial. A linear gradient varies continuously\nalong a line between the `startPoint` and `endPoint`.\n\nA radial gradient is interpolated between two circles, defined by `startPoint` and\n`startRadius` and `endPoint` and `endRadius` respectively.\n\nThe start points, end points and radius values can be defined in device units, in the view's\ncoordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center\npoint of the view can be specified as:\n\n``` js\n{ x: 30, y: 30 }\n```\n\nOr:\n``` js\n{ x: '50%', y: '50%' }\n```\n\nWhen specifying multiple colors, you can specify an *offset* value for each color, defining\nhow far into the gradient it takes effect. For example, the following color array specifies\na gradient that goes from red to blue back to red:\n\n``` js\ncolors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]\n```\n\nAndroid's linear gradients ignores `backfillStart` and `backfillEnd`, treating them as if\nthey are true. Android's radial gradients ignore the `endPoint` property.\nDefaults to no gradient.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "examples": [ - { - "description": "Linear and Radial Gradients", - "code": "The following code excerpt creates two views, one with a linear gradient and one with\na radial gradient.\n\n``` js\nvar win1 = Titanium.UI.createWindow({\n title:'Tab 1',\n backgroundColor:'#fff',\n layout: 'vertical'\n});\n\nvar radialGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'radial',\n startPoint: { x: 50, y: 50 },\n endPoint: { x: 50, y: 50 },\n colors: [ 'red', 'blue'],\n startRadius: 50,\n endRadius: 0,\n backfillStart: true\n }\n});\nvar linearGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'linear',\n startPoint: { x: '0%', y: '50%' },\n endPoint: { x: '100%', y: '50%' },\n colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],\n }\n});\nwin1.add(radialGradient);\nwin1.add(linearGradient);\nwin1.open();\n```\n" - } - ], - "type": "Gradient" - }, - { - "name": "backgroundImage", - "summary": "Background image for the view, specified as a local file path or URL.", - "description": "Default behavior when `backgroundImage` is unspecified depends on the type of view and the platform.\nFor generic views, no image is used. For most controls (buttons, textfields, and so on), platform-specific default images are used.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundRepeat", - "summary": "Determines whether to tile a background across a view.", - "description": "Setting this to `true` makes the set `backgroundImage` repeat across the view as a series\nof tiles. The tiling begins in the upper-left corner, where the upper-left corner of the\nbackground image is rendered. The image is then tiled to fill the available space of the\nview.\n\nNote that setting this to `true` may incur performance penalties for large views or\nbackground images, as the tiling must be redone whenever a view is resized.\n\nOn iOS, the following views do not currently support tiled backgrounds:\n\n* \n* \n* \n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "backgroundSelectedColor", - "summary": "Selected background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to transparent, so the background color of this view will be used.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundSelectedImage", - "summary": "Selected background image URL for the view, specified as a local file path or URL.", - "description": "For normal views, the selected background is only used if `focusable` is `true`.\n\nIf `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set\nthe normal image is used when this view is selected.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "borderColor", - "summary": "Border color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nDefaults to the normal background color of this view (Android), black (iOS).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "borderRadius", - "summary": "Radius for the rounded corners of the view's border.", - "description": "Each corner is rounded using an arc of a circle.\nValues for each corner can be specified. For example, '20px 20px' will set both left and right corners to `20px`.\nSpecifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.\n\nIf you have issues with dark artifacts on Android you can try to disable Hardware acceleration by setting a\n`backgroundColor` with a small amount of transparency: `backgroundColor:\"rgba(255,255,255,254)\"`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String", - "Array", - "Array" - ], - "default": 0 - }, - { - "name": "borderWidth", - "summary": "Border width of the view.", - "description": "If [borderColor](Titanium.UI.View.borderColor) is set without [borderWidth](Titanium.UI.View.borderWidth), this value\nwill be changed to 1 of the unit declared as 'ti.ui.defaultunit' in tiapp.xml descriptor.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": 0 - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "center", - "summary": "View's center position, in the parent view's coordinates.", - "description": "This is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "children", - "summary": "Array of this view's child views.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Array", - "permission": "read-only" - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "focusable", - "summary": "Whether view should be focusable while navigating with the trackball.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "layout", - "summary": "Specifies how the view positions its children.\nOne of: 'composite', 'vertical', or 'horizontal'.\n", - "description": "There are three layout options:\n\n* `composite` (or `absolute`). Default layout. A child view is positioned based on its\n positioning properties or \"pins\" (`top`, `bottom`, `left`, `right` and `center`).\n If no positioning properties are specified, the child is centered.\n\n The child is always sized based on its `width` and `height` properties, if these are\n specified. If the child's height or width is *not* specified explicitly, it may be\n calculated implicitly from the positioning properties. For example, if both `left` and\n `center.x` are specified, they can be used to calculate the width of the child control.\n\n Because the size and position properties can conflict, there is a specific precedence\n order for the layout properties. For vertical positioning, the precedence\n order is: `height`, `top`, `center.y`, `bottom`.\n\n The following table summarizes the various combinations of properties that can\n be used for vertical positioning, in order from highest precedence to lowest.\n (For example, if `height`, `center.y` and `bottom` are all specified, the\n `height` and `center.y` values take precedence.)\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScenarioBehavior
height & top specified\n Child positioned top unit from parent's top, using specified height;\n any center.y and bottom values are ignored.\n
height & center.y specified\n Child positioned with center at center.y, using specified height;\n any bottom value is ignored.\n
height & bottom specifiedChild positioned bottom units from parent's bottom, using specified height.
top & center.y specified\n Child positioned with top edge top units from parent's top and center at\n center.y. Height is determined implicitly; any bottom value is ignored.\n
top & bottom specified\n Child positioned with top edge top units from parent's top and bottom edge\n bottom units from parent's bottom. Height is determined implicitly.\n
Only top specified\n Child positioned top units from parent's top, and uses the default height\n calculation for the view type.\n
center.y and bottom specified\n Child positioned with center at center.y and bottom edge bottom\n units from parent's bottom. Height is determined implicitly.\n
Only center.y specifiedChild positioned with center at center.y, and uses the default height calculation for the view type.
Only bottom specifiedChild positioned with bottom edge bottom units from parent's bottom, and uses the default height calculation for the view type.
height, top, center.y, and bottom unspecifiedChild entered vertically in the parent and uses the default height calculation for the child view type.
\n\n Horizontal positioning works like vertical positioning, except that the\n precedence is `width`, `left`, `center.x`, `right`.\n\n For complete details on composite layout rules, see\n [Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n in the Titanium Mobile Guides.\n\n * `vertical`. Children are laid out vertically from top to bottom. The first child\n is laid out `top` units from its parent's bounding box. Each subsequent child is\n laid out below the previous child. The space between children is equal to the\n upper child's `bottom` value plus the lower child's `top` value.\n\n Each child is positioned horizontally as in the composite layout mode.\n\n * `horizontal`. Horizontal layouts have different behavior depending on whether wrapping\n is enabled. Wrapping is enabled by default (the `horizontalWrap` property is `true`).\n\n With wrapping behavior, the children are laid out horizontally from left to right,\n _in rows_. If a child requires more horizontal space than exists in the current row,\n it is wrapped to a new row. The height of each row is equal to the maximum height of\n the children in that row.\n\n Wrapping behavior is available on iOS and Android. When the `horizontalWrap` property is\n set to true, the first row is placed at the top of the parent view, and successive rows\n are placed below the first row. Each child is positioned vertically _within its row_ somewhat\n like composite layout mode. In particular:\n\n * If neither `top` or `bottom` is specified, the child is centered in the\n row.\n * If either `top` or `bottom` is specified, the child is aligned to either\n the top or bottom of the row, with the specified amount of padding.\n * If *both* `top` and `bottom` is specified for a given child, the properties\n are both treated as padding.\n\n If the `horizontalWrap` property is false, the behavior is more equivalent to a vertical layout.\n Children are laid or horizontally from left to right in a single row. The `left` and\n `right` properties are used as padding between the children, and the `top` and `bottom`\n properties are used to position the children vertically.\n\n Defaults to Composite layout.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "opacity", - "summary": "Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque).", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "overrideCurrentAnimation", - "summary": "When on, animate call overrides current animation if applicable.", - "description": "If this property is set to false, the animate call is ignored if the view is currently being animated.\n\nDefaults to `undefined` but behaves as false\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation" - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "rect", - "summary": "The bounding box of the view relative to its parent, in system units.\n", - "description": "The view's bounding box is defined by its size and position.\n\nThe view's size is `rect.width` x `rect.height`. The view's top-left position relative to\nits parent is (`rect.x` , `rect.y`).\n\nOn Android it will also return `rect.absoluteX` and 'rect.absoluteY' which are relative to\nthe main window.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "DimensionWithAbsolutes", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "size", - "summary": "The size of the view in system units.\n", - "description": "Although property returns a dictionary, only the `width` and `height`\nproperties are valid. The position properties--`x` and `y`--are always 0.\n\nTo find the position _and_ size of the view, use the [rect](Titanium.UI.View.rect)\nproperty instead.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Dimension", - "permission": "read-only" - }, - { - "name": "softKeyboardOnFocus", - "summary": "Determines keyboard behavior when this view is focused. Defaults to .", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS" - ] - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchEnabled", - "summary": "Determines whether view should receive touch events.", - "description": "If false, will forward the events to peers.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the view.", - "description": "Android only supports Matrix2D transforms.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ], - "default": "Identity matrix" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "viewShadowColor", - "summary": "Determines the color of the shadow.", - "description": "iOS Defaults to `undefined`. Behaves as if transparent. Android default is black.\nOn Android you can set `0.5` and\n`0.5` in your theme to change the\nopacity.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "width", - "summary": "View's width, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "horizontalWrap", - "summary": "Determines whether the layout has wrapping behavior.", - "description": "For more information, see the discussion of horizontal layout mode in the description of\nthe [layout](Titanium.UI.View.layout) property.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "zIndex", - "summary": "Z-index stack order position, relative to other sibling views.", - "description": "A view does not have a default z-index value, meaning that it is undefined by default.\nWhen this property is explicitly set, regardless of its value, it causes the view to be\npositioned in front of any sibling that has an undefined z-index.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "keepScreenOn", - "summary": "Determines whether to keep the device screen on.", - "description": "When `true` the screen will not power down. Note: enabling this feature will use more\npower, thereby adversely affecting run time when on battery.\nFor iOS look at [Titanium.App.idleTimerDisabled](Titanium.App.idleTimerDisabled).\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "LOCK_MODE_LOCKED_CLOSED", - "summary": "Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked closed.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LOCK_MODE_LOCKED_OPEN", - "summary": "Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is locked opened.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LOCK_MODE_UNDEFINED", - "summary": "Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is reset to default lock state.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LOCK_MODE_UNLOCKED", - "summary": "Use with [DrawerLayout.drawerLockMode](Titanium.UI.Android.DrawerLayout.drawerLockMode) to specify the drawer is unlocked.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "isLeftOpen", - "summary": "Determine whether the left drawer is open", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "isRightOpen", - "summary": "Determine whether the right drawer is open", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "isLeftVisible", - "summary": "Determine whether the left drawer is visible", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "isRightVisible", - "summary": "Determine whether the right drawer is visible", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "leftWidth", - "summary": "Get or set the width of the left drawer", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "rightWidth", - "summary": "Get or set the width of the right drawer", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "leftView", - "summary": "Get or set the view of the left drawer", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "rightView", - "summary": "Get or set the view of the right drawer", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "centerView", - "summary": "Get or set the center view", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "drawerIndicatorEnabled", - "summary": "Determine the drawer indicator status", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "drawerLockMode", - "summary": "Get or set the drawerLockMode", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_CLOSED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_OPEN", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNDEFINED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNLOCKED" - ] - }, - { - "name": "leftDrawerLockMode", - "summary": "Get or set lock mode for the left drawer", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_CLOSED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_OPEN", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNDEFINED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNLOCKED" - ] - }, - { - "name": "rightDrawerLockMode", - "summary": "Get or set lock mode for the right drawer", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_CLOSED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_LOCKED_OPEN", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNDEFINED", - "Titanium.UI.Android.DrawerLayout.LOCK_MODE_UNLOCKED" - ] - }, - { - "name": "toolbarEnabled", - "summary": "Determine whether to enable the toolbar.", - "description": "This property is ignored if the used theme provides a default ActionBar.\n", - "platforms": [ - { - "since": "6.2.0", - "name": "android" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "toolbar", - "summary": "A Toolbar instance to use as a toolbar.", - "description": "Allows using a [Toolbar] as a toolbar in the DrawerLayout,\nexposing [Toolbar's] properties and methods for a further customization.\n\nThis Toolbar instance is automatically set to be used as a default ActionBar.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - } - ], - "type": "Titanium.UI.Toolbar", - "availability": "creation" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.FloatingActionButton": { - "name": "Titanium.UI.Android.FloatingActionButton", - "summary": "A floating action button (FAB) is a circular button that triggers the primary action in your app's UI.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/FloatingActionButton.yml", - "description": "For design guidelines, see\n[Material design: Snackbars](https://material.io/components/buttons-floating-action-button)\n", - "events": [ - { - "name": "click", - "summary": "Fired when the button is clicked", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Show a floating action button (FAB)", - "code": "``` js\nconst win = Ti.UI.createWindow();\nconst fab = Ti.UI.Android.createFloatingActionButton({\n bottom: 10,\n right: 10,\n image: \"/appicon.png\"\n});\nwin.add(fab);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "backgroundColor", - "summary": "Background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of . Defaults to `Transparent`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "customSize", - "summary": "Size of the button", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "maxImageSize", - "summary": "Size of the image inside the button", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "image", - "summary": "Image inside the button (the icon)", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "type": [ - "String", - "Number", - "Titanium.Blob" - ] - }, - { - "name": "iconSize", - "summary": "Predefined button size", - "description": "Android offers default icon sizes for a FAB. This can either be \"default\" or \"mini\".\nYou can use `customSize` the set a custom width/height and `maxImageSize` to resize the\nimage inside the button.\n", - "platforms": [ - { - "since": "12.0.0", - "name": "android" - } - ], - "type": "String", - "permission": "read-only" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.ProgressIndicator": { - "name": "Titanium.UI.Android.ProgressIndicator", - "summary": "A progress dialog or a horizontal progress bar in the title of the window.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/ProgressIndicator.yml", - "description": "| Android |\n| ------- |\n| ![Android](./progressindicator_android.png) |\n\nA progress indicator can be used to show the progress of an operation in the UI to let the\nuser know that some action is taking place. It is used to indicate an ongoing activity of\ndeterminate or indeterminate length.\n\nUse the method or **``** Alloy\nelement to create a progress indicator.\n\nA progress indicator can be either a progress dialog or a horizontal progress bar in the title\nof the window. The progress dialog is a modal dialog that blocks the UI. See also:\n,\n.\n\n**NOTE:** does not work anymore on devices\nrunning Android 4.4+ since the underlying API was deprecated and removed by Google. See\n[TIMOB-27312](https://jira-archive.titaniumsdk.com/TIMOB-27312) for more details.\n\nCalling displays the indicator,\nand calling removes it.\n", - "events": [ - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "cancel", - "summary": "Fired when the user has canceled the progress indicator dialog.", - "description": "The user triggers this event by pressing the BACK button when the dialog is visible.\nThe dialog will be hidden and this event dispatched.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ] - } - ], - "examples": [ - { - "description": "Simple Progress Indicator", - "code": "Click the button to show a progress indicator while\nsome code executes and hide it on completion.\n\n``` js\nTi.UI.backgroundColor = 'white';\n\nvar win = Ti.UI.createWindow({\n backgroundColor: 'blue'\n});\n\nvar button = Ti.UI.createButton({\n title: 'Show Progress Dialog'\n});\n\nvar progressIndicator = Ti.UI.Android.createProgressIndicator({\n message: 'Loading...',\n location: Ti.UI.Android.PROGRESS_INDICATOR_DIALOG,\n type: Ti.UI.Android.PROGRESS_INDICATOR_DETERMINANT,\n cancelable: true,\n min: 0,\n max: 10\n});\n\nbutton.addEventListener('click', function (e) {\n progressIndicator.show();\n var value = 0;\n setInterval(function(){\n if (value > 10) {\n return;\n }\n progressIndicator.value = value;\n value ++;\n }, 200);\n // do some work that takes 3 seconds\n // ie. replace the following setTimeout block with your code\n setTimeout(function(){\n progressIndicator.hide();\n }, 3000);\n});\n\nwin.add(button);\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous example as an Alloy view-controller.\n\nindex.xml:\n``` xml\n\n \n \n\n \n \n\n```\n\nindex.js:\n``` js\nfunction showIndicator(e) {\n $.progressIndicator.show();\n var value = 0;\n setInterval(function(){\n if (value > 10) {\n return;\n }\n $.progressIndicator.value = value;\n value ++;\n }, 200);\n // do some work that takes 3 seconds\n // ie. replace the following setTimeout block with your code\n setTimeout(function(){\n $.progressIndicator.hide();\n }, 3000);\n}\n$.index.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides the progress indicator and stops the animation.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Shows the progress indicator and starts the animation.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "cancelable", - "summary": "When `true` allows the user to cancel the progress dialog by pressing the BACK button.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Boolean" - }, - { - "name": "canceledOnTouchOutside", - "summary": "When `cancelable` is set to `true` and this is set to `true`, the dialog is canceled when touched outside the window's bounds.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "message", - "summary": "Message text.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "messageid", - "summary": "Key identifying a string in the locale file to use for the message text.", - "description": "Only one of `message` or `messageid` should be specified.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "min", - "summary": "Minimum value of the progress bar.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "max", - "summary": "Maximum value of the progress bar.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "location", - "summary": "Location for the progress indicator.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.Android.PROGRESS_INDICATOR_DIALOG", - "Titanium.UI.Android.PROGRESS_INDICATOR_STATUS_BAR" - ] - }, - { - "name": "type", - "summary": "Type for the progress indicator.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - } - ], - "type": "Number", - "default": "", - "constants": [ - "Titanium.UI.Android.PROGRESS_INDICATOR_INDETERMINANT", - "Titanium.UI.Android.PROGRESS_INDICATOR_DETERMINANT" - ] - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.SearchView": { - "name": "Titanium.UI.Android.SearchView", - "summary": "A specialized text field for entering search text.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/SearchView.yml", - "description": "| Android |\n| ------- |\n| ![Android](./searchview_android.png) |\n\n`SearchView` provides a user interface to enter a search query and submit a request to a search provider.\n\nSearch views are most commonly used for filtering the rows in a [TableView](Titanium.UI.TableView).\nSimilar to [SearchBar](Titanium.UI.SearchBar), you can add a search view to a table view by setting the table view's\n[search](Titanium.UI.TableView.search) property. A search view can be used without a `TableView`.\n\nYou can also use a `SearchView` object as the \nproperty of a [ListView](Titanium.UI.ListView) object.\n\nYou can also add `SearchView` to an `ActionBar` as a view (see example below).\n\nUse the method or **``** Alloy element to create\na search view. You must set the Alloy element's `ns` attribute to **Ti.UI.Android**:\n\n``` xml\n\n```\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "focus", - "summary": "Fired when the search view gains focus.", - "description": "This event only fires when using the trackball to navigate.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ] - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longclick", - "summary": "Fired when the device detects a long click.", - "description": "A long click is generated by touching and holding on the touchscreen or holding down the\ntrackball button.\n\nThe event occurs before the finger/button is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nAs the trackball can fire this event, it is not intended to return the `x` and `y`\ncoordinates of the touch, even when it is generated by the touchscreen.\n\nA `longclick` blocks a `click`, meaning that a `click` event will not fire when a\n`longclick` listener exists.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "pinch", - "summary": "Fired when the device detects a pinch gesture.", - "description": "A pinch is a touch and expand or contract\nwith two fingers. The event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "scale", - "summary": "The scale factor relative to the points of the two touches in screen coordinates.", - "type": "Number" - }, - { - "name": "velocity", - "summary": "The velocity of the pinch in scale factor per second.", - "type": "Number" - }, - { - "name": "time", - "summary": "The event time of the current event being processed.", - "type": "Number" - }, - { - "name": "timeDelta", - "summary": "The time difference in milliseconds between the previous accepted scaling event and the\ncurrent scaling event.\n", - "type": "Number" - }, - { - "name": "currentSpan", - "summary": "The average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanX", - "summary": "The average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanY", - "summary": "The average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpan", - "summary": "The previous average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanX", - "summary": "The previous average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanY", - "summary": "The previous average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "focusX", - "summary": "The X coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "focusY", - "summary": "The Y coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "inProgress", - "summary": "Returns `true` if a scale gesture is in progress, `false` otherwise.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the single tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch\nevents, so this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "twofingertap", - "summary": "Fired when the device detects a two-finger tap against the view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "blur", - "summary": "Fired when the search view loses focus.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ] - }, - { - "name": "cancel", - "summary": "Fired when the cancel button is pressed.", - "description": "Due to the current [Android Issue](http://code.google.com/p/android/issues/detail?id=25758), this event does not work\nwith Android 4.0+. Alternatively, when using SearchView in the action bar, you can listen for the [MenuItem.collapse](Titanium.Android.MenuItem.collapse) event.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ] - }, - { - "name": "change", - "summary": "Fired when the value of the search view changes.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ] - }, - { - "name": "submit", - "summary": "If the search query is not empty, fired when the search button is clicked on soft keyboard", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ] - } - ], - "examples": [ - { - "description": "Search View for Table in Action Bar", - "code": "The following example creates a SearchView widget for a TableView\nand displays it as an Action Bar item if the Google API level is 11 or later.\nIf not, it defaults to use the search bar.\n\n``` js\nvar win = Ti.UI.createWindow({\n fullscreen: false\n});\n\n// Use action bar search view\nvar search = Ti.UI.Android.createSearchView({\n hintText: \"Table Search\"\n});\n\nwin.activity.onCreateOptionsMenu = function(e) {\n var menu = e.menu;\n var menuItem = menu.add({\n title: 'Table Search',\n actionView : search,\n icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : \"my_search.png\"),\n showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW\n });\n};\n\nvar data = [];\ndata.push(Ti.UI.createTableViewRow({title:'Apple'}));\ndata.push(Ti.UI.createTableViewRow({title:'Banana'}));\ndata.push(Ti.UI.createTableViewRow({title:'Orange'}));\ndata.push(Ti.UI.createTableViewRow({title:'Raspberry'}));\n\nvar tableview = Titanium.UI.createTableView({\n data: data,\n search: search,\n searchAsChild: false\n});\n\nwin.add(tableview);\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous example as an Alloy project.\n\nindex.xml:\n``` xml\n\n \n \n \n \n \n \n \n \n\n```\n\nindex.js:\n``` js\n// use action bar search view\nvar search = Alloy.createController(\"searchview\").getView();\n$.tableview.search = search;\n$.win.addEventListener(\"open\", function() {\n $.win.activity.onCreateOptionsMenu = function(e) {\n e.menu.add({\n title: \"Table Search\",\n icon: (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : \"my_search.png\"),\n actionView: search,\n showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW\n });\n }\n $.win.activity.invalidateOptionsMenu();\n});\n\n$.win.open();\n```\n\nsearchview.xml:\n``` xml\n\n \n\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "animate", - "summary": "Animates this view.", - "description": "The [Animation](Titanium.UI.Animation) object or dictionary passed to this method defines\nthe end state for the animation, the duration of the animation, and other properties.\n\nNote that on SDKs older than 9.1.0 - if you use `animate` to move a view, the view's actual *position* is changed, but\nits layout properties, such as `top`, `left`, `center` and so on are not changed--these\nreflect the original values set by the user, not the actual position of the view.\n\nAs of SDK 9.1.0, the final values of the animation will be set on the view just before the `complete` event and/or the callback is fired.\n\nThe [rect](Titanium.UI.View.rect) property can be used to determine the actual size and\nposition of the view.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "animation", - "summary": "Either a dictionary of animation properties or an\n[Animation](Titanium.UI.Animation) object.\n", - "type": [ - "Titanium.UI.Animation", - "Dictionary" - ] - }, - { - "name": "callback", - "summary": "Function to be invoked upon completion of the animation.", - "type": "Callback", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "remove", - "summary": "Removes a child view from this view's hierarchy.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "view", - "summary": "View to remove from this view's hierarchy.", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeAllChildren", - "summary": "Removes all child views from this view's hierarchy.", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Makes this view visible.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "toImage", - "summary": "Returns an image of the rendered view, as a Blob.", - "description": "The `honorScaleFactor` argument is only supported on iOS.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "callback", - "summary": "Function to be invoked upon completion. If non-null, this method will be performed\nasynchronously. If null, it will be performed immediately.\n", - "type": "Callback", - "optional": true - }, - { - "name": "honorScaleFactor", - "summary": "Determines whether the image is scaled based on scale factor of main screen. (iOS only)\n\nWhen set to true, image is scale factor is honored. When set to false, the image in the\nblob has the same dimensions for retina and non-retina devices.\n", - "type": "Boolean", - "optional": true - } - ], - "returns": { - "type": "Titanium.Blob" - } - }, - { - "name": "convertPointToView", - "summary": "Translates a point from this view's coordinate system to another view's coordinate system.\n", - "description": "Returns `null` if either view is not in the view hierarchy.\n\nKeep in mind that views may be removed from the view hierarchy if their window is blurred\nor if the view is offscreen (such as in some situations with ).\n\nIf this view is a , the view's x and y offsets are subtracted from\nthe return value.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "point", - "summary": "A point in this view's coordinate system.\n\nIf this argument is missing an `x` or `y` property, or the properties can not be\nconverted into numbers, an exception will be raised.\n", - "type": "Point" - }, - { - "name": "destinationView", - "summary": "View that specifies the destination coordinate system to convert to. If this argument\nis not a view, an exception will be raised.\n", - "type": "Titanium.UI.View" - } - ], - "returns": { - "type": "Point" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - }, - { - "name": "blur", - "summary": "Causes the search view to lose focus.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "focus", - "summary": "Causes the search view to gain focus.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityHidden", - "summary": "Whether the view should be \"hidden\" from (i.e., ignored by) the accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityElementsHidden` property defined in the\n[UIAccessibility\nProtocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\n\nOn Android, setting `accessibilityHidden` calls the native\n[View.setImportantForAccessibility](https://developer.android.com/reference/android/view/View.html#setImportantForAccessibility%28int%29)\nmethod. The native method is only available in Android 4.1 (API level 16/Jelly Bean) and\nlater; if this property is specified on earlier versions of Android, it is ignored.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "accessibilityHint", - "summary": "Briefly describes what performing an action (such as a click) on the view will do.", - "description": "On iOS this is a direct analog of the `accessibilityHint` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "default": null - }, - { - "name": "accessibilityLabel", - "summary": "A succinct label identifying the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityLabel` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to Title or label of the control.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityValue", - "summary": "A string describing the value (if any) of the view for the device's accessibility service.", - "description": "On iOS this is a direct analog of the `accessibilityValue` property defined in the\n[UIAccessibility Protocol](https://developer.apple.com/documentation/uikit/accessibility/uiaccessibility).\nOn Android, it is concatenated together with\n and in the order: `accessibilityLabel`,\n`accessibilityValue`, `accessibilityHint`. The concatenated value is then passed as the\nargument to the native [View.setContentDescription](https://developer.android.com/reference/android/view/View.html#setContentDescription%28java.lang.CharSequence%29) method.\nDefaults to State or value of the control.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on iOS only. For Android, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nSee the \"Using an anchorPoint\" example in for a demonstration.\nThe default is center of this view.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "backgroundColor", - "summary": "Background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of . Defaults to `Transparent`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundDisabledColor", - "summary": "Disabled background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundDisabledImage", - "summary": "Disabled background image for the view, specified as a local file path or URL.", - "description": "If `backgroundDisabledImage` is undefined, and the normal background image`backgroundImage`\nis set, the normal image is used when this view is disabled.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedColor", - "summary": "Focused background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nFor normal views, the focused color is only used if `focusable` is `true`.\nDefaults to the normal background color of this view.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundFocusedImage", - "summary": "Focused background image for the view, specified as a local file path or URL.", - "description": "For normal views, the focused background is only used if `focusable` is `true`.\nIf `backgroundFocusedImage` is undefined, and the normal background image `backgroundImage`\nis set, the normal image is used when this view is focused.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundGradient", - "summary": "A background gradient for the view.", - "description": "A gradient can be defined as either linear or radial. A linear gradient varies continuously\nalong a line between the `startPoint` and `endPoint`.\n\nA radial gradient is interpolated between two circles, defined by `startPoint` and\n`startRadius` and `endPoint` and `endRadius` respectively.\n\nThe start points, end points and radius values can be defined in device units, in the view's\ncoordinates, or as percentages of the view's size. Thus, if a view is 60 x 60, the center\npoint of the view can be specified as:\n\n``` js\n{ x: 30, y: 30 }\n```\n\nOr:\n``` js\n{ x: '50%', y: '50%' }\n```\n\nWhen specifying multiple colors, you can specify an *offset* value for each color, defining\nhow far into the gradient it takes effect. For example, the following color array specifies\na gradient that goes from red to blue back to red:\n\n``` js\ncolors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ]\n```\n\nAndroid's linear gradients ignores `backfillStart` and `backfillEnd`, treating them as if\nthey are true. Android's radial gradients ignore the `endPoint` property.\nDefaults to no gradient.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "examples": [ - { - "description": "Linear and Radial Gradients", - "code": "The following code excerpt creates two views, one with a linear gradient and one with\na radial gradient.\n\n``` js\nvar win1 = Titanium.UI.createWindow({\n title:'Tab 1',\n backgroundColor:'#fff',\n layout: 'vertical'\n});\n\nvar radialGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'radial',\n startPoint: { x: 50, y: 50 },\n endPoint: { x: 50, y: 50 },\n colors: [ 'red', 'blue'],\n startRadius: 50,\n endRadius: 0,\n backfillStart: true\n }\n});\nvar linearGradient = Ti.UI.createView({\n top: 10,\n width: 100,\n height: 100,\n backgroundGradient: {\n type: 'linear',\n startPoint: { x: '0%', y: '50%' },\n endPoint: { x: '100%', y: '50%' },\n colors: [ { color: 'red', offset: 0.0}, { color: 'blue', offset: 0.25 }, { color: 'red', offset: 1.0 } ],\n }\n});\nwin1.add(radialGradient);\nwin1.add(linearGradient);\nwin1.open();\n```\n" - } - ], - "type": "Gradient" - }, - { - "name": "backgroundImage", - "summary": "Background image for the view, specified as a local file path or URL.", - "description": "Default behavior when `backgroundImage` is unspecified depends on the type of view and the platform.\nFor generic views, no image is used. For most controls (buttons, textfields, and so on), platform-specific default images are used.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "backgroundRepeat", - "summary": "Determines whether to tile a background across a view.", - "description": "Setting this to `true` makes the set `backgroundImage` repeat across the view as a series\nof tiles. The tiling begins in the upper-left corner, where the upper-left corner of the\nbackground image is rendered. The image is then tiled to fill the available space of the\nview.\n\nNote that setting this to `true` may incur performance penalties for large views or\nbackground images, as the tiling must be redone whenever a view is resized.\n\nOn iOS, the following views do not currently support tiled backgrounds:\n\n* \n* \n* \n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "backgroundSelectedColor", - "summary": "Selected background color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\nDefaults to transparent, so the background color of this view will be used.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "backgroundSelectedImage", - "summary": "Selected background image URL for the view, specified as a local file path or URL.", - "description": "For normal views, the selected background is only used if `focusable` is `true`.\n\nIf `backgroundSelectedImage` is undefined, and the normal background image `backgroundImage` is set\nthe normal image is used when this view is selected.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "borderColor", - "summary": "Border color of the view, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n\nDefaults to the normal background color of this view (Android), black (iOS).\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "borderRadius", - "summary": "Radius for the rounded corners of the view's border.", - "description": "Each corner is rounded using an arc of a circle.\nValues for each corner can be specified. For example, '20px 20px' will set both left and right corners to `20px`.\nSpecifying '20px 20px 20px 20px' will set top-left, top-right, bottom-right and bottom-left corners in that order.\n\nIf you have issues with dark artifacts on Android you can try to disable Hardware acceleration by setting a\n`backgroundColor` with a small amount of transparency: `backgroundColor:\"rgba(255,255,255,254)\"`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String", - "Array", - "Array" - ], - "default": 0 - }, - { - "name": "borderWidth", - "summary": "Border width of the view.", - "description": "If [borderColor](Titanium.UI.View.borderColor) is set without [borderWidth](Titanium.UI.View.borderWidth), this value\nwill be changed to 1 of the unit declared as 'ti.ui.defaultunit' in tiapp.xml descriptor.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "default": 0 - }, - { - "name": "bottom", - "summary": "View's bottom position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the parent\nview's [layout](Titanium.UI.View.layout) property. Can be either a float value or a\ndimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "center", - "summary": "View's center position, in the parent view's coordinates.", - "description": "This is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Point" - }, - { - "name": "children", - "summary": "Array of this view's child views.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Array", - "permission": "read-only" - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "focusable", - "summary": "Whether view should be focusable while navigating with the trackball.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "height", - "summary": "View height, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's height dimension. To determine the\nview's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "left", - "summary": "View's left position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "layout", - "summary": "Specifies how the view positions its children.\nOne of: 'composite', 'vertical', or 'horizontal'.\n", - "description": "There are three layout options:\n\n* `composite` (or `absolute`). Default layout. A child view is positioned based on its\n positioning properties or \"pins\" (`top`, `bottom`, `left`, `right` and `center`).\n If no positioning properties are specified, the child is centered.\n\n The child is always sized based on its `width` and `height` properties, if these are\n specified. If the child's height or width is *not* specified explicitly, it may be\n calculated implicitly from the positioning properties. For example, if both `left` and\n `center.x` are specified, they can be used to calculate the width of the child control.\n\n Because the size and position properties can conflict, there is a specific precedence\n order for the layout properties. For vertical positioning, the precedence\n order is: `height`, `top`, `center.y`, `bottom`.\n\n The following table summarizes the various combinations of properties that can\n be used for vertical positioning, in order from highest precedence to lowest.\n (For example, if `height`, `center.y` and `bottom` are all specified, the\n `height` and `center.y` values take precedence.)\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ScenarioBehavior
height & top specified\n Child positioned top unit from parent's top, using specified height;\n any center.y and bottom values are ignored.\n
height & center.y specified\n Child positioned with center at center.y, using specified height;\n any bottom value is ignored.\n
height & bottom specifiedChild positioned bottom units from parent's bottom, using specified height.
top & center.y specified\n Child positioned with top edge top units from parent's top and center at\n center.y. Height is determined implicitly; any bottom value is ignored.\n
top & bottom specified\n Child positioned with top edge top units from parent's top and bottom edge\n bottom units from parent's bottom. Height is determined implicitly.\n
Only top specified\n Child positioned top units from parent's top, and uses the default height\n calculation for the view type.\n
center.y and bottom specified\n Child positioned with center at center.y and bottom edge bottom\n units from parent's bottom. Height is determined implicitly.\n
Only center.y specifiedChild positioned with center at center.y, and uses the default height calculation for the view type.
Only bottom specifiedChild positioned with bottom edge bottom units from parent's bottom, and uses the default height calculation for the view type.
height, top, center.y, and bottom unspecifiedChild entered vertically in the parent and uses the default height calculation for the child view type.
\n\n Horizontal positioning works like vertical positioning, except that the\n precedence is `width`, `left`, `center.x`, `right`.\n\n For complete details on composite layout rules, see\n [Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html)\n in the Titanium Mobile Guides.\n\n * `vertical`. Children are laid out vertically from top to bottom. The first child\n is laid out `top` units from its parent's bounding box. Each subsequent child is\n laid out below the previous child. The space between children is equal to the\n upper child's `bottom` value plus the lower child's `top` value.\n\n Each child is positioned horizontally as in the composite layout mode.\n\n * `horizontal`. Horizontal layouts have different behavior depending on whether wrapping\n is enabled. Wrapping is enabled by default (the `horizontalWrap` property is `true`).\n\n With wrapping behavior, the children are laid out horizontally from left to right,\n _in rows_. If a child requires more horizontal space than exists in the current row,\n it is wrapped to a new row. The height of each row is equal to the maximum height of\n the children in that row.\n\n Wrapping behavior is available on iOS and Android. When the `horizontalWrap` property is\n set to true, the first row is placed at the top of the parent view, and successive rows\n are placed below the first row. Each child is positioned vertically _within its row_ somewhat\n like composite layout mode. In particular:\n\n * If neither `top` or `bottom` is specified, the child is centered in the\n row.\n * If either `top` or `bottom` is specified, the child is aligned to either\n the top or bottom of the row, with the specified amount of padding.\n * If *both* `top` and `bottom` is specified for a given child, the properties\n are both treated as padding.\n\n If the `horizontalWrap` property is false, the behavior is more equivalent to a vertical layout.\n Children are laid or horizontally from left to right in a single row. The `left` and\n `right` properties are used as padding between the children, and the `top` and `bottom`\n properties are used to position the children vertically.\n\n Defaults to Composite layout.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "opacity", - "summary": "Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). Defaults to 1.0 (opaque).", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "overrideCurrentAnimation", - "summary": "When on, animate call overrides current animation if applicable.", - "description": "If this property is set to false, the animate call is ignored if the view is currently being animated.\n\nDefaults to `undefined` but behaves as false\n", - "platforms": [ - { - "since": "3.3.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation" - }, - { - "name": "right", - "summary": "View's right position, in platform-specific units.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "rect", - "summary": "The bounding box of the view relative to its parent, in system units.\n", - "description": "The view's bounding box is defined by its size and position.\n\nThe view's size is `rect.width` x `rect.height`. The view's top-left position relative to\nits parent is (`rect.x` , `rect.y`).\n\nOn Android it will also return `rect.absoluteX` and 'rect.absoluteY' which are relative to\nthe main window.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "DimensionWithAbsolutes", - "permission": "read-only" - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "size", - "summary": "The size of the view in system units.\n", - "description": "Although property returns a dictionary, only the `width` and `height`\nproperties are valid. The position properties--`x` and `y`--are always 0.\n\nTo find the position _and_ size of the view, use the [rect](Titanium.UI.View.rect)\nproperty instead.\n\nThe correct values will only be available when layout is complete.\nTo determine when layout is complete, add a listener for the\n[postlayout](Titanium.UI.View.postlayout) event.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Dimension", - "permission": "read-only" - }, - { - "name": "softKeyboardOnFocus", - "summary": "Determines keyboard behavior when this view is focused. Defaults to .", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS", - "Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS" - ] - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "top", - "summary": "The view's top position.", - "description": "This position is relative to the view's parent. Exact interpretation depends on the\nparent view's [layout](Titanium.UI.View.layout) property. Can be either a float value or\na dimension string (for example, '50%' or '10px').\n\nThis is an input property for specifying where the view should be positioned, and does not\nrepresent the view's calculated position.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ] - }, - { - "name": "touchEnabled", - "summary": "Determines whether view should receive touch events.", - "description": "If false, will forward the events to peers.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "6.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "transform", - "summary": "Transformation matrix to apply to the view.", - "description": "Android only supports Matrix2D transforms.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ], - "default": "Identity matrix" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "5.0.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "5.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "viewShadowColor", - "summary": "Determines the color of the shadow.", - "description": "iOS Defaults to `undefined`. Behaves as if transparent. Android default is black.\nOn Android you can set `0.5` and\n`0.5` in your theme to change the\nopacity.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "visible", - "summary": "Determines whether the view is visible.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "width", - "summary": "View's width, in platform-specific units.", - "description": "Defaults to: If undefined, defaults to either or \ndepending on the view. See \"View Types and Default Layout Behavior\" in\n[Transitioning to the New UI Layout System](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_Guide/Contributing_to_Titanium/Platform_Development/Specs/UI_Composite_Layout_Behavior_Spec.html).\n\nCan be either a float value or a dimension string (for example, '50%' or '40dp').\nCan also be one of the following special values:\n\n* . The view should size itself to fit its contents.\n* . The view should size itself to fill its parent.\n* 'auto'. Represents the default sizing behavior for a given type of\n view. The use of 'auto' is deprecated, and should be replaced with the `SIZE` or\n `FILL` constants if it is necessary to set the view's behavior explicitly.\n\nThis is an input property for specifying the view's width dimension. To determine\nthe view's size once rendered, use the [rect](Titanium.UI.View.rect) or\n[size](Titanium.UI.View.size) properties.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": [ - "Number", - "String" - ], - "constants": [ - "Titanium.UI.FILL", - "Titanium.UI.SIZE" - ] - }, - { - "name": "horizontalWrap", - "summary": "Determines whether the layout has wrapping behavior.", - "description": "For more information, see the discussion of horizontal layout mode in the description of\nthe [layout](Titanium.UI.View.layout) property.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": true - }, - { - "name": "zIndex", - "summary": "Z-index stack order position, relative to other sibling views.", - "description": "A view does not have a default z-index value, meaning that it is undefined by default.\nWhen this property is explicitly set, regardless of its value, it causes the view to be\npositioned in front of any sibling that has an undefined z-index.\n\nDefaults to `undefined`.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "keepScreenOn", - "summary": "Determines whether to keep the device screen on.", - "description": "When `true` the screen will not power down. Note: enabling this feature will use more\npower, thereby adversely affecting run time when on battery.\nFor iOS look at [Titanium.App.idleTimerDisabled](Titanium.App.idleTimerDisabled).\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "color", - "summary": "Color of the text in this SearchView, as a color name or hex triplet.", - "description": "For information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "hintText", - "summary": "Text to show when the search view field is not focused.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "String", - "default": "no hint text" - }, - { - "name": "hintTextColor", - "summary": "Color of hint text that displays when field is empty.", - "description": "Color of hint text that displays when field is empty.\n", - "platforms": [ - { - "since": "7.1.0", - "name": "android" - } - ], - "type": "String", - "default": "Default Android theme's hint text color." - }, - { - "name": "value", - "summary": "Value of the search view.", - "description": "This value cannot be set until after the search view is created.\n", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "iconified", - "summary": "Iconifies or expands the search view", - "description": "see [Android Documentation](https://developer.android.com/reference/android/widget/SearchView.html#setIconified(boolean)) for more details.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "Boolean", - "default": "undefined" - }, - { - "name": "iconifiedByDefault", - "summary": "Sets the default or resting state of the search view", - "description": "see [Android Documentation](https://developer.android.com/reference/android/widget/SearchView.html#setIconifiedByDefault(boolean)) for more details.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "Boolean", - "default": true - }, - { - "name": "submitEnabled", - "summary": "Whether to display the submit button when necessary or never display.", - "platforms": [ - { - "since": "3.0.2", - "name": "android" - } - ], - "type": "Boolean", - "default": "undefined" - } - ], - "subtype": "view" - }, - "Titanium.UI.Android.Snackbar": { - "name": "Titanium.UI.Android.Snackbar", - "summary": "Snackbars provide brief messages about app processes at the bottom of the screen.", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Android/Snackbar.yml", - "description": "| Android |\n| ------- |\n| ![Android](./snackbar_android.png) |\n\nFor design guidelines, see\n[Material design: Snackbars](https://material.io/components/snackbars)\n", - "events": [ - { - "name": "click", - "summary": "Fired when the action button is clicked", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "properties": [ - { - "name": "action", - "summary": "The text of the action button.", - "type": "String" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Show a Snackbar", - "code": "Display a Snackbar with an action button.\n\n``` js\nconst win = Ti.UI.createWindow();\nconst btn = Ti.UI.createButton({\n title: 'show message'\n});\nbtn.addEventListener('click', function() {\n snack.show();\n});\n\nconst snack = Ti.UI.Android.createSnackbar({\n message: 'Hello Snackbar!',\n length: Ti.UI.Android.Snackbar.LENGTH_INDEFINITE,\n action: 'click me'\n});\nsnack.addEventListener('click', function(e) {\n console.log(e.action);\n});\n\nwin.add([btn, snack]);\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "hide", - "summary": "Hides this view.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and used only on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "insertAt", - "summary": "Inserts a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object that specifies the view to insert and optionally at which position (defaults to end)\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "replaceAt", - "summary": "Replaces a view at the specified position in the [children](Titanium.UI.View.children) array.", - "description": "Useful if the `layout` property is set to `horizontal` or `vertical`.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "params", - "summary": "Pass an object with the view to insert and the position of the view to replace. In this case the `position` property is required.\n", - "type": "ViewPositionOptions" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "show", - "summary": "Show the Snackbar", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "parameters": [ - { - "name": "options", - "summary": "Animation options for Android only. **Since SDK 5.1.0 and only used on Android 5.0+**\n\nDetermines whether to enable a circular reveal animation.\nNote that the default here is equivalent to passing in `{ animated: false }`\n", - "type": "AnimatedOptions", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "stopAnimation", - "summary": "Stops a running animation.", - "description": "Stops a running view [Animation](Titanium.UI.Animation).\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "returns": { - "type": "void" - } - }, - { - "name": "getViewById", - "summary": "Returns the matching view of a given view ID.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "parameters": [ - { - "name": "id", - "summary": "The ID of the view that should be returned. Use the `id` property in your views to\nenable it for indexing in this method.\n", - "type": "String" - } - ], - "returns": { - "type": "Titanium.UI.View" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "accessibilityDisableLongPress", - "summary": "Boolean value to remove the long press notification for the device's accessibility service.", - "description": "Will disable the \"double tap and hold for long press\" message when selecting an item.\n", - "platforms": [ - { - "since": "12.4.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "availability": "creation", - "default": true - }, - { - "name": "elevation", - "summary": "Base elevation of the view relative to its parent in pixels.", - "description": "The elevation of a view determines the appearance of its shadow.\nHigher elevations produce larger and softer shadows.\n\n**Note:** The `elevation` property only works on `Titanium.UI.View` objects.\nMany Android components have a default elevation that cannot be modified.\nFor more information, see\n[Google design guidelines: Elevation and shadows](https://developer.android.com/training/material/shadows-clipping#Elevation).\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "filterTouchesWhenObscured", - "summary": "Discards touch related events if another app's system overlay covers the view.", - "description": "This is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nSetting this property to `true` causes touch related events (including \"click\") to not be fired\nif a system overlay overlaps the view.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "hiddenBehavior", - "summary": "Sets the behavior when hiding an object to release or keep the free space", - "description": "If setting `hiddenBehavior` to it will automatically release the space the view occupied.\nFor example: in a vertical layout the views below the object will move up when you hide\nan object with `hiddenBehavior:Titanium.UI.HIDDEN_BEHAVIOR_GONE`.\n\n* . Keeps the space and just hides the object (default).\n* . Releases the space and hides the object.\n\nDefaults to Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number", - "constants": [ - "Titanium.UI.HIDDEN_BEHAVIOR_INVISIBLE", - "Titanium.UI.HIDDEN_BEHAVIOR_GONE" - ] - }, - { - "name": "id", - "summary": "View's identifier.", - "description": "The `id` property of the Ti.UI.View represents the view's identifier. The identifier string does\nnot have to be unique. You can use this property with method.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String", - "optional": true - }, - { - "name": "keepHardwareMode", - "summary": "A value indicating the render mode of the View", - "description": "Set to true to keep hardware mode when using a border and transparent backgrounds.\n", - "platforms": [ - { - "since": "13.2.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "rotation", - "summary": "Clockwise 2D rotation of the view in degrees.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Clockwise rotation of the view in degrees (x-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Clockwise rotation of the view in degrees (y-axis).", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleX", - "summary": "Scaling of the view in x-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "scaleY", - "summary": "Scaling of the view in y-axis in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "tooltip", - "summary": "The default text to display in the control's tooltip.", - "description": "Assigning a value to this property causes the tool tip to be displayed for the view.\nSetting the property to `null` cancels the display of the tool tip for the view.\nNote: This property is only used for apps targeting macOS Catalyst.\n", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "touchFeedback", - "summary": "A material design visual construct that provides an instantaneous visual confirmation of touch point.", - "description": "Touch feedback is only applied to a view's background. It is never applied to the view's foreground content\nsuch as a 's image.\n\nFor Titanium versions older than 9.1.0, touch feedback only works if you set the\n property to a non-transparent color.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Boolean", - "default": false - }, - { - "name": "touchFeedbackColor", - "summary": "Optional touch feedback ripple color. This has no effect unless `touchFeedback` is true.", - "description": "Defaults to provided theme color.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "translationX", - "summary": "Horizontal location of the view relative to its left position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationY", - "summary": "Vertical location of the view relative to its top position in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "translationZ", - "summary": "Depth of the view relative to its elevation in pixels.", - "description": "Translation values are applied to the static post layout value.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "Number" - }, - { - "name": "transitionName", - "summary": "A name to identify this view in activity transition.", - "description": "Name should be unique in the View hierarchy.", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "inherits": "Titanium.UI.View", - "type": "String" - }, - { - "name": "LENGTH_SHORT", - "summary": "Use with `length` to specify the display time.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LENGTH_LONG", - "summary": "Use with `length` to specify the display time.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "LENGTH_INDEFINITE", - "summary": "Use with `length` to specify the display time.\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "Number", - "permission": "read-only" - }, - { - "name": "length", - "summary": "Display time of the Snackbar", - "description": "Use with on of the constants: `Ti.UI.Android.Snackbar.LENGTH_SHORT`,\n`Ti.UI.Android.Snackbar.LENGTH_LONG` or\n`Ti.UI.Android.Snackbar.LENGTH_INDEFINITE`\n", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "Number", - "default": "LENGTH_SHORT" - }, - { - "name": "action", - "summary": "Text of the right hand action button", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "String" - }, - { - "name": "message", - "summary": "Text of Snackbar", - "platforms": [ - { - "since": "11.1.0", - "name": "android" - } - ], - "type": "String" - } - ], - "subtype": "view" - }, - "AnimatedOptions": { - "name": "AnimatedOptions", - "summary": "A JavaScript object holding an `animated` property. Used for many UI methods as a means of specifying some transition should be animated.", - "extends": "Object", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AnimatedOptions.yml", - "properties": [ - { - "name": "animated", - "summary": "If `true`, animate a transition for the method/value change.\n\nNote that for most uses cases the default is assumed to be `false`. The exceptions tend to be methods.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false, - "optional": true - } - ] - }, - "AnimatedWithDurationOptions": { - "name": "AnimatedWithDurationOptions", - "summary": "A JavaScript object holding `animated` and `duration` properties. Used on iOS For [TableView](Titanium.UI.TableView) and [ListView](Titanium.UI.ListView) content offset transitions.", - "extends": "AnimatedOptions", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AnimatedOptions.yml", - "properties": [ - { - "name": "animated", - "summary": "If `true`, animate a transition for the method/value change.\n\nNote that for most uses cases the default is assumed to be `false`. The exceptions tend to be methods.\n", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "AnimatedOptions", - "type": "Boolean", - "default": false, - "optional": true - }, - { - "name": "duration", - "summary": "The duration in `milliseconds` for animation", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": 300, - "optional": true - } - ] - }, - "Titanium.UI.Animation": { - "name": "Titanium.UI.Animation", - "summary": "The `Animation` object defines an animation that can be applied to a view.", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Animation.yml", - "description": "An animation object describes the properties of an animation. At its most basic, an animation\nobject represents a single-phase animation with an end state and a duration.\n\nWhen [animate](Titanium.UI.View.animate) is called on a [View](Titanium.UI.View), the view is\nanimated from its current state to the state described by the animation object. The properties\nthat can be animated include the view's position, size, colors, transformation matrix and opacity.\n\nYou can also specify an animation curve or *easing function* to control the pace of the\nanimation. To use an easing function, set the animation's `curve` property to one of the\n`ANIMATION_CURVE` constants defined in . For example,\n[ANIMATION_CURVE_EASE_IN](Titanium.UI.ANIMATION_CURVE_EASE_IN) specifies an animation that\nstarts slowly and then speeds up.\n\nAnimations can be set to reverse themselves automatically on completion, and to repeat a given\nnumber of times. For more complicated effects, multiple animations can be combined in sequence,\nstarting one animation when the previous animation completes.\n\nUse the method to create an animation object.\n\nNote that on SDKs older than 9.1.0, when you animate a view's size or position the actual layout properties (such as\n`top`, `left`, `width`, `height`) are not changed by the animation. See the description of the\n[animate](Titanium.UI.View.animate) method for more information.\n\nAs of 9.1.0, the animated properties should reflect their final values just before the `complete` event and/or the callback is fired.\n\n#### iOS Platform Notes\n\niOS supports both 2D and 3D matrix transformations in animations.\n\niOS also supports *transitions* between windows or views. You can create a transition\nby creating an animation object and setting the `view` property to the view you want to\ntransition to. The `transition` property specifies the transition effect to apply. Use one of\nthe transition style constants defined in .\n\n#### Android Platform Notes\n\nAndroid supports 2D matrix transformations. Note that the\n[Matrix2D.rotate](Titanium.UI.Matrix2D.rotate) method operates differently on Android. Called\nwith a single argument, it rotates from zero to the specified angle. That is, it ignores any\nexisting rotation. Called with two arguments, it interprets the first argument as a \"from\"\nangle and the second argument as a \"to\" angle.\n", - "events": [ - { - "name": "cancel", - "summary": "Fired when the animation is canceled.", - "platforms": [ - { - "since": "12.1.0", - "name": "android" - } - ] - }, - { - "name": "complete", - "summary": "Fired when the animation completes.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - }, - { - "name": "start", - "summary": "Fired when the animation starts.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ] - } - ], - "examples": [ - { - "description": "Simple Animation Applied to a View", - "code": "Create a simple animation and apply it to the view. In this example, the view will animate\nfrom red to black to orange over 2 seconds.\n\n``` js\nvar view = Titanium.UI.createView({\n backgroundColor:'red'\n});\nvar animation = Titanium.UI.createAnimation();\nanimation.backgroundColor = 'black';\nanimation.duration = 1000;\nvar animationHandler = function() {\n animation.removeEventListener('complete',animationHandler);\n animation.backgroundColor = 'orange';\n view.animate(animation);\n};\nanimation.addEventListener('complete',animationHandler);\nview.animate(animation);\n```\n" - }, - { - "description": "Animation Using Matrix Transforms", - "code": "The following example uses a transformation matrix to animate\na view when the view is clicked. The animation rotates and scales\nthe view, then returns it to its original size and position. The\nentire animation is repeated three times.\n\n``` js\nvar box = Ti.UI.createView({\n backgroundColor : 'red',\n height : '100',\n width : '100'\n});\nwin.add(box);\n\nbox.addEventListener('click', function() {\n var matrix = Ti.UI.createMatrix2D();\n matrix = matrix.rotate(180);\n matrix = matrix.scale(2, 2);\n var a = Ti.UI.createAnimation({\n transform : matrix,\n duration : 2000,\n autoreverse : true,\n repeat : 3\n });\n box.animate(a);\n});\n\nwin.add(box);\n```\n" - }, - { - "description": "Using an anchorPoint (Android and iOS)", - "code": "Create a button and a blue square view. For each click of the button, apply a 90 degree\nrotation animation pivoted at one of a series of anchor points. In particular, note that\nan anchor point is configured using the property for\nAndroid and the property for iOS.\n\n``` js\nvar animationType = [\n { name: 'Top Left', anchorPoint: {x:0, y:0} },\n { name: 'Top Right', anchorPoint: {x:1, y:0} },\n { name: 'Bottom Left', anchorPoint: {x:0, y:1} },\n { name: 'Bottom Right', anchorPoint: {x:1, y:1} },\n { name: 'Center', anchorPoint: {x:0.5, y:0.5} }\n];\nvar animationTypeLength = animationType.length;\nvar animationCount = 0;\nvar animationTypePointer = 0;\n\nvar t = Ti.UI.createMatrix2D();\nt = t.rotate(90);\n\n// animation properties\nvar a = {\n transform: t,\n duration: 2000,\n autoreverse: true\n};\n\nTi.UI.backgroundColor = 'white';\nvar win = Ti.UI.createWindow();\n\nvar view = Ti.UI.createView({\n backgroundColor:'#336699',\n width:100, height:100\n});\nwin.add(view);\n\nvar button = Ti.UI.createButton({\n title:'Animate ' + animationType[animationTypePointer].name,\n height: (Ti.UI.Android) ? 80 : 40,\n width: (Ti.UI.Android) ? 300 : 200,\n top:30\n});\nwin.add(button);\n\nfunction updateButton(name){\n button.title = 'Animate ' + name;\n}\n\nbutton.addEventListener('click', function(){\n // set new anchorPoint on animation for Android\n a.anchorPoint = animationType[animationTypePointer].anchorPoint;\n\n // set new anchorPoint on view for iOS\n view.anchorPoint = animationType[animationTypePointer].anchorPoint;\n\n animationCount++;\n\n // determine position of next object in animationType array or return to first item\n // using modulus operator\n animationTypePointer = animationCount % animationTypeLength;\n\n // animate view, followed by callback to set next button title\n view.animate(a, function(){\n updateButton(animationType[animationTypePointer].name);\n });\n});\n\nwin.open();\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "3.0.0", - "name": "iphone" - }, - { - "since": "3.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.2.0", - "name": "android" - }, - { - "since": "3.2.0", - "name": "iphone" - }, - { - "since": "3.2.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "anchorPoint", - "summary": "Coordinate of the view about which to pivot an animation.", - "description": "Used on Android only. For iOS, use .\n\nAnchor point is specified as a fraction of the view's size. For example, `{0, 0}` is at\nthe view's top-left corner, `{0.5, 0.5}` at its center and `{1, 1}` at its bottom-right\ncorner.\n\nThis property's value will overwrite the [anchorPoint](Matrix2DCreationDict.anchorPoint) used in the matrix's creation dictionary.\n\nSee the \"Using an anchorPoint\" example for a demonstration.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "type": "Point" - }, - { - "name": "autoreverse", - "summary": "Specifies if the animation should be replayed in reverse upon completion.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean", - "default": false - }, - { - "name": "backgroundColor", - "summary": "Value of the `backgroundColor` property at the end of the animation, as a color name\nor hex triplet.\n", - "description": "For information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "bottom", - "summary": "Value of the `bottom` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "center", - "summary": "Value of the `center` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Point" - }, - { - "name": "color", - "summary": "Value of the `color` property at the end of the animation, as a color name or hex triplet.\n", - "description": "For information about color values, see the \"Colors\" section of .\n", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Titanium.UI.Color" - ] - }, - { - "name": "curve", - "summary": "Animation curve or easing function to apply to the animation.", - "platforms": [ - { - "since": "8.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.ANIMATION_CURVE_EASE_IN", - "Titanium.UI.ANIMATION_CURVE_EASE_IN_OUT", - "Titanium.UI.ANIMATION_CURVE_EASE_OUT", - "Titanium.UI.ANIMATION_CURVE_LINEAR" - ] - }, - { - "name": "dampingRatio", - "summary": "The damping ratio for the spring animation as it approaches its quiescent state.\n", - "description": "Use a value between 0 and 1. For a smoother deceleration use values closer to 1.\nTo increase oscillation use value closer to 0.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "delay", - "summary": "Delay, in milliseconds before starting the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "duration", - "summary": "Duration of the animation, in milliseconds.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "rotationY", - "summary": "Value of the `rotationY` property at the end of the animation.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "rotationX", - "summary": "Value of the `rotationX` property at the end of the animation.", - "platforms": [ - { - "since": "12.2.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "elevation", - "summary": "Value of the `elevation` property at the end of the animation.", - "platforms": [ - { - "since": "9.1.0", - "name": "android" - } - ], - "type": "Number" - }, - { - "name": "height", - "summary": "Value of the `height` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "left", - "summary": "Value of the `left` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "opacity", - "summary": "Value of the `opacity` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "opaque", - "summary": "Value of the `opaque` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "repeat", - "summary": "Number of times the animation should be performed.", - "description": "If `autoreverse` is `true`, then one repeat of the animation consists of the animation\nbeing played once forward, and once backward.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "default": "1 (no repeat)" - }, - { - "name": "right", - "summary": "Value of the `right` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "springVelocity", - "summary": "The initial spring velocity.", - "description": "For smooth start to the animation, match this value to the velocity of view as it was prior to attachment.\nA value of 1 corresponds to the total animation distance traversed in one second.\nFor example, if the total animation distance is 200 points and you want the start of the\nanimation to match a view velocity of 100 pt/s, use a value of 0.5.\n", - "platforms": [ - { - "since": "8.1.0", - "name": "iphone" - }, - { - "since": "8.1.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "bounce", - "summary": "The animation bounce. If set, the animation uses the iOS 17+ spring animation.", - "description": "When `bounce` is 0, there are no bounces, positive values indicate increasing amounts of bounciness up to a maximum\nof 1.0 (corresponding to undamped oscillation), and negative values indicate overdamped springs with a minimum value of -1.0.\n", - "platforms": [ - { - "since": "12.2.0", - "name": "iphone" - }, - { - "since": "12.2.0", - "name": "ipad" - }, - { - "since": "12.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "top", - "summary": "Value of the `top` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "transform", - "summary": "Animate the view from its current transform to the specified transform.", - "description": "Over the course of the animation, the view interpolates from its current transform to the\nspecified transform.\n\n3D transforms are only supported on iOS.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Titanium.UI.Matrix2D", - "Titanium.UI.Matrix3D" - ] - }, - { - "name": "transition", - "summary": "Transition type to use during a transition animation.", - "description": "The new view being transitioned to **should NOT** be a child of another view or\nof the animating view. The animation replaces the current view from the\nview hierarchy and adds the new view to it.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.iOS.AnimationStyle.CURL_DOWN", - "Titanium.UI.iOS.AnimationStyle.CURL_UP", - "Titanium.UI.iOS.AnimationStyle.FLIP_FROM_LEFT", - "Titanium.UI.iOS.AnimationStyle.FLIP_FROM_RIGHT", - "Titanium.UI.iOS.AnimationStyle.FLIP_FROM_TOP", - "Titanium.UI.iOS.AnimationStyle.FLIP_FROM_BOTTOM", - "Titanium.UI.iOS.AnimationStyle.CROSS_DISSOLVE", - "Titanium.UI.iOS.AnimationStyle.NONE" - ] - }, - { - "name": "view", - "summary": "New view to transition to.", - "description": "Specify the `transition` property with one of the transition style constants defined\nin to select the effect to apply.\n\nThe new view being transitioned to **should NOT** be a child of another view or\nof the animating view. The animation replaces the current view from the\nview hierarchy and adds the new view to it.\n", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Titanium.UI.View" - }, - { - "name": "visible", - "summary": "Value of the `visible` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - }, - { - "name": "width", - "summary": "Value of the `width` property at the end of the animation.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "zIndex", - "summary": "Value of the `zIndex` property at the end of the animation.", - "description": "Refer to for an explanation of z-index.", - "platforms": [ - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - } - ], - "subtype": "proxy" - }, - "Attribute": { - "name": "Attribute", - "summary": "An abstract datatype for specifying an attributed string attribute.", - "extends": "Object", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Attribute.yml", - "description": "Attributes are added to the object to create\nstyled text. The attribute is a JavaScript Object containing three properties:\n`type`, `value` and `range`.\n", - "properties": [ - { - "name": "type", - "summary": "Attribute to apply to the text.", - "description": "On Android, only the following constants are supported\nTitanium.UI.ATTRIBUTE_FONT, Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,\nTitanium.UI.ATTRIBUTE_BACKGROUND_COLOR, Titanium.UI.ATTRIBUTE_STRIKETHROUGH_STYLE,\nTitanium.UI.ATTRIBUTE_UNDERLINES_STYLE, Titanium.UI.ATTRIBUTE_LINK, \nTitanium.UI.ATTRIBUTE_UNDERLINE_COLOR\n\nON iOS, Titanium.UI.ATTRIBUTE_LINK only supported on , with\neditable set to false and autoLink enabled.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "optional": false, - "constants": [ - "Titanium.UI.ATTRIBUTE_FONT", - "Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR", - "Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR", - "Titanium.UI.ATTRIBUTE_STRIKETHROUGH_STYLE", - "Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE", - "Titanium.UI.ATTRIBUTE_LINK", - "Titanium.UI.ATTRIBUTE_UNDERLINE_COLOR", - "Titanium.UI.ATTRIBUTE_LIGATURE", - "Titanium.UI.ATTRIBUTE_KERN", - "Titanium.UI.ATTRIBUTE_STROKE_COLOR", - "Titanium.UI.ATTRIBUTE_STROKE_WIDTH", - "Titanium.UI.ATTRIBUTE_SHADOW", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION", - "Titanium.UI.ATTRIBUTE_TEXT_EFFECT", - "Titanium.UI.ATTRIBUTE_BASELINE_OFFSET", - "Titanium.UI.ATTRIBUTE_STRIKETHROUGH_COLOR", - "Titanium.UI.ATTRIBUTE_OBLIQUENESS", - "Titanium.UI.ATTRIBUTE_EXPANSION", - "Titanium.UI.ATTRIBUTE_LINE_BREAK" - ] - }, - { - "name": "value", - "summary": "Attribute value.", - "description": "The `value` parameter depends on the `type` parameter. For example, to\nuse the foreground color on the text you would use \nfor the `type` and a color value for the `value`:\n``` js\n{\n type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,\n value: '#DDD',\n range: [0, 100]\n}\n```\n\nOn iOS, if you use or ,\nyou must use one or more of these constants:\n\n * \n * \n * \n * \n * \n * \n * \n * \n * \n * \n\nThese can be combined:\n``` js\n{\n type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,\n value: Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE | Titanium.UI.ATTRIBUTE_UNDERLINE_PATTERN_DASH,\n range: [0, 100]\n}\n```\n\nOn iOS, if you use the , you must use one or more of\nthese constants:\n\n * \n * \n * \n * \n * \n\nThese can also be combined the same way as the underline styles.\n\nOn iOS, if you use the , the `value` must be a JavaScript object containing\nany of the `offset`, `blurRadius` or `color` properties:\n``` js\n{\n offset: {\n width: 10,\n height: 10\n },\n blurRadius: 10,\n color: 'red'\n}\n```\n\nOn iOS, if you use the , the `value` must be ParagraphAttribute. \nE.g:\n``` js\n{\n minimumLineHeight: 10.0,\n tailIndent: 5,\n lineBreakMode: Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_WORD_WRAPPING\n}\n```\n\nOn iOS, if you use the , you must use the constant.\n\nOn iOS, if you use the , you must use one of\nthese constants:\n\n * \n * \n * \n * \n * \n * \n\nThese can also be combined the same way as the underline styles.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "String", - "Number", - "Titanium.UI.Color", - "Object", - "ParagraphAttribute" - ], - "optional": false, - "constants": [ - "Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_NONE", - "Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE", - "Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_THICK", - "Titanium.UI.ATTRIBUTE_UNDERLINE_STYLE_DOUBLE", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_EMBEDDING", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_OVERRIDE", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_NATURAL", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_LEFT_TO_RIGHT", - "Titanium.UI.ATTRIBUTE_WRITING_DIRECTION_RIGHT_TO_LEFT", - "Titanium.UI.ATTRIBUTE_LETTERPRESS_STYLE" - ] - }, - { - "name": "range", - "summary": "Attribute range.", - "description": "This specifies the range of text to apply the property to, as an array of two numbers: `[from, length]`.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array", - "optional": false - } - ] - }, - "ParagraphAttribute": { - "name": "ParagraphAttribute", - "summary": "An abstract datatype for specifying an Paragraph style attribute.", - "extends": "Object", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "pseudo", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Attribute.yml", - "description": "Attributes are added corresponding to value to create paragraph style, \nwhich when used with attributed string will give styled text. \n", - "properties": [ - { - "name": "alignment", - "summary": "The text alignment of the receiver.", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.TEXT_ALIGNMENT_CENTER", - "Titanium.UI.TEXT_ALIGNMENT_JUSTIFY", - "Titanium.UI.TEXT_ALIGNMENT_LEFT", - "Titanium.UI.TEXT_ALIGNMENT_RIGHT" - ] - }, - { - "name": "firstLineHeadIndent", - "summary": "The indentation of the first line of the receiver.", - "description": "This property contains the distance (in points) from the leading margin \nof a text container to the beginning of the first line of paragraph. \nThis value is always nonnegative float value or dimension string (e.g. '10px').\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "headIndent", - "summary": "The indentation of the lines of lines other than the first.", - "description": "This property contains the distance (in points) from the leading margin \nof a text container to the beginning of lines other than the first. \nThis value is always nonnegative float value or dimension string (e.g. '10px').\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "tailIndent", - "summary": "The trailing indentation of the receiver.", - "description": "If positive, this value is the distance (in points) from the leading margin \n(for example, the left margin in left-to-right text). If 0 or negative, \nit is the distance (in points) from the trailing margin. This is a float value or \ndimension string (e.g. '10px').\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "lineBreakMode", - "summary": "The mode that should be used to break lines in the receiver.", - "description": "This property contains the line break mode to be used laying out the text of paragraph.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number", - "constants": [ - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_WORD_WRAPPING", - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_CHAR_WRAPPING", - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_CLIPPING", - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_HEAD", - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_MIDDLE", - "Titanium.UI.ATTRIBUTE_LINE_BREAK_BY_TRUNCATING_TAIL" - ] - }, - { - "name": "maximumLineHeight", - "summary": "The maximum line height of receiver.", - "description": "This property contains the maximum height in points that any line in the receiver will occupy, \nregardless of the font size or size of any attached graphic. This value is always nonnegative \nfloat value or dimension string (e.g. '10px'). The default value is 0. \nGlyphs and graphics exceeding this height will overlap neighboring lines; however, a maximum \nheight of 0 implies no line height limit. Although this limit applies to the line itself, \nline spacing adds extra space between adjacent lines.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "minimumLineHeight", - "summary": "The minimum height of receiver.", - "description": "This property contains the minimum height in points that any line in the receiver will occupy, \nregardless of the font size or size of any attached graphic. This value must be nonnegative float value \nor dimension string (e.g. '10px').\nE.g. If you have set minimum height 30 and font size 10. It will make line height 30 which have \nsmaller text size and more vertical spacing between text. \n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "lineSpacing", - "summary": "The distance in points between the bottom of one line fragment and the top of the next.", - "description": "This value is always nonnegative float value or dimension string (e.g. '10px'). This value is \nincluded in the line fragment heights in the layout manager.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "paragraphSpacingAfter", - "summary": "The space after the end of the paragraph.", - "description": "This property contains the space (measured in points) added at the end of the paragraph \nto separate it from the following paragraph. This value must be nonnegative float value or \ndimension string (e.g. '10px'). The space between paragraphs is determined by adding the paragraphSpacingAfter \nof previous paragraph and the paragraphSpacingBefore of current paragraph.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "paragraphSpacingBefore", - "summary": "The distance between the top of paragraph and the beginning of its text content.", - "description": "This property contains the space (measured in points) between the top of paragraph and \nthe beginning of its text content. This value can be float value or dimension string (e.g. '10px').\nThe default value of this property is 0.0.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": [ - "Number", - "String" - ] - }, - { - "name": "lineHeightMultiple", - "summary": "The line height multiple.", - "description": "The natural line height of the receiver is multiplied by this factor (if positive) \nbefore being constrained by minimum and maximum line height. The default value of \nthis property is 0.0, which means nothing multiplied.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "hyphenationFactor", - "summary": "The threshold of paragraph for hyphenation.", - "description": "Valid values lie between 0.0 and 1.0 inclusive. The default value is 0.0. Hyphenation \nis attempted when the ratio of the text width (as broken without hyphenation) to the \nwidth of the line fragment is less than the hyphenation factor. When the hyphenation \nfactor of paragraph is 0.0, the hyphenation factor of layout manager is used instead. \nWhen both are 0.0, hyphenation is disabled. This property detects the user-selected \nlanguage by examining the first item in preferredLanguages.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Number" - }, - { - "name": "allowsDefaultTighteningForTruncation", - "summary": "A Boolean value indicating whether the system may tighten inter-character spacing \nbefore truncating text.\n", - "description": "When this property is set to true, the system tries to reduce the space between characters \nbefore truncating characters. The system performs this tightening in cases where the text \nwould not otherwise fit in the available space. The maximum amount of tightening performed \nby the system is dependent on the font, line width, and other factors. The default value of \nthis property is false.\n", - "platforms": [ - { - "since": "7.5.0", - "name": "iphone" - }, - { - "since": "7.5.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Boolean" - } - ] - }, - "Titanium.UI.AttributedString": { - "name": "Titanium.UI.AttributedString", - "summary": "An attributed string proxy manages character strings and associated sets of attributes (for example,\nfont and foregroundcolor) that apply to individual characters or ranges of characters in the string.\n", - "extends": "Titanium.Proxy", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/AttributedString.yml", - "description": "The AttributedString proxy is created with the method.\n\nThe `text` property must be set initially in the constructor when creating an attributed string.\nThe [attributes](Titanium.UI.AttributedString.attributes) can either be set in the constructor or after it has been created.\n\nFor examples of Attributed Strings, see the\n[Attributed Strings guide](https://titaniumsdk.com/guide/Titanium_SDK/Titanium_SDK_How-tos/User_Interface_Deep_Dives/Attributed_Strings.html).\n", - "examples": [ - { - "description": "Adds an array of attributes to a label", - "code": "Creates an AttributedString proxy, adds some attributes to it, and applies them\nto a .\n\n``` js\nvar win = Titanium.UI.createWindow({\n backgroundColor: '#ddd',\n});\n\nwin.open();\n\nvar text = 'Bacon ipsum dolor Titanium SDK rocks! sit amet fatback leberkas salami sausage tongue strip steak.';\n\nvar attr = Titanium.UI.createAttributedString({\n text: text,\n attributes: [\n // Underlines text\n {\n type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,\n value: Ti.UI.ATTRIBUTE_UNDERLINE_STYLE_SINGLE,\n range: [text.indexOf('Titanium'), ('Titanium').length]\n },\n // Sets a background color\n {\n type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,\n value: \"red\",\n range: [text.indexOf('Titanium'), ('Titanium').length]\n },\n {\n type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,\n value: \"blue\",\n range: [text.indexOf('Titanium'), ('Titanium').length]\n },\n {\n type: Titanium.UI.ATTRIBUTE_BACKGROUND_COLOR,\n value: \"yellow\",\n range: [text.indexOf('rocks!'), ('rocks!').length]\n },\n // Sets a foreground color\n {\n type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,\n value: \"orange\",\n range: [0, text.length]\n },\n {\n type: Titanium.UI.ATTRIBUTE_FOREGROUND_COLOR,\n value: \"black\",\n range: [text.indexOf('rocks!'), ('rocks!').length]\n }\n ]\n});\n\nvar label = Titanium.UI.createLabel({\n left: 20,\n right: 20,\n height: Titanium.UI.SIZE,\n attributedString: attr\n});\n\nwin.add(label);\n```\n" - }, - { - "description": "Adds attributes, one by one.", - "code": "``` js\nvar win = Titanium.UI.createWindow({\n backgroundColor: '#ddd',\n});\n\nwin.open();\n\nvar text = 'Bacon ipsum dolor Titanium SDK rocks! sit amet fatback leberkas salami sausage tongue strip steak.';\n\nvar attr = Titanium.UI.createAttributedString({\n text: text\n});\n\n// Underlines text\nattr.addAttribute({\n type: Titanium.UI.ATTRIBUTE_UNDERLINES_STYLE,\n range: [0, text.length]\n});\n\nvar label = Titanium.UI.createLabel({\n left: 20,\n right: 20,\n height: Titanium.UI.SIZE,\n attributedString: attr\n});\n\nwin.add(label);\n```\n" - }, - { - "description": "Links with underline color.", - "code": "``` js\nconst win = Ti.UI.createWindow({\n\tbackgroundColor: 'gray',\n\tlayout: 'vertical'\n});\nconst lbl_a = createLink();\nconst lbl_b = createLink();\n\ncolorLink(lbl_b);\n\nwin.add([lbl_a, lbl_b]);\nwin.open();\n\nfunction createLink() {\n\tconst label = Ti.UI.createLabel({\n\t\ttop: 20,\n\t\tattributedString: Ti.UI.createAttributedString({\n\t\t\ttext: 'Check out Titanium SDK',\n\t\t\tattributes: [{\n\t\t\t\ttype: Ti.UI.ATTRIBUTE_LINK,\n\t\t\t\tvalue: 'https://titaniumsdk.com',\n\t\t\t\trange: [10, 12]\n\t\t\t}]\n\t\t})\n\t});\n\n\tlabel.addEventListener('link', e => {\n\t\tTi.Platform.openURL(e.url);\n\t});\n\n\treturn label;\n}\n\nfunction colorLink(lbl) {\n\tconst attributedString = lbl.attributedString;\n\tconst textColor = 'purple';\n\tconst underlineColor = 'yellow';\n\n\tfor (const attribute of attributedString.attributes) {\n\t\tif (attribute.type === Ti.UI.ATTRIBUTE_LINK) {\n\n\t\t\t// Set new link color.\n\t\t\tattributedString.addAttribute({\n\t\t\t\ttype: Ti.UI.ATTRIBUTE_FOREGROUND_COLOR,\n\t\t\t\tvalue: textColor,\n\t\t\t\trange: attribute.range\n\t\t\t});\n\n\t\t\t// Set new underline color.\n\t\t\tattributedString.addAttribute({\n\t\t\t\ttype: Ti.UI.ATTRIBUTE_UNDERLINE_COLOR,\n\t\t\t\tvalue: underlineColor,\n\t\t\t\trange: attribute.range\n\t\t\t});\n\t\t}\n\t}\n}\n```\n" - } - ], - "methods": [ - { - "name": "addEventListener", - "summary": "Adds the specified callback as an event listener for the named event.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to invoke when the event is fired.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "removeEventListener", - "summary": "Removes the specified callback as an event listener for the named event.", - "description": "Multiple listeners can be registered for the same event, so the\n`callback` parameter is used to determine which listener to remove.\n\nWhen adding a listener, you must save a reference to the callback function\nin order to remove the listener later:\n\n``` js\nvar listener = function() { Ti.API.info(\"Event listener called.\"); }\nwindow.addEventListener('click', listener);\n```\n\nTo remove the listener, pass in a reference to the callback function:\n\n``` js\nwindow.removeEventListener('click', listener);\n```\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "callback", - "summary": "Callback function to remove. Must be the same function passed to `addEventListener`.", - "type": "Callback" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "fireEvent", - "summary": "Fires a synthesized event to any registered listeners.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "name", - "summary": "Name of the event.", - "type": "String" - }, - { - "name": "event", - "summary": "A dictionary of keys and values to add to the object sent to the listeners.", - "type": "Dictionary", - "optional": true - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "applyProperties", - "summary": "Applies the properties to the proxy.", - "description": "Properties are supplied as a dictionary. Each key-value pair in the object is applied to the proxy such that\nmyproxy[key] = value.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "parameters": [ - { - "name": "props", - "summary": "A dictionary of properties to apply.", - "type": "Dictionary" - } - ], - "returns": { - "type": "void" - } - }, - { - "name": "addAttribute", - "summary": "Adds an [attribute](Attribute) with the given name and value to the characters in the specified range.", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "parameters": [ - { - "name": "attribute", - "summary": "An attribute object.", - "type": "Attribute" - } - ], - "returns": { - "type": "void" - } - } - ], - "properties": [ - { - "name": "bubbleParent", - "summary": "Indicates if the proxy will bubble an event to its parent.", - "description": "Some proxies (most commonly views) have a relationship to other proxies, often\nestablished by the add() method. For example, for a button added to a window, a\nclick event on the button would bubble up to the window. Other common parents are\ntable sections to their rows, table views to their sections, and scrollable views\nto their views. Set this property to false to disable the bubbling to the proxy's parent.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "Boolean", - "default": true - }, - { - "name": "apiName", - "summary": "The name of the API that this proxy corresponds to.", - "description": "The value of this property is the fully qualified name of the API. For example, [Button](Titanium.UI.Button)\nreturns `Ti.UI.Button`.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.Proxy", - "type": "String", - "permission": "read-only" - }, - { - "name": "lifecycleContainer", - "summary": "The Window or TabGroup whose Activity lifecycle should be triggered on the proxy.", - "description": "If this property is set to a Window or TabGroup, then the corresponding Activity lifecycle event callbacks\nwill also be called on the proxy. Proxies that require the activity lifecycle will need this property set\nto the appropriate containing Window or TabGroup.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - } - ], - "inherits": "Titanium.Proxy", - "type": [ - "Titanium.UI.Window", - "Titanium.UI.TabGroup" - ] - }, - { - "name": "text", - "summary": "The text applied to the attributed string.\n", - "description": "The `text` property must be set in the constructor and cannot be changed.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "String" - }, - { - "name": "attributes", - "summary": "An array of attributes to add.\n", - "description": "Internally, this calls the [addAttribute](Titanium.UI.AttributedString.addAttribute)\nmethod for each of the attributes passed in.\n", - "platforms": [ - { - "since": "3.6.0", - "name": "android" - }, - { - "since": "3.6.0", - "name": "iphone" - }, - { - "since": "3.6.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "Array" - } - ], - "subtype": "proxy" - }, - "Titanium.UI.Button": { - "name": "Titanium.UI.Button", - "summary": "A button widget that has four states: normal, disabled, focused and selected.\n", - "extends": "Titanium.UI.View", - "platforms": [ - { - "since": "0.8", - "name": "android" - }, - { - "since": "0.8", - "name": "iphone" - }, - { - "since": "0.8", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "type": "object", - "editUrl": "https://github.com/appcelerator/titanium_mobile/edit/master/apidoc/Titanium/UI/Button.yml", - "description": "| Android | iOS |\n| ------- | --- |\n| ![Android](./button_android.png) | ![iOS](./button_ios.png) |\n\nA button displays its selected state while it is being pressed. The focused state is\nonly used on Android devices that have navigation keys or a keyboard, to indicate\nwhich button has input focus.\n\nYou can specify background images for each state, as well as button text and a button\nicon. On iOS, there are button styles which define appearance for each state, even if\nno button images are set.\n\nUse the method or a **`\n```\n\nNote that the `systemButton` property specifies *appearance*, not behavior. For\nexample, to bring up the camera when the user presses the **Camera** button, you must\nadd an event listener to the button and call when the\nbutton is clicked.\n\n##### iOS Pressed Button Effects\n\nIf you do not supply separate background images for the normal and selected states,\niOS supplies a built-in effect for pressed buttons. For most iOS buttons, the effect\ndims the entire button (except for the text) while the button is being pressed.\n\nFor toolbar buttons that use the [PLAIN](Titanium.UI.BUTTON_STYLE_OPTION_NEUTRAL) style\nor use system icons such as [CAMERA](Titanium.UI.iOS.SystemButton.CAMERA), a glow effect is\nused. The glow effect shows as a white circular glow or highlight at the center of the button\nwhen the button is pressed.\n", - "events": [ - { - "name": "click", - "summary": "Fired when the device detects a click against the view.", - "description": "There is a subtle difference between singletap and click events.\n\nA singletap event is generated when the user taps the screen briefly\nwithout moving their finger. This gesture will also generate a click event.\n\nHowever, a click event can also be generated when the user touches,\nmoves their finger, and then removes it from the screen.\n\nOn Android, a click event can also be generated by a trackball click.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "dblclick", - "summary": "Fired when the device detects a double click against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double click passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "doubletap", - "summary": "Fired when the device detects a double tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the double tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "focus", - "summary": "Fired when the view element gains focus.", - "description": "This event only fires when using the trackball to navigate.", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "keypressed", - "summary": "Fired when a hardware key is pressed in the view.", - "description": "A keypressed event is generated by pressing a hardware key. On Android, this event can only be\nfired when the property [focusable](Titanium.UI.View.focusable) is set to true. On iOS the\nevent is generated only when using [Ti.UI.TextArea](Titanium.UI.TextArea), [Ti.UI.TextField](Titanium.UI.TextField)\nand [Ti.UI.SearchBar](Titanium.UI.SearchBar).\n", - "platforms": [ - { - "since": "3.1.0", - "name": "android" - }, - { - "since": "5.4.0", - "name": "iphone" - }, - { - "since": "5.4.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "keyCode", - "summary": "The code for the physical key that was pressed. For more details, see [KeyEvent](https://developer.android.com/reference/android/view/KeyEvent.html). This API is experimental and subject to change.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "longclick", - "summary": "Fired when the device detects a long click.", - "description": "A long click is generated by touching and holding on the touchscreen or holding down the\ntrackball button.\n\nThe event occurs before the finger/button is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nAs the trackball can fire this event, it is not intended to return the `x` and `y`\ncoordinates of the touch, even when it is generated by the touchscreen.\n\nA `longclick` blocks a `click`, meaning that a `click` event will not fire when a\n`longclick` listener exists.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "longpress", - "summary": "Fired when the device detects a long press.", - "description": "A long press is generated by touching and holding on the touchscreen. Unlike a `longclick`,\nit does not respond to the trackball button.\n\nThe event occurs before the finger is lifted.\n\nA `longpress` and a `longclick` can occur together.\n\nIn contrast to a `longclick`, this event returns the `x` and `y` coordinates of the touch.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the long press passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "pinch", - "summary": "Fired when the device detects a pinch gesture.", - "description": "A pinch is a touch and expand or contract\nwith two fingers. The event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "1.8.0", - "name": "android" - }, - { - "since": "1.8.0", - "name": "iphone" - }, - { - "since": "1.8.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "scale", - "summary": "The scale factor relative to the points of the two touches in screen coordinates.", - "type": "Number" - }, - { - "name": "velocity", - "summary": "The velocity of the pinch in scale factor per second.", - "type": "Number" - }, - { - "name": "time", - "summary": "The event time of the current event being processed.", - "type": "Number" - }, - { - "name": "timeDelta", - "summary": "The time difference in milliseconds between the previous accepted scaling event and the\ncurrent scaling event.\n", - "type": "Number" - }, - { - "name": "currentSpan", - "summary": "The average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanX", - "summary": "The average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "currentSpanY", - "summary": "The average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpan", - "summary": "The previous average distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanX", - "summary": "The previous average X distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "previousSpanY", - "summary": "The previous average Y distance between each of the pointers forming the gesture in progress through\nthe focal point.\n", - "type": "Number" - }, - { - "name": "focusX", - "summary": "The X coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "focusY", - "summary": "The Y coordinate of the current gesture's focal point.\n", - "type": "Number" - }, - { - "name": "inProgress", - "summary": "Returns `true` if a scale gesture is in progress, `false` otherwise.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "postlayout", - "summary": "Fired when a layout cycle is finished.", - "description": "This event is fired when the view and its ancestors have been laid out.\nThe [rect](Titanium.UI.View.rect) and [size](Titanium.UI.View.size) values\nshould be usable when this event is fired.\n\nThis event is typically triggered by either changing layout\nproperties or by changing the orientation of the device. Note that changing the\nlayout of child views or ancestors can also trigger a relayout of this view.\n\nNote that altering any properties that affect layout from the `postlayout` callback\nmay result in an endless loop.\n", - "platforms": [ - { - "since": "2.0.0", - "name": "android" - }, - { - "since": "2.0.0", - "name": "iphone" - }, - { - "since": "2.0.0", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View" - }, - { - "name": "rotate", - "summary": "Fired when the device detects a two finger rotation.", - "description": "This event is fired when doing a two finger rotation and returning the angle.\nThe event occurs continuously until a finger is lifted again.\n", - "platforms": [ - { - "since": "12.7.0", - "name": "android" - }, - { - "since": "12.7.0", - "name": "iphone" - }, - { - "since": "12.7.0", - "name": "ipad" - }, - { - "since": "12.7.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "rotate", - "summary": "Rotation in degrees.", - "type": "Number" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "singletap", - "summary": "Fired when the device detects a single tap against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the single tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "swipe", - "summary": "Fired when the device detects a swipe gesture against the view.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "direction", - "summary": "Direction of the swipe--either 'left', 'right', 'up', or 'down'.", - "type": "String" - }, - { - "name": "x", - "summary": "X coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event's endpoint from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the swipe passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchcancel", - "summary": "Fired when a touch event is interrupted by the device.", - "description": "A touchcancel can happen in circumstances such as an incoming call to allow the\nUI to clean up state.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchend", - "summary": "Fired when a touch event is completed.", - "description": "On the Android platform, other gesture events, such as `longpress` or `swipe`, cancel touch\nevents, so this event may not be triggered after a `touchstart` event.\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Penciland are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchmove", - "summary": "Fired as soon as the device detects movement of a touch.", - "description": "Event coordinates are always relative to the view in which the initial touch occurred\n", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchstart", - "summary": "Fired as soon as the device detects a touch gesture.", - "platforms": [ - { - "since": "0.9", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "force", - "summary": "The current force value of the touch event.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later and on some Android devices.\n", - "type": "Number" - }, - { - "name": "size", - "summary": "The current size of the touch area. Note: This property is only available on some Android devices.\n", - "type": "Number" - }, - { - "name": "maximumPossibleForce", - "summary": "Maximum possible value of the force property.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "altitudeAngle", - "summary": "A value which indicates the stylus angle on the screen. If the stylus is perpendicular to the screen or no stylus is\nbeing used, the value will be Pi/2. If the stylus is parallel to the screen, the value will be 0.\nNote: This property is only available for iOS devices that support 3D-Touch and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "timestamp", - "summary": "The time (in seconds) when the touch was used in correlation with the system start up.\nNote: This property is only available for iOS devices that support 3D-Touch and run 9.0 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewX", - "summary": "The x value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "azimuthUnitVectorInViewY", - "summary": "The y value of the unit vector that points in the direction of the azimuth of the stylus.\nNote: This property is only available for iOS devices that support the Apple Pencil and are 9.1 or later.\n", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the touch passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "twofingertap", - "summary": "Fired when the device detects a two-finger tap against the view.", - "platforms": [ - { - "since": "3.0.0", - "name": "android" - }, - { - "since": "0.9", - "name": "iphone" - }, - { - "since": "0.9", - "name": "ipad" - }, - { - "since": "9.2.0", - "name": "macos" - } - ], - "inherits": "Titanium.UI.View", - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Returns `true` if the tap passed through an overlapping window belonging to another app.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - }, - { - "name": "touchfiltered", - "summary": "Fired when the device detects a swipe gesture against the view.", - "description": "If the button's [filterTouchesWhenObscured](Titanium.UI.View.filterTouchesWhenObscured) property\nis set `true`, then this event will be fired if the touch event was discarded because another app's\noverlapping window obscured it.\n\nThis is a security feature to protect an app from \"tapjacking\", where a malicious app can use a\nsystem overlay to intercept touch events in your app or to trick the end-user to tap on UI\nin your app intended for the overlay.\n\nYou can use this event to display an alert dialog explaining why the button's action has been disabled.\nEspecially if the overlapping window is completely invisible.\n", - "platforms": [ - { - "since": "9.3.0", - "name": "android" - } - ], - "properties": [ - { - "name": "x", - "summary": "X coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "y", - "summary": "Y coordinate of the event from the `source` view's coordinate system.", - "type": "Number" - }, - { - "name": "obscured", - "summary": "Always `true` since the touch event passed through another app's overlapping window.", - "type": "Boolean" - }, - { - "name": "source", - "summary": "Source object that fired the event.", - "type": "Object" - }, - { - "name": "type", - "summary": "Name of the event fired.", - "type": "String" - }, - { - "name": "bubbles", - "summary": "True if the event will try to bubble up if possible.", - "type": "Boolean" - }, - { - "name": "cancelBubble", - "summary": "Set to true to stop the event from bubbling.", - "type": "Boolean" - } - ] - } - ], - "examples": [ - { - "description": "Simple Button Example", - "code": "``` js\nvar win = Ti.UI.createWindow();\nvar button = Titanium.UI.createButton({\n title: 'Hello',\n top: 10,\n width: 100,\n height: 50\n});\nbutton.addEventListener('click',function(e)\n{\n Titanium.API.info(\"You clicked the button\");\n});\nwin.add(button);\nwin.open();\n```\n" - }, - { - "description": "Alloy XML Markup", - "code": "Previous example as an Alloy view.\n\nbutton.xml:\n``` xml\n\n \n \n