diff --git a/action-sheet/README.md b/action-sheet/README.md index b724984234..b903f923d3 100644 --- a/action-sheet/README.md +++ b/action-sheet/README.md @@ -5,7 +5,7 @@ The Action Sheet API provides access to native Action Sheets, which come up from ## Install ```bash -npm install @capacitor/action-sheet +npm install @capacitor/action-sheet@latest-7 npx cap sync ``` @@ -50,9 +50,9 @@ const showActions = async () => { -* [`showActions(...)`](#showactions) -* [Interfaces](#interfaces) -* [Enums](#enums) +- [`showActions(...)`](#showactions) +- [Interfaces](#interfaces) +- [Enums](#enums) @@ -76,19 +76,16 @@ to select. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### ShowActionsResult | Prop | Type | Description | Since | | ----------- | ------------------- | -------------------------------------------- | ----- | | **`index`** | number | The index of the clicked option (Zero-based) | 1.0.0 | - #### ShowActionsOptions | Prop | Type | Description | Since | @@ -97,7 +94,6 @@ to select. | **`message`** | string | A message to show under the title. This option is only supported on iOS. | 1.0.0 | | **`options`** | ActionSheetButton[] | Options the user can choose from. | 1.0.0 | - #### ActionSheetButton | Prop | Type | Description | Since | @@ -106,10 +102,8 @@ to select. | **`style`** | ActionSheetButtonStyle | The style of the option This option is only supported on iOS. | 1.0.0 | | **`icon`** | string | Icon for the option (ionicon naming convention) This option is only supported on Web. | 1.0.0 | - ### Enums - #### ActionSheetButtonStyle | Members | Value | Description | Since | diff --git a/app-launcher/README.md b/app-launcher/README.md index f454c550a7..5a0e842ee9 100644 --- a/app-launcher/README.md +++ b/app-launcher/README.md @@ -9,6 +9,7 @@ On Android you can open apps if you know their url scheme or use their public pa **Note:** On [Android 11](https://developer.android.com/about/versions/11/privacy/package-visibility) and newer you have to add the app package names you want to query in the `AndroidManifest.xml` inside the `queries` tag. Example: + ```xml @@ -18,7 +19,7 @@ Example: ## Install ```bash -npm install @capacitor/app-launcher +npm install @capacitor/app-launcher@latest-7 npx cap sync ``` @@ -42,9 +43,9 @@ const openPortfolioPage = async () => { -* [`canOpenUrl(...)`](#canopenurl) -* [`openUrl(...)`](#openurl) -* [Interfaces](#interfaces) +- [`canOpenUrl(...)`](#canopenurl) +- [`openUrl(...)`](#openurl) +- [Interfaces](#interfaces) @@ -76,8 +77,7 @@ appropriate app is installed. To learn more about the key, see **Since:** 1.0.0 --------------------- - +--- ### openUrl(...) @@ -97,33 +97,28 @@ On Android the URL can be a known URLScheme or an app package name. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### CanOpenURLResult | Prop | Type | | ----------- | -------------------- | | **`value`** | boolean | - #### CanOpenURLOptions | Prop | Type | | --------- | ------------------- | | **`url`** | string | - #### OpenURLResult | Prop | Type | | --------------- | -------------------- | | **`completed`** | boolean | - #### OpenURLOptions | Prop | Type | diff --git a/app/README.md b/app/README.md index a90390bf37..a06f42f4b8 100644 --- a/app/README.md +++ b/app/README.md @@ -5,7 +5,7 @@ The App API handles high level App state and events. For example, this API emits ## Install ```bash -npm install @capacitor/app +npm install @capacitor/app@latest-7 npx cap sync ``` @@ -13,7 +13,6 @@ npx cap sync For being able to open the app from a custom scheme you need to register the scheme first. You can do it by editing the [`Info.plist`](https://capacitorjs.com/docs/ios/configuration#configuring-infoplist) file and adding this lines. - ```xml CFBundleURLTypes @@ -52,11 +51,11 @@ App.addListener('appStateChange', ({ isActive }) => { console.log('App state changed. Is active?', isActive); }); -App.addListener('appUrlOpen', data => { +App.addListener('appUrlOpen', (data) => { console.log('App opened with URL:', data); }); -App.addListener('appRestoredResult', data => { +App.addListener('appRestoredResult', (data) => { console.log('Restored state:', data); }); @@ -114,21 +113,21 @@ export default config; -* [`exitApp()`](#exitapp) -* [`getInfo()`](#getinfo) -* [`getState()`](#getstate) -* [`getLaunchUrl()`](#getlaunchurl) -* [`minimizeApp()`](#minimizeapp) -* [`toggleBackButtonHandler(...)`](#togglebackbuttonhandler) -* [`addListener('appStateChange', ...)`](#addlistenerappstatechange-) -* [`addListener('pause', ...)`](#addlistenerpause-) -* [`addListener('resume', ...)`](#addlistenerresume-) -* [`addListener('appUrlOpen', ...)`](#addlistenerappurlopen-) -* [`addListener('appRestoredResult', ...)`](#addlistenerapprestoredresult-) -* [`addListener('backButton', ...)`](#addlistenerbackbutton-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`exitApp()`](#exitapp) +- [`getInfo()`](#getinfo) +- [`getState()`](#getstate) +- [`getLaunchUrl()`](#getlaunchurl) +- [`minimizeApp()`](#minimizeapp) +- [`toggleBackButtonHandler(...)`](#togglebackbuttonhandler) +- [`addListener('appStateChange', ...)`](#addlistenerappstatechange-) +- [`addListener('pause', ...)`](#addlistenerpause-) +- [`addListener('resume', ...)`](#addlistenerresume-) +- [`addListener('appUrlOpen', ...)`](#addlistenerappurlopen-) +- [`addListener('appRestoredResult', ...)`](#addlistenerapprestoredresult-) +- [`addListener('backButton', ...)`](#addlistenerbackbutton-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -148,8 +147,7 @@ Ionic handles this itself so you shouldn't need to call this if using Ionic. **Since:** 1.0.0 --------------------- - +--- ### getInfo() @@ -163,8 +161,7 @@ Return information about the app. **Since:** 1.0.0 --------------------- - +--- ### getState() @@ -178,8 +175,7 @@ Gets the current app state. **Since:** 1.0.0 --------------------- - +--- ### getLaunchUrl() @@ -193,8 +189,7 @@ Get the URL the app was launched with, if any. **Since:** 1.0.0 --------------------- - +--- ### minimizeApp() @@ -208,8 +203,7 @@ Only available for Android. **Since:** 1.1.0 --------------------- - +--- ### toggleBackButtonHandler(...) @@ -227,8 +221,7 @@ Only available for Android. **Since:** 7.1.0 --------------------- - +--- ### addListener('appStateChange', ...) @@ -240,7 +233,7 @@ Listen for changes in the app or the activity states. On iOS it's fired when the native [UIApplication.willResignActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622973-willresignactivenotification) and [UIApplication.didBecomeActiveNotification](https://developer.apple.com/documentation/uikit/uiapplication/1622953-didbecomeactivenotification) events get fired. -On Android it's fired when the Capacitor's Activity [onResume](https://developer.android.com/reference/android/app/Activity#onResume()) and [onStop](https://developer.android.com/reference/android/app/Activity#onStop()) methods gets called. +On Android it's fired when the Capacitor's Activity [onResume]() and [onStop]() methods gets called. On Web it's fired when the document's visibilitychange gets fired. | Param | Type | @@ -252,8 +245,7 @@ On Web it's fired when the document's visibilitychange gets fired. **Since:** 1.0.0 --------------------- - +--- ### addListener('pause', ...) @@ -264,7 +256,7 @@ addListener(eventName: 'pause', listenerFunc: () => void) => Promise) method gets called. On Web it's fired when the document's visibilitychange gets fired and document.hidden is true. | Param | Type | @@ -276,8 +268,7 @@ On Web it's fired when the document's visibilitychange gets fired and document.h **Since:** 4.1.0 --------------------- - +--- ### addListener('resume', ...) @@ -288,7 +279,7 @@ addListener(eventName: 'resume', listenerFunc: () => void) => Promise) method gets called, but only after resume has fired first. On Web it's fired when the document's visibilitychange gets fired and document.hidden is false. @@ -301,8 +292,7 @@ On Web it's fired when the document's visibilitychange gets fired and document.h **Since:** 4.1.0 --------------------- - +--- ### addListener('appUrlOpen', ...) @@ -322,8 +312,7 @@ as URLs your app handles (Universal Links on iOS and App Links on Android) **Since:** 1.0.0 --------------------- - +--- ### addListener('appRestoredResult', ...) @@ -362,8 +351,7 @@ Activities (for example, Camera) to have this event and process handled. **Since:** 1.0.0 --------------------- - +--- ### addListener('backButton', ...) @@ -384,8 +372,7 @@ If you want to close the app, call `App.exitApp()`. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -397,12 +384,10 @@ Remove all native listeners for this plugin **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### AppInfo | Prop | Type | Description | Since | @@ -412,35 +397,30 @@ Remove all native listeners for this plugin | **`build`** | string | The build version. On iOS it's the CFBundleVersion. On Android it's the versionCode. | 1.0.0 | | **`version`** | string | The app version. On iOS it's the CFBundleShortVersionString. On Android it's package's versionName. | 1.0.0 | - #### AppState | Prop | Type | Description | Since | | -------------- | -------------------- | --------------------------------- | ----- | | **`isActive`** | boolean | Whether the app is active or not. | 1.0.0 | - #### AppLaunchUrl | Prop | Type | Description | Since | | --------- | ------------------- | ----------------------------- | ----- | | **`url`** | string | The url used to open the app. | 1.0.0 | - #### ToggleBackButtonHandlerOptions | Prop | Type | Description | Since | | ------------- | -------------------- | -------------------------------------------------------------------- | ----- | | **`enabled`** | boolean | Indicates whether to enable or disable default back button handling. | 7.1.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### URLOpenListenerEvent | Prop | Type | Description | Since | @@ -449,7 +429,6 @@ Remove all native listeners for this plugin | **`iosSourceApplication`** | any | The source application opening the app (iOS only) https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623128-sourceapplication | 1.0.0 | | **`iosOpenInPlace`** | boolean | Whether the app should open the passed document in-place or must copy it first. https://developer.apple.com/documentation/uikit/uiapplicationopenurloptionskey/1623123-openinplace | 1.0.0 | - #### RestoredListenerEvent | Prop | Type | Description | Since | @@ -460,34 +439,36 @@ Remove all native listeners for this plugin | **`success`** | boolean | Boolean indicating if the plugin call succeeded. | 1.0.0 | | **`error`** | { message: string; } | If the plugin call didn't succeed, it will contain the error message. | 1.0.0 | - #### BackButtonListenerEvent | Prop | Type | Description | Since | | --------------- | -------------------- | --------------------------------------------------------------------------------------------------------- | ----- | | **`canGoBack`** | boolean | Indicates whether the browser can go back in history. False when the history stack is on the first entry. | 1.0.0 | - ### Type Aliases - #### StateChangeListener -(state: AppState): void - + + (state: AppState): void + #### URLOpenListener -(event: URLOpenListenerEvent): void - + + (event: URLOpenListenerEvent): void + #### RestoredListener -(event: RestoredListenerEvent): void - + + (event: RestoredListenerEvent): void + #### BackButtonListener -(event: BackButtonListenerEvent): void + + (event: BackButtonListenerEvent): void + diff --git a/browser/README.md b/browser/README.md index ac7553a679..58a9665877 100644 --- a/browser/README.md +++ b/browser/README.md @@ -7,7 +7,7 @@ On iOS, this uses `SFSafariViewController` and is compliant with leading OAuth s ## Install ```bash -npm install @capacitor/browser +npm install @capacitor/browser@latest-7 npx cap sync ``` @@ -33,12 +33,12 @@ const openCapacitorSite = async () => { -* [`open(...)`](#open) -* [`close()`](#close) -* [`addListener('browserFinished', ...)`](#addlistenerbrowserfinished-) -* [`addListener('browserPageLoaded', ...)`](#addlistenerbrowserpageloaded-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) +- [`open(...)`](#open) +- [`close()`](#close) +- [`addListener('browserFinished', ...)`](#addlistenerbrowserfinished-) +- [`addListener('browserPageLoaded', ...)`](#addlistenerbrowserpageloaded-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) @@ -59,8 +59,7 @@ Open a page with the specified options. **Since:** 1.0.0 --------------------- - +--- ### close() @@ -74,8 +73,7 @@ No-op on other platforms. **Since:** 1.0.0 --------------------- - +--- ### addListener('browserFinished', ...) @@ -95,8 +93,7 @@ It fires when the Browser is closed by the user. **Since:** 1.0.0 --------------------- - +--- ### addListener('browserPageLoaded', ...) @@ -117,8 +114,7 @@ It is not invoked for any subsequent page loads. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -130,25 +126,22 @@ Remove all native listeners for this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### OpenOptions Represents the options passed to `open`. -| Prop | Type | Description | Since | -| ----------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ----- | -| **`url`** | string | The URL to which the browser is opened. | 1.0.0 | -| **`windowName`** | string | Web only: Optional target for browser open. Follows the `target` property for window.open. Defaults to _blank. Ignored on other platforms. | 1.0.0 | -| **`toolbarColor`** | string | A hex color to which the toolbar color is set. | 1.0.0 | -| **`presentationStyle`** | 'fullscreen' \| 'popover' | iOS only: The presentation style of the browser. Defaults to fullscreen. Ignored on other platforms. | 1.0.0 | -| **`width`** | number | iOS only: The width the browser when using presentationStyle 'popover' on iPads. Ignored on other platforms. | 4.0.0 | -| **`height`** | number | iOS only: The height the browser when using presentationStyle 'popover' on iPads. Ignored on other platforms. | 4.0.0 | - +| Prop | Type | Description | Since | +| ----------------------- | -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ----- | +| **`url`** | string | The URL to which the browser is opened. | 1.0.0 | +| **`windowName`** | string | Web only: Optional target for browser open. Follows the `target` property for window.open. Defaults to \_blank. Ignored on other platforms. | 1.0.0 | +| **`toolbarColor`** | string | A hex color to which the toolbar color is set. | 1.0.0 | +| **`presentationStyle`** | 'fullscreen' \| 'popover' | iOS only: The presentation style of the browser. Defaults to fullscreen. Ignored on other platforms. | 1.0.0 | +| **`width`** | number | iOS only: The width the browser when using presentationStyle 'popover' on iPads. Ignored on other platforms. | 4.0.0 | +| **`height`** | number | iOS only: The height the browser when using presentationStyle 'popover' on iPads. Ignored on other platforms. | 4.0.0 | #### PluginListenerHandle diff --git a/camera/README.md b/camera/README.md index 9ad234eeec..fc14e76975 100644 --- a/camera/README.md +++ b/camera/README.md @@ -5,7 +5,7 @@ The Camera API provides the ability to take a photo with the camera or choose an ## Install ```bash -npm install @capacitor/camera +npm install @capacitor/camera@latest-7 npx cap sync ``` @@ -84,7 +84,7 @@ const takePicture = async () => { const image = await Camera.getPhoto({ quality: 90, allowEditing: true, - resultType: CameraResultType.Uri + resultType: CameraResultType.Uri, }); // image.webPath will contain a path that can be set as an image src. @@ -102,15 +102,15 @@ const takePicture = async () => { -* [`getPhoto(...)`](#getphoto) -* [`pickImages(...)`](#pickimages) -* [`pickLimitedLibraryPhotos()`](#picklimitedlibraryphotos) -* [`getLimitedLibraryPhotos()`](#getlimitedlibraryphotos) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions(...)`](#requestpermissions) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) -* [Enums](#enums) +- [`getPhoto(...)`](#getphoto) +- [`pickImages(...)`](#pickimages) +- [`pickLimitedLibraryPhotos()`](#picklimitedlibraryphotos) +- [`getLimitedLibraryPhotos()`](#getlimitedlibraryphotos) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions(...)`](#requestpermissions) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) +- [Enums](#enums) @@ -134,8 +134,7 @@ with the camera. **Since:** 1.0.0 --------------------- - +--- ### pickImages(...) @@ -154,8 +153,7 @@ On iOS 13 and older it only allows to pick one picture. **Since:** 1.2.0 --------------------- - +--- ### pickLimitedLibraryPhotos() @@ -171,8 +169,7 @@ On iOS 14 or if the user gave full access to the photos it returns an empty arra **Since:** 4.1.0 --------------------- - +--- ### getLimitedLibraryPhotos() @@ -186,8 +183,7 @@ iOS 14+ Only: Return an array of photos selected from the limited photo library. **Since:** 4.1.0 --------------------- - +--- ### checkPermissions() @@ -201,8 +197,7 @@ Check camera and photo album permissions **Since:** 1.0.0 --------------------- - +--- ### requestPermissions(...) @@ -220,12 +215,10 @@ Request camera and photo album permissions **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### Photo | Prop | Type | Description | Since | @@ -238,7 +231,6 @@ Request camera and photo album permissions | **`format`** | string | The format of the image, ex: jpeg, png, gif. iOS and Android only support jpeg. Web supports jpeg, png and gif, but the exact availability may vary depending on the browser. gif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`. | 1.0.0 | | **`saved`** | boolean | Whether if the image was saved to the gallery or not. On Android and iOS, saving to the gallery can fail if the user didn't grant the required permissions. On Web there is no gallery, so always returns false. | 1.1.0 | - #### ImageOptions | Prop | Type | Description | Default | Since | @@ -259,14 +251,12 @@ Request camera and photo album permissions | **`promptLabelPhoto`** | string | Text value to use when displaying the prompt. The label of the button to select a saved image. | : 'From Photos' | 1.0.0 | | **`promptLabelPicture`** | string | Text value to use when displaying the prompt. The label of the button to open the camera. | : 'Take Picture' | 1.0.0 | - #### GalleryPhotos | Prop | Type | Description | Since | | ------------ | --------------------------- | ------------------------------- | ----- | | **`photos`** | GalleryPhoto[] | Array of all the picked photos. | 1.2.0 | - #### GalleryPhoto | Prop | Type | Description | Since | @@ -276,7 +266,6 @@ Request camera and photo album permissions | **`exif`** | any | Exif data, if any, retrieved from the image | 1.2.0 | | **`format`** | string | The format of the image, ex: jpeg, png, gif. iOS and Android only support jpeg. Web supports jpeg, png and gif. | 1.2.0 | - #### GalleryImageOptions | Prop | Type | Description | Default | Since | @@ -288,7 +277,6 @@ Request camera and photo album permissions | **`presentationStyle`** | 'fullscreen' \| 'popover' | iOS only: The presentation style of the Camera. | : 'fullscreen' | 1.2.0 | | **`limit`** | number | Maximum number of pictures the user will be able to choose. Note: This option is only supported on Android 13+ and iOS. | 0 (unlimited) | 1.2.0 | - #### PermissionStatus | Prop | Type | @@ -296,35 +284,30 @@ Request camera and photo album permissions | **`camera`** | CameraPermissionState | | **`photos`** | CameraPermissionState | - #### CameraPluginPermissions | Prop | Type | | ----------------- | ----------------------------------- | | **`permissions`** | CameraPermissionType[] | - ### Type Aliases - #### CameraPermissionState -PermissionState | 'limited' - + + PermissionState | 'limited' + #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' - #### CameraPermissionType 'camera' | 'photos' - ### Enums - #### CameraResultType | Members | Value | @@ -333,7 +316,6 @@ Request camera and photo album permissions | **`Base64`** | 'base64' | | **`DataUrl`** | 'dataUrl' | - #### CameraSource | Members | Value | Description | @@ -342,7 +324,6 @@ Request camera and photo album permissions | **`Camera`** | 'CAMERA' | Take a new photo using the camera. | | **`Photos`** | 'PHOTOS' | Pick an existing photo from the gallery or photo album. | - #### CameraDirection | Members | Value | diff --git a/clipboard/README.md b/clipboard/README.md index 136ffda243..41082d3000 100644 --- a/clipboard/README.md +++ b/clipboard/README.md @@ -5,7 +5,7 @@ The Clipboard API enables copy and pasting to/from the system clipboard. ## Install ```bash -npm install @capacitor/clipboard +npm install @capacitor/clipboard@latest-7 npx cap sync ``` @@ -16,7 +16,7 @@ import { Clipboard } from '@capacitor/clipboard'; const writeToClipboard = async () => { await Clipboard.write({ - string: "Hello World!" + string: 'Hello World!', }); }; @@ -31,9 +31,9 @@ const checkClipboard = async () => { -* [`write(...)`](#write) -* [`read()`](#read) -* [Interfaces](#interfaces) +- [`write(...)`](#write) +- [`read()`](#read) +- [Interfaces](#interfaces) @@ -54,8 +54,7 @@ Write a value to the clipboard (the "copy" action) **Since:** 1.0.0 --------------------- - +--- ### read() @@ -69,12 +68,10 @@ Read a value from the clipboard (the "paste" action) **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### WriteOptions Represents the data to be written to the clipboard. @@ -86,7 +83,6 @@ Represents the data to be written to the clipboard. | **`url`** | string | URL string to copy. | 1.0.0 | | **`label`** | string | User visible label to accompany the copied data (Android Only). | 1.0.0 | - #### ReadResult Represents the data read from the clipboard. diff --git a/device/README.md b/device/README.md index 39b6c154ff..869557ce69 100644 --- a/device/README.md +++ b/device/README.md @@ -5,7 +5,7 @@ The Device API exposes internal information about the device, such as the model ## Install ```bash -npm install @capacitor/device +npm install @capacitor/device@latest-7 npx cap sync ``` @@ -31,13 +31,13 @@ const logBatteryInfo = async () => { -* [`getId()`](#getid) -* [`getInfo()`](#getinfo) -* [`getBatteryInfo()`](#getbatteryinfo) -* [`getLanguageCode()`](#getlanguagecode) -* [`getLanguageTag()`](#getlanguagetag) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`getId()`](#getid) +- [`getInfo()`](#getinfo) +- [`getBatteryInfo()`](#getbatteryinfo) +- [`getLanguageCode()`](#getlanguagecode) +- [`getLanguageTag()`](#getlanguagetag) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -56,8 +56,7 @@ Return an unique identifier for the device. **Since:** 1.0.0 --------------------- - +--- ### getInfo() @@ -71,8 +70,7 @@ Return information about the underlying device/os/platform. **Since:** 1.0.0 --------------------- - +--- ### getBatteryInfo() @@ -86,8 +84,7 @@ Return information about the battery. **Since:** 1.0.0 --------------------- - +--- ### getLanguageCode() @@ -101,8 +98,7 @@ Get the device's current language locale code. **Since:** 1.0.0 --------------------- - +--- ### getLanguageTag() @@ -116,18 +112,15 @@ Get the device's current language locale tag. **Since:** 4.0.0 --------------------- - +--- ### Interfaces - #### DeviceId | Prop | Type | Description | Since | | ---------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, __the identifier is a 64-bit number (expressed as a hexadecimal string)__, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | - +| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, **the identifier is a 64-bit number (expressed as a hexadecimal string)**, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | #### DeviceInfo @@ -145,7 +138,6 @@ Get the device's current language locale tag. | **`memUsed`** | number | Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used. | 1.0.0 | | **`webViewVersion`** | string | The web view browser version | 1.0.0 | - #### BatteryInfo | Prop | Type | Description | Since | @@ -153,24 +145,20 @@ Get the device's current language locale tag. | **`batteryLevel`** | number | A percentage (0 to 1) indicating how much the battery is charged. | 1.0.0 | | **`isCharging`** | boolean | Whether the device is charging. | 1.0.0 | - #### GetLanguageCodeResult | Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------- | ----- | | **`value`** | string | Two character language code. | 1.0.0 | - #### LanguageTag | Prop | Type | Description | Since | | ----------- | ------------------- | ----------------------------------------------- | ----- | | **`value`** | string | Returns a well-formed IETF BCP 47 language tag. | 4.0.0 | - ### Type Aliases - #### OperatingSystem 'ios' | 'android' | 'windows' | 'mac' | 'unknown' diff --git a/dialog/README.md b/dialog/README.md index 49a1b30353..42c87cb0b8 100644 --- a/dialog/README.md +++ b/dialog/README.md @@ -5,7 +5,7 @@ The Dialog API provides methods for triggering native dialog windows for alerts, ## Install ```bash -npm install @capacitor/dialog +npm install @capacitor/dialog@latest-7 npx cap sync ``` @@ -45,10 +45,10 @@ const showPrompt = async () => { -* [`alert(...)`](#alert) -* [`prompt(...)`](#prompt) -* [`confirm(...)`](#confirm) -* [Interfaces](#interfaces) +- [`alert(...)`](#alert) +- [`prompt(...)`](#prompt) +- [`confirm(...)`](#confirm) +- [Interfaces](#interfaces) @@ -69,8 +69,7 @@ Show an alert dialog **Since:** 1.0.0 --------------------- - +--- ### prompt(...) @@ -88,8 +87,7 @@ Show a prompt dialog **Since:** 1.0.0 --------------------- - +--- ### confirm(...) @@ -107,12 +105,10 @@ Show a confirmation dialog **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### AlertOptions | Prop | Type | Description | Default | Since | @@ -121,7 +117,6 @@ Show a confirmation dialog | **`message`** | string | Message to show on the dialog. | | 1.0.0 | | **`buttonTitle`** | string | Text to use on the action button. | "OK" | 1.0.0 | - #### PromptResult | Prop | Type | Description | Since | @@ -129,7 +124,6 @@ Show a confirmation dialog | **`value`** | string | Text entered on the prompt. | 1.0.0 | | **`cancelled`** | boolean | Whether if the prompt was canceled or accepted. | 1.0.0 | - #### PromptOptions | Prop | Type | Description | Default | Since | @@ -141,14 +135,12 @@ Show a confirmation dialog | **`inputPlaceholder`** | string | Placeholder text for hints. | | 1.0.0 | | **`inputText`** | string | Prepopulated text. | | 1.0.0 | - #### ConfirmResult | Prop | Type | Description | Since | | ----------- | -------------------- | --------------------------------------------------------- | ----- | | **`value`** | boolean | true if the positive button was clicked, false otherwise. | 1.0.0 | - #### ConfirmOptions | Prop | Type | Description | Default | Since | diff --git a/filesystem/README.md b/filesystem/README.md index 13912b2e3e..5f47daf9fc 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -11,7 +11,7 @@ The Filesystem API provides a NodeJS-like API for working with files on the devi ## Install ```bash -npm install @capacitor/filesystem +npm install @capacitor/filesystem@latest-7 npx cap sync ``` @@ -55,7 +55,7 @@ As of version 7.1.0, the `downloadFile` functionality in the Filesystem plugin h ### Installing the File Transfer plugin ```bash -npm install @capacitor/file-transfer +npm install @capacitor/file-transfer@latest-7 npx cap sync ``` @@ -70,7 +70,7 @@ await Filesystem.downloadFile({ url: 'https://example.com/file.pdf', path: 'downloaded-file.pdf', directory: Directory.Documents, - progress: true + progress: true, }); // Progress events @@ -88,14 +88,14 @@ import { Filesystem, Directory } from '@capacitor/filesystem'; // First get the full file path using Filesystem const fileInfo = await Filesystem.getUri({ directory: Directory.Documents, - path: 'downloaded-file.pdf' + path: 'downloaded-file.pdf', }); // Then use the FileTransfer plugin to download await FileTransfer.downloadFile({ url: 'https://example.com/file.pdf', path: fileInfo.uri, - progress: true + progress: true, }); // Progress events @@ -183,25 +183,25 @@ const readFilePath = async () => { -* [`readFile(...)`](#readfile) -* [`writeFile(...)`](#writefile) -* [`appendFile(...)`](#appendfile) -* [`deleteFile(...)`](#deletefile) -* [`mkdir(...)`](#mkdir) -* [`rmdir(...)`](#rmdir) -* [`readdir(...)`](#readdir) -* [`getUri(...)`](#geturi) -* [`stat(...)`](#stat) -* [`rename(...)`](#rename) -* [`copy(...)`](#copy) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions()`](#requestpermissions) -* [`downloadFile(...)`](#downloadfile) -* [`addListener('progress', ...)`](#addlistenerprogress-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) -* [Enums](#enums) +- [`readFile(...)`](#readfile) +- [`writeFile(...)`](#writefile) +- [`appendFile(...)`](#appendfile) +- [`deleteFile(...)`](#deletefile) +- [`mkdir(...)`](#mkdir) +- [`rmdir(...)`](#rmdir) +- [`readdir(...)`](#readdir) +- [`getUri(...)`](#geturi) +- [`stat(...)`](#stat) +- [`rename(...)`](#rename) +- [`copy(...)`](#copy) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions()`](#requestpermissions) +- [`downloadFile(...)`](#downloadfile) +- [`addListener('progress', ...)`](#addlistenerprogress-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) +- [Enums](#enums) @@ -224,8 +224,7 @@ Read a file from disk **Since:** 1.0.0 --------------------- - +--- ### writeFile(...) @@ -243,8 +242,7 @@ Write a file to disk in the specified location on device **Since:** 1.0.0 --------------------- - +--- ### appendFile(...) @@ -260,8 +258,7 @@ Append to a file on disk in the specified location on device **Since:** 1.0.0 --------------------- - +--- ### deleteFile(...) @@ -277,8 +274,7 @@ Delete a file from disk **Since:** 1.0.0 --------------------- - +--- ### mkdir(...) @@ -294,8 +290,7 @@ Create a directory. **Since:** 1.0.0 --------------------- - +--- ### rmdir(...) @@ -311,8 +306,7 @@ Remove a directory **Since:** 1.0.0 --------------------- - +--- ### readdir(...) @@ -330,8 +324,7 @@ Return a list of files from the directory (not recursive) **Since:** 1.0.0 --------------------- - +--- ### getUri(...) @@ -349,8 +342,7 @@ Return full File URI for a path and directory **Since:** 1.0.0 --------------------- - +--- ### stat(...) @@ -368,8 +360,7 @@ Return data about a file **Since:** 1.0.0 --------------------- - +--- ### rename(...) @@ -385,8 +376,7 @@ Rename a file or directory **Since:** 1.0.0 --------------------- - +--- ### copy(...) @@ -404,8 +394,7 @@ Copy a file or directory **Since:** 1.0.0 --------------------- - +--- ### checkPermissions() @@ -421,8 +410,7 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 --------------------- - +--- ### requestPermissions() @@ -438,8 +426,7 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 --------------------- - +--- ### downloadFile(...) @@ -457,8 +444,7 @@ Perform a http request to a server and download the file to the specified destin **Since:** 5.1.0 --------------------- - +--- ### addListener('progress', ...) @@ -477,8 +463,7 @@ Add a listener to file download progress events. **Since:** 5.1.0 --------------------- - +--- ### removeAllListeners() @@ -490,19 +475,16 @@ Remove all listeners for this plugin. **Since:** 5.2.0 --------------------- - +--- ### Interfaces - #### ReadFileResult | Prop | Type | Description | Since | | ---------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`data`** | string \| Blob | The representation of the data contained in the file Note: Blob is only available on Web. On native, the data is returned as a string. | 1.0.0 | - #### ReadFileOptions | Prop | Type | Description | Since | @@ -511,14 +493,12 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to read the file from | 1.0.0 | | **`encoding`** | Encoding | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass Encoding.UTF8 to read data as string | 1.0.0 | - #### WriteFileResult | Prop | Type | Description | Since | | --------- | ------------------- | --------------------------------------- | ----- | | **`uri`** | string | The uri where the file was written into | 1.0.0 | - #### WriteFileOptions | Prop | Type | Description | Default | Since | @@ -529,7 +509,6 @@ Remove all listeners for this plugin. | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 1.0.0 | - #### AppendFileOptions | Prop | Type | Description | Since | @@ -539,7 +518,6 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to store the file in | 1.0.0 | | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | 1.0.0 | - #### DeleteFileOptions | Prop | Type | Description | Since | @@ -547,7 +525,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to delete | 1.0.0 | | **`directory`** | Directory | The `Directory` to delete the file from | 1.0.0 | - #### MkdirOptions | Prop | Type | Description | Default | Since | @@ -556,7 +533,6 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to make the new directory in | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories as well. | false | 1.0.0 | - #### RmdirOptions | Prop | Type | Description | Default | Since | @@ -565,14 +541,12 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to remove the directory from | | 1.0.0 | | **`recursive`** | boolean | Whether to recursively remove the contents of the directory | false | 1.0.0 | - #### ReaddirResult | Prop | Type | Description | Since | | ----------- | ----------------------- | -------------------------------------------------- | ----- | | **`files`** | FileInfo[] | List of files and directories inside the directory | 1.0.0 | - #### FileInfo | Prop | Type | Description | Since | @@ -584,7 +558,6 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 4.0.0 | | **`uri`** | string | The uri of the file. | 4.0.0 | - #### ReaddirOptions | Prop | Type | Description | Since | @@ -592,14 +565,12 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the directory to read | 1.0.0 | | **`directory`** | Directory | The `Directory` to list files from | 1.0.0 | - #### GetUriResult | Prop | Type | Description | Since | | --------- | ------------------- | ------------------- | ----- | | **`uri`** | string | The uri of the file | 1.0.0 | - #### GetUriOptions | Prop | Type | Description | Since | @@ -607,7 +578,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get the URI for | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | - #### StatResult | Prop | Type | Description | Since | @@ -618,7 +588,6 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 1.0.0 | | **`uri`** | string | The uri of the file | 1.0.0 | - #### StatOptions | Prop | Type | Description | Since | @@ -626,7 +595,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get data about | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | - #### CopyOptions | Prop | Type | Description | Since | @@ -636,21 +604,18 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` containing the existing file or directory | 1.0.0 | | **`toDirectory`** | Directory | The `Directory` containing the destination file or directory. If not supplied will use the 'directory' parameter as the destination | 1.0.0 | - #### CopyResult | Prop | Type | Description | Since | | --------- | ------------------- | -------------------------------------- | ----- | | **`uri`** | string | The uri where the file was copied into | 4.0.0 | - #### PermissionStatus | Prop | Type | | ------------------- | ----------------------------------------------------------- | | **`publicStorage`** | PermissionState | - #### DownloadFileResult | Prop | Type | Description | Since | @@ -658,7 +623,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path the file was downloaded to. | 5.1.0 | | **`blob`** | Blob | The blob data of the downloaded file. This is only available on web. | 5.1.0 | - #### DownloadFileOptions | Prop | Type | Description | Default | Since | @@ -668,14 +632,12 @@ Remove all listeners for this plugin. | **`progress`** | boolean | An optional listener function to receive downloaded progress events. If this option is used, progress event should be dispatched on every chunk received. Chunks are throttled to every 100ms on Android/iOS to avoid slowdowns. | | 5.1.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 5.1.2 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### ProgressStatus | Prop | Type | Description | Since | @@ -684,30 +646,28 @@ Remove all listeners for this plugin. | **`bytes`** | number | The number of bytes downloaded so far. | 5.1.0 | | **`contentLength`** | number | The total number of bytes to download for this file. | 5.1.0 | - ### Type Aliases - #### RenameOptions -CopyOptions - + + CopyOptions + #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' - #### ProgressListener A listener function that receives progress events. -(progress: ProgressStatus): void - + + (progress: ProgressStatus): void + ### Enums - #### Directory | Members | Value | Description | Since | @@ -719,7 +679,6 @@ A listener function that receives progress events. | **`External`** | 'EXTERNAL' | The external directory. On iOS it will use the Documents directory. On Android it's the directory on the primary shared/external storage device where the application can place persistent files it owns. These files are internal to the applications, and not typically visible to the user as media. Files will be deleted when the application is uninstalled. | 1.0.0 | | **`ExternalStorage`** | 'EXTERNAL_STORAGE' | The external storage directory. On iOS it will use the Documents directory. On Android it's the primary shared/external storage directory. It's not accesible on Android 10 unless the app enables legacy External Storage by adding `android:requestLegacyExternalStorage="true"` in the `application` tag in the `AndroidManifest.xml`. It's not accesible on Android 11 or newer. | 1.0.0 | - #### Encoding | Members | Value | Description | Since | diff --git a/geolocation/README.md b/geolocation/README.md index af449ddadf..ad2bb8b9d9 100644 --- a/geolocation/README.md +++ b/geolocation/README.md @@ -11,7 +11,7 @@ The Geolocation API provides simple methods for getting and tracking the current ## Install ```bash -npm install @capacitor/geolocation +npm install @capacitor/geolocation@latest-7 npx cap sync ``` @@ -60,13 +60,13 @@ const printCurrentPosition = async () => { -* [`getCurrentPosition(...)`](#getcurrentposition) -* [`watchPosition(...)`](#watchposition) -* [`clearWatch(...)`](#clearwatch) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions(...)`](#requestpermissions) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`getCurrentPosition(...)`](#getcurrentposition) +- [`watchPosition(...)`](#watchposition) +- [`clearWatch(...)`](#clearwatch) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions(...)`](#requestpermissions) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -89,8 +89,7 @@ Get the current GPS location of the device **Since:** 1.0.0 --------------------- - +--- ### watchPosition(...) @@ -110,8 +109,7 @@ can consume a large amount of energy. Be smart about listening only when you nee **Since:** 1.0.0 --------------------- - +--- ### clearWatch(...) @@ -127,8 +125,7 @@ Clear a given watch **Since:** 1.0.0 --------------------- - +--- ### checkPermissions() @@ -136,14 +133,13 @@ Clear a given watch checkPermissions() => Promise ``` -Check location permissions. Will throw if system location services are disabled. +Check location permissions. Will throw if system location services are disabled. **Returns:** Promise<PermissionStatus> **Since:** 1.0.0 --------------------- - +--- ### requestPermissions(...) @@ -151,7 +147,7 @@ Check location permissions. Will throw if system location services are disabled requestPermissions(permissions?: GeolocationPluginPermissions | undefined) => Promise ``` -Request location permissions. Will throw if system location services are disabled. +Request location permissions. Will throw if system location services are disabled. | Param | Type | | ----------------- | ------------------------------------------------------------------------------------- | @@ -161,12 +157,10 @@ Request location permissions. Will throw if system location services are disabl **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### Position | Prop | Type | Description | Since | @@ -174,7 +168,6 @@ Request location permissions. Will throw if system location services are disabl | **`timestamp`** | number | Creation timestamp for coords | 1.0.0 | | **`coords`** | { latitude: number; longitude: number; accuracy: number; altitudeAccuracy: number \| null; altitude: number \| null; speed: number \| null; heading: number \| null; } | The GPS coordinates along with the accuracy of the data | 1.0.0 | - #### PositionOptions | Prop | Type | Description | Default | Since | @@ -184,14 +177,12 @@ Request location permissions. Will throw if system location services are disabl | **`maximumAge`** | number | The maximum age in milliseconds of a possible cached position that is acceptable to return | 0 | 1.0.0 | | **`minimumUpdateInterval`** | number | The minumum update interval for location updates. If location updates are available faster than this interval then an update will only occur if the minimum update interval has expired since the last location update. This parameter is only available for Android. It has no effect on iOS or Web platforms. | 5000 | 6.1.0 | - #### ClearWatchOptions | Prop | Type | | -------- | ------------------------------------------------- | | **`id`** | CallbackID | - #### PermissionStatus | Prop | Type | Description | Since | @@ -199,32 +190,28 @@ Request location permissions. Will throw if system location services are disabl | **`location`** | PermissionState | Permission state for location alias. On Android it requests/checks both ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION permissions. On iOS and web it requests/checks location permission. | 1.0.0 | | **`coarseLocation`** | PermissionState | Permission state for coarseLocation alias. On Android it requests/checks ACCESS_COARSE_LOCATION. On Android 12+, users can choose between Approximate location (ACCESS_COARSE_LOCATION) or Precise location (ACCESS_FINE_LOCATION), so this alias can be used if the app doesn't need high accuracy. On iOS and web it will have the same value as location alias. | 1.2.0 | - #### GeolocationPluginPermissions | Prop | Type | | ----------------- | ---------------------------------------- | | **`permissions`** | GeolocationPermissionType[] | - ### Type Aliases - #### WatchPositionCallback -(position: Position | null, err?: any): void - + + (position: Position | null, err?: any): void + #### CallbackID string - #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' - #### GeolocationPermissionType 'location' | 'coarseLocation' diff --git a/haptics/README.md b/haptics/README.md index fa9ffb729d..be7edbec8c 100644 --- a/haptics/README.md +++ b/haptics/README.md @@ -7,7 +7,7 @@ On devices that don't have Taptic Engine or Vibrator, the API calls will resolve ## Install ```bash -npm install @capacitor/haptics +npm install @capacitor/haptics@latest-7 npx cap sync ``` @@ -45,14 +45,14 @@ const hapticsSelectionEnd = async () => { -* [`impact(...)`](#impact) -* [`notification(...)`](#notification) -* [`vibrate(...)`](#vibrate) -* [`selectionStart()`](#selectionstart) -* [`selectionChanged()`](#selectionchanged) -* [`selectionEnd()`](#selectionend) -* [Interfaces](#interfaces) -* [Enums](#enums) +- [`impact(...)`](#impact) +- [`notification(...)`](#notification) +- [`vibrate(...)`](#vibrate) +- [`selectionStart()`](#selectionstart) +- [`selectionChanged()`](#selectionchanged) +- [`selectionEnd()`](#selectionend) +- [Interfaces](#interfaces) +- [Enums](#enums) @@ -73,8 +73,7 @@ Trigger a haptics "impact" feedback **Since:** 1.0.0 --------------------- - +--- ### notification(...) @@ -90,8 +89,7 @@ Trigger a haptics "notification" feedback **Since:** 1.0.0 --------------------- - +--- ### vibrate(...) @@ -107,8 +105,7 @@ Vibrate the device **Since:** 1.0.0 --------------------- - +--- ### selectionStart() @@ -120,8 +117,7 @@ Trigger a selection started haptic hint **Since:** 1.0.0 --------------------- - +--- ### selectionChanged() @@ -135,8 +131,7 @@ feedback **Since:** 1.0.0 --------------------- - +--- ### selectionEnd() @@ -149,36 +144,30 @@ For example, call this when a user has lifted their finger from a control **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### ImpactOptions | Prop | Type | Description | Default | Since | | ----------- | --------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------ | ----- | | **`style`** | ImpactStyle | Impact Feedback Style The mass of the objects in the collision simulated by a [UIImpactFeedbackGenerator](https://developer.apple.com/documentation/uikit/uiimpactfeedbackstyle) object. | ImpactStyle.Heavy | 1.0.0 | - #### NotificationOptions | Prop | Type | Description | Default | Since | | ---------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- | ----- | | **`type`** | NotificationType | Notification Feedback Type The type of notification feedback generated by a [UINotificationFeedbackGenerator](https://developer.apple.com/documentation/uikit/uinotificationfeedbacktype) object. | NotificationType.SUCCESS | 1.0.0 | - #### VibrateOptions | Prop | Type | Description | Default | Since | | -------------- | ------------------- | ------------------------------------------ | ---------------- | ----- | | **`duration`** | number | Duration of the vibration in milliseconds. | 300 | 1.0.0 | - ### Enums - #### ImpactStyle | Members | Value | Description | Since | @@ -187,7 +176,6 @@ For example, call this when a user has lifted their finger from a control | **`Medium`** | 'MEDIUM' | A collision between moderately sized user interface elements | 1.0.0 | | **`Light`** | 'LIGHT' | A collision between small, light user interface elements | 1.0.0 | - #### NotificationType | Members | Value | Description | Since | diff --git a/keyboard/README.md b/keyboard/README.md index d359bdde70..c79304c243 100644 --- a/keyboard/README.md +++ b/keyboard/README.md @@ -5,7 +5,7 @@ The Keyboard API provides keyboard display and visibility control, along with ev ## Install ```bash -npm install @capacitor/keyboard +npm install @capacitor/keyboard@latest-7 npx cap sync ``` @@ -14,11 +14,11 @@ npx cap sync ```typescript import { Keyboard } from '@capacitor/keyboard'; -Keyboard.addListener('keyboardWillShow', info => { +Keyboard.addListener('keyboardWillShow', (info) => { console.log('keyboard will show with height:', info.keyboardHeight); }); -Keyboard.addListener('keyboardDidShow', info => { +Keyboard.addListener('keyboardDidShow', (info) => { console.log('keyboard did show with height:', info.keyboardHeight); }); @@ -93,20 +93,20 @@ the following events also work with `window.addEventListener`: -* [`show()`](#show) -* [`hide()`](#hide) -* [`setAccessoryBarVisible(...)`](#setaccessorybarvisible) -* [`setScroll(...)`](#setscroll) -* [`setStyle(...)`](#setstyle) -* [`setResizeMode(...)`](#setresizemode) -* [`getResizeMode()`](#getresizemode) -* [`addListener('keyboardWillShow', ...)`](#addlistenerkeyboardwillshow-) -* [`addListener('keyboardDidShow', ...)`](#addlistenerkeyboarddidshow-) -* [`addListener('keyboardWillHide', ...)`](#addlistenerkeyboardwillhide-) -* [`addListener('keyboardDidHide', ...)`](#addlistenerkeyboarddidhide-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Enums](#enums) +- [`show()`](#show) +- [`hide()`](#hide) +- [`setAccessoryBarVisible(...)`](#setaccessorybarvisible) +- [`setScroll(...)`](#setscroll) +- [`setStyle(...)`](#setstyle) +- [`setResizeMode(...)`](#setresizemode) +- [`getResizeMode()`](#getresizemode) +- [`addListener('keyboardWillShow', ...)`](#addlistenerkeyboardwillshow-) +- [`addListener('keyboardDidShow', ...)`](#addlistenerkeyboarddidshow-) +- [`addListener('keyboardWillHide', ...)`](#addlistenerkeyboardwillhide-) +- [`addListener('keyboardDidHide', ...)`](#addlistenerkeyboarddidhide-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Enums](#enums) @@ -125,8 +125,7 @@ This method is only supported on Android. **Since:** 1.0.0 --------------------- - +--- ### hide() @@ -138,8 +137,7 @@ Hide the keyboard. **Since:** 1.0.0 --------------------- - +--- ### setAccessoryBarVisible(...) @@ -158,8 +156,7 @@ This method is only supported on iPhone devices. **Since:** 1.0.0 --------------------- - +--- ### setScroll(...) @@ -177,8 +174,7 @@ This method is only supported on iOS. **Since:** 1.0.0 --------------------- - +--- ### setStyle(...) @@ -196,8 +192,7 @@ This method is only supported on iOS. **Since:** 1.0.0 --------------------- - +--- ### setResizeMode(...) @@ -215,8 +210,7 @@ This method is only supported on iOS. **Since:** 1.0.0 --------------------- - +--- ### getResizeMode() @@ -232,8 +226,7 @@ This method is only supported on iOS. **Since:** 4.0.0 --------------------- - +--- ### addListener('keyboardWillShow', ...) @@ -254,8 +247,7 @@ On Android keyboardWillShow and keyboardDidShow fire almost at the same time. **Since:** 1.0.0 --------------------- - +--- ### addListener('keyboardDidShow', ...) @@ -276,8 +268,7 @@ On Android keyboardWillShow and keyboardDidShow fire almost at the same time. **Since:** 1.0.0 --------------------- - +--- ### addListener('keyboardWillHide', ...) @@ -298,8 +289,7 @@ On Android keyboardWillHide and keyboardDidHide fire almost at the same time. **Since:** 1.0.0 --------------------- - +--- ### addListener('keyboardDidHide', ...) @@ -320,8 +310,7 @@ On Android keyboardWillHide and keyboardDidHide fire almost at the same time. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -333,43 +322,36 @@ Remove all native listeners for this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### KeyboardStyleOptions | Prop | Type | Description | Default | Since | | ----------- | ------------------------------------------------------- | ---------------------- | ---------------------------------- | ----- | | **`style`** | KeyboardStyle | Style of the keyboard. | KeyboardStyle.Default | 1.0.0 | - #### KeyboardResizeOptions | Prop | Type | Description | Since | | ---------- | --------------------------------------------------------- | ------------------------------------------------------- | ----- | | **`mode`** | KeyboardResize | Mode used to resize elements when the keyboard appears. | 1.0.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### KeyboardInfo | Prop | Type | Description | Since | | -------------------- | ------------------- | ----------------------- | ----- | | **`keyboardHeight`** | number | Height of the heyboard. | 1.0.0 | - ### Enums - #### KeyboardStyle | Members | Value | Description | Since | @@ -378,7 +360,6 @@ Remove all native listeners for this plugin. | **`Light`** | 'LIGHT' | Light keyboard. | 1.0.0 | | **`Default`** | 'DEFAULT' | On iOS 13 and newer the keyboard style is based on the device appearance. If the device is using Dark mode, the keyboard will be dark. If the device is using Light mode, the keyboard will be light. On iOS 12 the keyboard will be light. | 1.0.0 | - #### KeyboardResize | Members | Value | Description | Since | diff --git a/local-notifications/README.md b/local-notifications/README.md index 7af4e5076d..cf899dfbc9 100644 --- a/local-notifications/README.md +++ b/local-notifications/README.md @@ -5,13 +5,13 @@ The Local Notifications API provides a way to schedule device notifications loca ## Install ```bash -npm install @capacitor/local-notifications +npm install @capacitor/local-notifications@latest-7 npx cap sync ``` ## Android -Android 13 requires a permission check in order to send notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly. +Android 13 requires a permission check in order to send notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly. On Android 12 and older it won't show a prompt and will just return as granted. @@ -21,9 +21,9 @@ Starting on Android 12, scheduled notifications won't be exact unless this permi ``` -Note that even if the permission is present, users can still disable exact notifications from the app settings. Use `checkExactNotificationSetting()` to check the the value of the setting. If a user disables this setting, the app will restart and any notification scheduled with an exact alarm will be deleted. If your application depends on exact alarms, be sure to check this setting on app launch (for example, in [`App.appStateChange`](https://capacitorjs.com/docs/apis/app#addlistenerappstatechange-)) in order to provide fallbacks or alternative behavior. +Note that even if the permission is present, users can still disable exact notifications from the app settings. Use `checkExactNotificationSetting()` to check the the value of the setting. If a user disables this setting, the app will restart and any notification scheduled with an exact alarm will be deleted. If your application depends on exact alarms, be sure to check this setting on app launch (for example, in [`App.appStateChange`](https://capacitorjs.com/docs/apis/app#addlistenerappstatechange-)) in order to provide fallbacks or alternative behavior. -On Android 14, there is a new permission called `USE_EXACT_ALARM`. Use this permission to use exact alarms without needing to request permission from the user. This should only be used if the use of exact alarms is central to your app's functionality. Read more about the implications of using this permission [here](https://developer.android.com/reference/android/Manifest.permission#USE_EXACT_ALARM). +On Android 14, there is a new permission called `USE_EXACT_ALARM`. Use this permission to use exact alarms without needing to request permission from the user. This should only be used if the use of exact alarms is central to your app's functionality. Read more about the implications of using this permission [here](https://developer.android.com/reference/android/Manifest.permission#USE_EXACT_ALARM). From Android 15 onwards, users can install an app in the [Private space](https://developer.android.com/about/versions/15/features#private-space). Users can lock their private space at any time, which means that push notifications are not shown until the user unlocks it. @@ -70,9 +70,9 @@ import { CapacitorConfig } from '@capacitor/cli'; const config: CapacitorConfig = { plugins: { LocalNotifications: { - smallIcon: "ic_stat_icon_config_sample", - iconColor: "#488AFF", - sound: "beep.wav", + smallIcon: 'ic_stat_icon_config_sample', + iconColor: '#488AFF', + sound: 'beep.wav', }, }, }; @@ -90,27 +90,27 @@ If the device has entered [Doze](https://developer.android.com/training/monitori -* [`schedule(...)`](#schedule) -* [`getPending()`](#getpending) -* [`registerActionTypes(...)`](#registeractiontypes) -* [`cancel(...)`](#cancel) -* [`areEnabled()`](#areenabled) -* [`getDeliveredNotifications()`](#getdeliverednotifications) -* [`removeDeliveredNotifications(...)`](#removedeliverednotifications) -* [`removeAllDeliveredNotifications()`](#removealldeliverednotifications) -* [`createChannel(...)`](#createchannel) -* [`deleteChannel(...)`](#deletechannel) -* [`listChannels()`](#listchannels) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions()`](#requestpermissions) -* [`changeExactNotificationSetting()`](#changeexactnotificationsetting) -* [`checkExactNotificationSetting()`](#checkexactnotificationsetting) -* [`addListener('localNotificationReceived', ...)`](#addlistenerlocalnotificationreceived-) -* [`addListener('localNotificationActionPerformed', ...)`](#addlistenerlocalnotificationactionperformed-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) -* [Enums](#enums) +- [`schedule(...)`](#schedule) +- [`getPending()`](#getpending) +- [`registerActionTypes(...)`](#registeractiontypes) +- [`cancel(...)`](#cancel) +- [`areEnabled()`](#areenabled) +- [`getDeliveredNotifications()`](#getdeliverednotifications) +- [`removeDeliveredNotifications(...)`](#removedeliverednotifications) +- [`removeAllDeliveredNotifications()`](#removealldeliverednotifications) +- [`createChannel(...)`](#createchannel) +- [`deleteChannel(...)`](#deletechannel) +- [`listChannels()`](#listchannels) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions()`](#requestpermissions) +- [`changeExactNotificationSetting()`](#changeexactnotificationsetting) +- [`checkExactNotificationSetting()`](#checkexactnotificationsetting) +- [`addListener('localNotificationReceived', ...)`](#addlistenerlocalnotificationreceived-) +- [`addListener('localNotificationActionPerformed', ...)`](#addlistenerlocalnotificationactionperformed-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) +- [Enums](#enums) @@ -133,8 +133,7 @@ schedule(options: ScheduleOptions) => Promise **Since:** 1.0.0 --------------------- - +--- ### getPending() @@ -148,8 +147,7 @@ Get a list of pending notifications. **Since:** 1.0.0 --------------------- - +--- ### registerActionTypes(...) @@ -167,8 +165,7 @@ Only available for iOS and Android. **Since:** 1.0.0 --------------------- - +--- ### cancel(...) @@ -184,8 +181,7 @@ Cancel pending notifications. **Since:** 1.0.0 --------------------- - +--- ### areEnabled() @@ -199,8 +195,7 @@ Check if notifications are enabled or not. **Since:** 1.0.0 --------------------- - +--- ### getDeliveredNotifications() @@ -214,8 +209,7 @@ Get a list of notifications that are visible on the notifications screen. **Since:** 4.0.0 --------------------- - +--- ### removeDeliveredNotifications(...) @@ -231,8 +225,7 @@ Remove the specified notifications from the notifications screen. **Since:** 4.0.0 --------------------- - +--- ### removeAllDeliveredNotifications() @@ -244,8 +237,7 @@ Remove all the notifications from the notifications screen. **Since:** 4.0.0 --------------------- - +--- ### createChannel(...) @@ -263,8 +255,7 @@ Only available for Android. **Since:** 1.0.0 --------------------- - +--- ### deleteChannel(...) @@ -282,8 +273,7 @@ Only available for Android. **Since:** 1.0.0 --------------------- - +--- ### listChannels() @@ -299,8 +289,7 @@ Only available for Android. **Since:** 1.0.0 --------------------- - +--- ### checkPermissions() @@ -314,8 +303,7 @@ Check permission to display local notifications. **Since:** 1.0.0 --------------------- - +--- ### requestPermissions() @@ -329,8 +317,7 @@ Request permission to display local notifications. **Since:** 1.0.0 --------------------- - +--- ### changeExactNotificationSetting() @@ -352,8 +339,7 @@ Only available on Android. **Since:** 6.0.0 --------------------- - +--- ### checkExactNotificationSetting() @@ -369,8 +355,7 @@ Only available on Android. **Since:** 6.0.0 --------------------- - +--- ### addListener('localNotificationReceived', ...) @@ -389,8 +374,7 @@ Listen for when notifications are displayed. **Since:** 1.0.0 --------------------- - +--- ### addListener('localNotificationActionPerformed', ...) @@ -409,8 +393,7 @@ Listen for when an action is performed on a notification. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -422,19 +405,16 @@ Remove all listeners for this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### ScheduleResult | Prop | Type | Description | Since | | ------------------- | ------------------------------------------ | ------------------------------------ | ----- | | **`notifications`** | LocalNotificationDescriptor[] | The list of scheduled notifications. | 1.0.0 | - #### LocalNotificationDescriptor The object that describes a local notification. @@ -443,14 +423,12 @@ The object that describes a local notification. | -------- | ------------------- | ---------------------------- | ----- | | **`id`** | number | The notification identifier. | 1.0.0 | - #### ScheduleOptions | Prop | Type | Description | Since | | ------------------- | -------------------------------------- | -------------------------------------- | ----- | | **`notifications`** | LocalNotificationSchema[] | The list of notifications to schedule. | 1.0.0 | - #### LocalNotificationSchema | Prop | Type | Description | Since | @@ -478,7 +456,6 @@ The object that describes a local notification. | **`inboxList`** | string[] | Sets a list of strings for display in an inbox style notification. Up to 5 strings are allowed. Only available for Android. | 1.0.0 | | **`silent`** | boolean | If true, notification will not appear while app is in the foreground. Only available for iOS. | 5.0.0 | - #### Schedule Represents a schedule for a notification. @@ -494,7 +471,6 @@ Use either `at`, `on`, or `every` to schedule notifications. | **`every`** | ScheduleEvery | Schedule a notification on a particular interval. | 1.0.0 | | **`count`** | number | Limit the number times a notification is delivered by the interval specified by `every`. | 1.0.0 | - #### Date Enables basic storage and retrieval of dates and times. @@ -545,7 +521,6 @@ Enables basic storage and retrieval of dates and times. | **toISOString** | () => string | Returns a date as a string value in ISO format. | | **toJSON** | (key?: any) => string | Used by the JSON.stringify method to enable the transformation of an object's data for JavaScript Object Notation (JSON) serialization. | - #### ScheduleOn | Prop | Type | @@ -558,7 +533,6 @@ Enables basic storage and retrieval of dates and times. | **`minute`** | number | | **`second`** | number | - #### Attachment Represents a notification attachment. @@ -569,7 +543,6 @@ Represents a notification attachment. | **`url`** | string | The URL to the attachment. Use the `res` scheme to reference web assets, e.g. `res:///assets/img/icon.png`. Also accepts `file` URLs. | 1.0.0 | | **`options`** | AttachmentOptions | Attachment options. | 1.0.0 | - #### AttachmentOptions | Prop | Type | Description | Since | @@ -579,14 +552,12 @@ Represents a notification attachment. | **`iosUNNotificationAttachmentOptionsThumbnailClippingRectKey`** | string | Sets the `UNNotificationAttachmentOptionsThumbnailClippingRectKey` key in the hashable options of [`UNNotificationAttachment`](https://developer.apple.com/documentation/usernotifications/unnotificationattachment). Only available for iOS. | 1.0.0 | | **`iosUNNotificationAttachmentOptionsThumbnailTimeKey`** | string | Sets the `UNNotificationAttachmentOptionsThumbnailTimeKey` key in the hashable options of [`UNNotificationAttachment`](https://developer.apple.com/documentation/usernotifications/unnotificationattachment). Only available for iOS. | 1.0.0 | - #### PendingResult | Prop | Type | Description | Since | | ------------------- | --------------------------------------------- | ---------------------------------- | ----- | | **`notifications`** | PendingLocalNotificationSchema[] | The list of pending notifications. | 1.0.0 | - #### PendingLocalNotificationSchema | Prop | Type | Description | Since | @@ -597,14 +568,12 @@ Represents a notification attachment. | **`schedule`** | Schedule | Schedule this notification for a later time. | 1.0.0 | | **`extra`** | any | Set extra data to store within this notification. | 1.0.0 | - #### RegisterActionTypesOptions | Prop | Type | Description | Since | | ----------- | ------------------------- | ------------------------------------- | ----- | | **`types`** | ActionType[] | The list of action types to register. | 1.0.0 | - #### ActionType A collection of actions. @@ -619,7 +588,6 @@ A collection of actions. | **`iosHiddenPreviewsShowTitle`** | boolean | Sets `hiddenPreviewsShowTitle` in the options of the [`UNNotificationCategory`](https://developer.apple.com/documentation/usernotifications/unnotificationcategory). Only available for iOS. | 1.0.0 | | **`iosHiddenPreviewsShowSubtitle`** | boolean | Sets `hiddenPreviewsShowSubtitle` in the options of the [`UNNotificationCategory`](https://developer.apple.com/documentation/usernotifications/unnotificationcategory). Only available for iOS. | 1.0.0 | - #### Action An action that can be taken when a notification is displayed. @@ -635,28 +603,24 @@ An action that can be taken when a notification is displayed. | **`inputButtonTitle`** | string | Sets `textInputButtonTitle` on the [`UNTextInputNotificationAction`](https://developer.apple.com/documentation/usernotifications/untextinputnotificationaction). Only available for iOS when `input` is `true`. | 1.0.0 | | **`inputPlaceholder`** | string | Sets `textInputPlaceholder` on the [`UNTextInputNotificationAction`](https://developer.apple.com/documentation/usernotifications/untextinputnotificationaction). Only available for iOS when `input` is `true`. | 1.0.0 | - #### CancelOptions | Prop | Type | Description | Since | | ------------------- | ------------------------------------------ | ------------------------------------ | ----- | | **`notifications`** | LocalNotificationDescriptor[] | The list of notifications to cancel. | 1.0.0 | - #### EnabledResult | Prop | Type | Description | Since | | ----------- | -------------------- | ---------------------------------------------------------- | ----- | | **`value`** | boolean | Whether or not the device has local notifications enabled. | 1.0.0 | - #### DeliveredNotifications | Prop | Type | Description | Since | | ------------------- | ------------------------------------------ | ------------------------------------------------------------------- | ----- | | **`notifications`** | DeliveredNotificationSchema[] | List of notifications that are visible on the notifications screen. | 1.0.0 | - #### DeliveredNotificationSchema | Prop | Type | Description | Since | @@ -674,7 +638,6 @@ An action that can be taken when a notification is displayed. | **`schedule`** | Schedule | Schedule used to fire this notification. Only available for iOS. | 4.0.0 | | **`sound`** | string | Sound that was used when the notification was displayed. Only available for iOS. | 4.0.0 | - #### Channel | Prop | Type | Description | Default | Since | @@ -689,35 +652,30 @@ An action that can be taken when a notification is displayed. | **`lightColor`** | string | The light color for notifications posted to this channel. Only supported if lights are enabled on this channel and the device supports it. Supported color formats are `#RRGGBB` and `#RRGGBBAA`. | | 1.0.0 | | **`vibration`** | boolean | Whether notifications posted to this channel should vibrate. | | 1.0.0 | - #### ListChannelsResult | Prop | Type | Description | Since | | -------------- | ---------------------- | ---------------------------------- | ----- | | **`channels`** | Channel[] | The list of notification channels. | 1.0.0 | - #### PermissionStatus | Prop | Type | Description | Since | | ------------- | ----------------------------------------------------------- | --------------------------------------------- | ----- | | **`display`** | PermissionState | Permission state of displaying notifications. | 1.0.0 | - #### SettingsPermissionStatus | Prop | Type | Description | Since | | ----------------- | ----------------------------------------------------------- | --------------------------------------- | ----- | | **`exact_alarm`** | PermissionState | Permission state of using exact alarms. | 6.0.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### ActionPerformed | Prop | Type | Description | Since | @@ -726,37 +684,30 @@ An action that can be taken when a notification is displayed. | **`inputValue`** | string | The value entered by the user on the notification. Only available on iOS for notifications with `input` set to `true`. | 1.0.0 | | **`notification`** | LocalNotificationSchema | The original notification schema. | 1.0.0 | - ### Type Aliases - #### ScheduleEvery 'year' | 'month' | 'two-weeks' | 'week' | 'day' | 'hour' | 'minute' | 'second' - #### Importance The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) 1 | 2 | 3 | 4 | 5 - #### Visibility The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) -1 | 0 | 1 - #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' - ### Enums - #### Weekday | Members | Value | diff --git a/motion/README.md b/motion/README.md index f6c04f035a..f48b1022b7 100644 --- a/motion/README.md +++ b/motion/README.md @@ -5,7 +5,7 @@ The Motion API tracks accelerometer and device orientation (compass heading, etc ## Install ```bash -npm install @capacitor/motion +npm install @capacitor/motion@latest-7 npx cap sync ``` @@ -19,7 +19,6 @@ permission on any user-initiated action (such as a button click): import { PluginListenerHandle } from '@capacitor/core'; import { Motion } from '@capacitor/motion'; - let accelHandler: PluginListenerHandle; myButton.addEventListener('click', async () => { @@ -31,7 +30,7 @@ myButton.addEventListener('click', async () => { } // Once the user approves, can start listening: - accelHandler = await Motion.addListener('accel', event => { + accelHandler = await Motion.addListener('accel', (event) => { console.log('Device motion event:', event); }); }); @@ -57,11 +56,11 @@ API to understand the data supplied in the 'accel' event. -* [`addListener('accel', ...)`](#addlisteneraccel-) -* [`addListener('orientation', ...)`](#addlistenerorientation-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`addListener('accel', ...)`](#addlisteneraccel-) +- [`addListener('orientation', ...)`](#addlistenerorientation-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -85,8 +84,7 @@ Add a listener for accelerometer data **Since:** 1.0.0 --------------------- - +--- ### addListener('orientation', ...) @@ -105,8 +103,7 @@ Add a listener for device orientation change (compass heading, etc.) **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -118,19 +115,16 @@ Remove all the listeners that are attached to this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### AccelListenerEvent | Prop | Type | Description | Since | @@ -140,7 +134,6 @@ Remove all the listeners that are attached to this plugin. | **`rotationRate`** | RotationRate | An object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is expressed in degrees per seconds. | 1.0.0 | | **`interval`** | number | A number representing the interval of time, in milliseconds, at which data is obtained from the device. | 1.0.0 | - #### Acceleration | Prop | Type | Description | Since | @@ -149,7 +142,6 @@ Remove all the listeners that are attached to this plugin. | **`y`** | number | The amount of acceleration along the Y axis. | 1.0.0 | | **`z`** | number | The amount of acceleration along the Z axis. | 1.0.0 | - #### RotationRate | Prop | Type | Description | Since | @@ -158,22 +150,24 @@ Remove all the listeners that are attached to this plugin. | **`beta`** | number | The amount of rotation around the X axis, in degrees per second. | 1.0.0 | | **`gamma`** | number | The amount of rotation around the Y axis, in degrees per second. | 1.0.0 | - ### Type Aliases - #### AccelListener -(event: AccelListenerEvent): void - + + (event: AccelListenerEvent): void + #### OrientationListener -(event: RotationRate): void - + + (event: RotationRate): void + #### OrientationListenerEvent -RotationRate + + RotationRate + diff --git a/network/README.md b/network/README.md index 48496869fc..fd0041a603 100644 --- a/network/README.md +++ b/network/README.md @@ -5,7 +5,7 @@ The Network API provides network and connectivity information. ## Install ```bash -npm install @capacitor/network +npm install @capacitor/network@latest-7 npx cap sync ``` @@ -14,7 +14,7 @@ npx cap sync ```typescript import { Network } from '@capacitor/network'; -Network.addListener('networkStatusChange', status => { +Network.addListener('networkStatusChange', (status) => { console.log('Network status changed', status); }); @@ -29,11 +29,11 @@ const logCurrentNetworkStatus = async () => { -* [`getStatus()`](#getstatus) -* [`addListener('networkStatusChange', ...)`](#addlistenernetworkstatuschange-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`getStatus()`](#getstatus) +- [`addListener('networkStatusChange', ...)`](#addlistenernetworkstatuschange-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -52,8 +52,7 @@ Query the current status of the network connection. **Since:** 1.0.0 --------------------- - +--- ### addListener('networkStatusChange', ...) @@ -72,8 +71,7 @@ Listen for changes in the network connection. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -85,12 +83,10 @@ Remove all listeners (including the network status changes) for this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### ConnectionStatus Represents the state and type of the network connection. @@ -100,28 +96,26 @@ Represents the state and type of the network connection. | **`connected`** | boolean | Whether there is an active connection or not. | 1.0.0 | | **`connectionType`** | ConnectionType | The type of network connection currently in use. If there is no active network connection, `connectionType` will be `'none'`. | 1.0.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - ### Type Aliases - #### ConnectionType The type of network connection that a device might have. 'wifi' | 'cellular' | 'none' | 'unknown' - #### ConnectionStatusChangeListener Callback to receive the status change notifications. -(status: ConnectionStatus): void + + (status: ConnectionStatus): void + diff --git a/package.json b/package.json index 96d8fd9dca..8da778fce6 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,12 @@ "set-settings-gradle-for-monorepo": "node ./scripts/monorepo-tools/android-settings-gradle-fix.mjs", "publish:cocoapod": "lerna run publish:cocoapod --concurrency 1", "ci:publish:nightly": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid nightly-$(date +\"%Y%m%dT%H%M%S\") --force-publish --no-changelog --no-git-tag-version --dist-tag nightly --no-push --yes", - "ci:publish:alpha": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid alpha --force-publish --dist-tag next --yes", - "ci:publish:beta": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid beta --force-publish --dist-tag next --yes", - "ci:publish:rc": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid rc --force-publish --dist-tag next --yes", - "ci:publish:latest": "lerna publish --conventional-commits --dist-tag latest --no-verify-access --yes", - "ci:publish:latest-from-pre": "lerna publish --conventional-graduate --conventional-commits --dist-tag latest --no-verify-access --force-publish --yes", - "ci:publish:dev": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid dev-$(date +\"%Y%m%dT%H%M%S\") --force-publish --no-changelog --no-git-tag-version --dist-tag dev --no-push --yes" + "ci:publish:alpha": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid alpha --force-publish --dist-tag next-7 --yes", + "ci:publish:beta": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid beta --force-publish --dist-tag next-7 --yes", + "ci:publish:rc": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid rc --force-publish --dist-tag next-7 --yes", + "ci:publish:latest": "lerna publish --conventional-commits --dist-tag latest-7 --no-verify-access --yes", + "ci:publish:latest-from-pre": "lerna publish --conventional-graduate --conventional-commits --dist-tag latest-7 --no-verify-access --force-publish --yes", + "ci:publish:dev": "lerna publish prerelease --conventional-commits --conventional-prerelease --preid dev-$(date +\"%Y%m%dT%H%M%S\") --force-publish --no-changelog --no-git-tag-version --dist-tag dev-7 --no-push --yes" }, "devDependencies": { "@actions/core": "^1.9.1", diff --git a/preferences/README.md b/preferences/README.md index 94a64093e3..e2b291492a 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -19,7 +19,7 @@ we recommend taking a look at a SQLite-based solution. One such solution is [Ion ## Install ```bash -npm install @capacitor/preferences +npm install @capacitor/preferences@latest-7 npx cap sync ``` @@ -89,15 +89,15 @@ This method can also be used to store non-string values, such as numbers and boo -* [`configure(...)`](#configure) -* [`get(...)`](#get) -* [`set(...)`](#set) -* [`remove(...)`](#remove) -* [`clear()`](#clear) -* [`keys()`](#keys) -* [`migrate()`](#migrate) -* [`removeOld()`](#removeold) -* [Interfaces](#interfaces) +- [`configure(...)`](#configure) +- [`get(...)`](#get) +- [`set(...)`](#set) +- [`remove(...)`](#remove) +- [`clear()`](#clear) +- [`keys()`](#keys) +- [`migrate()`](#migrate) +- [`removeOld()`](#removeold) +- [Interfaces](#interfaces) @@ -120,8 +120,7 @@ Options that are `undefined` will not be used. **Since:** 1.0.0 --------------------- - +--- ### get(...) @@ -139,8 +138,7 @@ Get the value from preferences of a given key. **Since:** 1.0.0 --------------------- - +--- ### set(...) @@ -156,8 +154,7 @@ Set the value in preferences for a given key. **Since:** 1.0.0 --------------------- - +--- ### remove(...) @@ -173,8 +170,7 @@ Remove the value from preferences for a given key, if any. **Since:** 1.0.0 --------------------- - +--- ### clear() @@ -186,8 +182,7 @@ Clear keys and values from preferences. **Since:** 1.0.0 --------------------- - +--- ### keys() @@ -201,8 +196,7 @@ Return the list of known keys in preferences. **Since:** 1.0.0 --------------------- - +--- ### migrate() @@ -220,8 +214,7 @@ To remove the old data after being migrated, call removeOld(). **Since:** 1.0.0 --------------------- - +--- ### removeOld() @@ -233,33 +226,28 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. **Since:** 1.1.0 --------------------- - +--- ### Interfaces - #### ConfigureOptions | Prop | Type | Description | Default | Since | | ----------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----- | | **`group`** | string | Set the preferences group. Preferences groups are used to organize key/value pairs. Using the value 'NativeStorage' provides backwards-compatibility with [`cordova-plugin-nativestorage`](https://www.npmjs.com/package/cordova-plugin-nativestorage). WARNING: The `clear()` method can delete unintended values when using the 'NativeStorage' group. | CapacitorStorage | 1.0.0 | - #### GetResult | Prop | Type | Description | Since | | ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`value`** | string \| null | The value from preferences associated with the given key. If a value was not previously set or was removed, value will be `null`. | 1.0.0 | - #### GetOptions | Prop | Type | Description | Since | | --------- | ------------------- | ------------------------------------------------- | ----- | | **`key`** | string | The key whose value to retrieve from preferences. | 1.0.0 | - #### SetOptions | Prop | Type | Description | Since | @@ -267,21 +255,18 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. | **`key`** | string | The key to associate with the value being set in preferences. | 1.0.0 | | **`value`** | string | The value to set in preferences with the associated key. | 1.0.0 | - #### RemoveOptions | Prop | Type | Description | Since | | --------- | ------------------- | ----------------------------------------------- | ----- | | **`key`** | string | The key whose value to remove from preferences. | 1.0.0 | - #### KeysResult | Prop | Type | Description | Since | | ---------- | --------------------- | ------------------------------ | ----- | | **`keys`** | string[] | The known keys in preferences. | 1.0.0 | - #### MigrateResult | Prop | Type | Description | Since | diff --git a/push-notifications/README.md b/push-notifications/README.md index 85fca33b14..85507cc430 100644 --- a/push-notifications/README.md +++ b/push-notifications/README.md @@ -5,7 +5,7 @@ The Push Notifications API provides access to native push notifications. ## Install ```bash -npm install @capacitor/push-notifications +npm install @capacitor/push-notifications@latest-7 npx cap sync ``` @@ -27,9 +27,9 @@ func application(_ application: UIApplication, didFailToRegisterForRemoteNotific ## Android -The Push Notification API uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) SDK for handling notifications. See [Set up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client) and follow the instructions for creating a Firebase project and registering your application. There is no need to add the Firebase SDK to your app or edit your app manifest - the Push Notifications provides that for you. All that is required is your Firebase project's `google-services.json` file added to the module (app-level) directory of your app. +The Push Notification API uses [Firebase Cloud Messaging](https://firebase.google.com/docs/cloud-messaging) SDK for handling notifications. See [Set up a Firebase Cloud Messaging client app on Android](https://firebase.google.com/docs/cloud-messaging/android/client) and follow the instructions for creating a Firebase project and registering your application. There is no need to add the Firebase SDK to your app or edit your app manifest - the Push Notifications provides that for you. All that is required is your Firebase project's `google-services.json` file added to the module (app-level) directory of your app. -Android 13 requires a permission check in order to receive push notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly, when targeting SDK 33. +Android 13 requires a permission check in order to receive push notifications. You are required to call `checkPermissions()` and `requestPermissions()` accordingly, when targeting SDK 33. From Android 15 onwards, users can install an app in the [Private space](https://developer.android.com/about/versions/15/features#private-space). Users can lock their private space at any time, which means that push notifications are not shown until the user unlocks it. @@ -113,7 +113,7 @@ import { CapacitorConfig } from '@capacitor/cli'; const config: CapacitorConfig = { plugins: { PushNotifications: { - presentationOptions: ["badge", "sound", "alert"], + presentationOptions: ['badge', 'sound', 'alert'], }, }, }; @@ -124,17 +124,21 @@ export default config; ## Silent Push Notifications / Data-only Notifications + #### iOS + This plugin does not support iOS Silent Push (Remote Notifications). We recommend using native code solutions for handling these types of notifications, see [Pushing Background Updates to Your App](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_background_updates_to_your_app). #### Android -This plugin does support data-only notifications, but will NOT call `pushNotificationReceived` if the app has been killed. To handle this scenario, you will need to create a service that extends `FirebaseMessagingService`, see [Handling FCM Messages](https://firebase.google.com/docs/cloud-messaging/android/receive). + +This plugin does support data-only notifications, but will NOT call `pushNotificationReceived` if the app has been killed. To handle this scenario, you will need to create a service that extends `FirebaseMessagingService`, see [Handling FCM Messages](https://firebase.google.com/docs/cloud-messaging/android/receive). ## Common Issues + On Android, there are various system and app states that can affect the delivery of push notifications: -* If the device has entered [Doze](https://developer.android.com/training/monitoring-device-state/doze-standby) mode, your application may have restricted capabilities. To increase the chance of your notification being received, consider using [FCM high priority messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). -* There are differences in behavior between development and production. Try testing your app outside of being launched by Android Studio. Read more [here](https://stackoverflow.com/a/50238790/1351469). +- If the device has entered [Doze](https://developer.android.com/training/monitoring-device-state/doze-standby) mode, your application may have restricted capabilities. To increase the chance of your notification being received, consider using [FCM high priority messages](https://firebase.google.com/docs/cloud-messaging/concept-options#setting-the-priority-of-a-message). +- There are differences in behavior between development and production. Try testing your app outside of being launched by Android Studio. Read more [here](https://stackoverflow.com/a/50238790/1351469). --- @@ -144,22 +148,22 @@ On Android, there are various system and app states that can affect the delivery import { PushNotifications } from '@capacitor/push-notifications'; const addListeners = async () => { - await PushNotifications.addListener('registration', token => { + await PushNotifications.addListener('registration', (token) => { console.info('Registration token: ', token.value); }); - await PushNotifications.addListener('registrationError', err => { + await PushNotifications.addListener('registrationError', (err) => { console.error('Registration error: ', err.error); }); - await PushNotifications.addListener('pushNotificationReceived', notification => { + await PushNotifications.addListener('pushNotificationReceived', (notification) => { console.log('Push notification received: ', notification); }); - await PushNotifications.addListener('pushNotificationActionPerformed', notification => { + await PushNotifications.addListener('pushNotificationActionPerformed', (notification) => { console.log('Push notification action performed', notification.actionId, notification.inputValue); }); -} +}; const registerNotifications = async () => { let permStatus = await PushNotifications.checkPermissions(); @@ -173,35 +177,35 @@ const registerNotifications = async () => { } await PushNotifications.register(); -} +}; const getDeliveredNotifications = async () => { const notificationList = await PushNotifications.getDeliveredNotifications(); console.log('delivered notifications', notificationList); -} +}; ``` ## API -* [`register()`](#register) -* [`unregister()`](#unregister) -* [`getDeliveredNotifications()`](#getdeliverednotifications) -* [`removeDeliveredNotifications(...)`](#removedeliverednotifications) -* [`removeAllDeliveredNotifications()`](#removealldeliverednotifications) -* [`createChannel(...)`](#createchannel) -* [`deleteChannel(...)`](#deletechannel) -* [`listChannels()`](#listchannels) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions()`](#requestpermissions) -* [`addListener('registration', ...)`](#addlistenerregistration-) -* [`addListener('registrationError', ...)`](#addlistenerregistrationerror-) -* [`addListener('pushNotificationReceived', ...)`](#addlistenerpushnotificationreceived-) -* [`addListener('pushNotificationActionPerformed', ...)`](#addlistenerpushnotificationactionperformed-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`register()`](#register) +- [`unregister()`](#unregister) +- [`getDeliveredNotifications()`](#getdeliverednotifications) +- [`removeDeliveredNotifications(...)`](#removedeliverednotifications) +- [`removeAllDeliveredNotifications()`](#removealldeliverednotifications) +- [`createChannel(...)`](#createchannel) +- [`deleteChannel(...)`](#deletechannel) +- [`listChannels()`](#listchannels) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions()`](#requestpermissions) +- [`addListener('registration', ...)`](#addlistenerregistration-) +- [`addListener('registrationError', ...)`](#addlistenerregistrationerror-) +- [`addListener('pushNotificationReceived', ...)`](#addlistenerpushnotificationreceived-) +- [`addListener('pushNotificationActionPerformed', ...)`](#addlistenerpushnotificationactionperformed-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -222,8 +226,7 @@ notification permissions, use `requestPermissions()` first. **Since:** 1.0.0 --------------------- - +--- ### unregister() @@ -237,8 +240,7 @@ This will delete a firebase token on Android, and unregister APNS on iOS. **Since:** 5.0.0 --------------------- - +--- ### getDeliveredNotifications() @@ -252,8 +254,7 @@ Get a list of notifications that are visible on the notifications screen. **Since:** 1.0.0 --------------------- - +--- ### removeDeliveredNotifications(...) @@ -269,8 +270,7 @@ Remove the specified notifications from the notifications screen. **Since:** 1.0.0 --------------------- - +--- ### removeAllDeliveredNotifications() @@ -282,8 +282,7 @@ Remove all the notifications from the notifications screen. **Since:** 1.0.0 --------------------- - +--- ### createChannel(...) @@ -301,8 +300,7 @@ Only available on Android O or newer (SDK 26+). **Since:** 1.0.0 --------------------- - +--- ### deleteChannel(...) @@ -320,8 +318,7 @@ Only available on Android O or newer (SDK 26+). **Since:** 1.0.0 --------------------- - +--- ### listChannels() @@ -337,8 +334,7 @@ Only available on Android O or newer (SDK 26+). **Since:** 1.0.0 --------------------- - +--- ### checkPermissions() @@ -356,8 +352,7 @@ to display notifications, use local-notifications plugin. **Since:** 1.0.0 --------------------- - +--- ### requestPermissions() @@ -379,8 +374,7 @@ the permission without prompting again. **Since:** 1.0.0 --------------------- - +--- ### addListener('registration', ...) @@ -401,8 +395,7 @@ Provides the push notification token. **Since:** 1.0.0 --------------------- - +--- ### addListener('registrationError', ...) @@ -423,8 +416,7 @@ Provides an error with the registration problem. **Since:** 1.0.0 --------------------- - +--- ### addListener('pushNotificationReceived', ...) @@ -443,8 +435,7 @@ Called when the device receives a push notification. **Since:** 1.0.0 --------------------- - +--- ### addListener('pushNotificationActionPerformed', ...) @@ -463,8 +454,7 @@ Called when an action is performed on a push notification. **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -476,19 +466,16 @@ Remove all native listeners for this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### DeliveredNotifications | Prop | Type | Description | Since | | ------------------- | ------------------------------------- | ------------------------------------------------------------------- | ----- | | **`notifications`** | PushNotificationSchema[] | List of notifications that are visible on the notifications screen. | 1.0.0 | - #### PushNotificationSchema | Prop | Type | Description | Since | @@ -506,7 +493,6 @@ Remove all native listeners for this plugin. | **`group`** | string | Set the group identifier for notification grouping. Only available on Android. Works like `threadIdentifier` on iOS. | 1.0.0 | | **`groupSummary`** | boolean | Designate this notification as the summary for an associated `group`. Only available on Android. | 1.0.0 | - #### Channel | Prop | Type | Description | Default | Since | @@ -521,42 +507,36 @@ Remove all native listeners for this plugin. | **`lightColor`** | string | The light color for notifications posted to this channel. Only supported if lights are enabled on this channel and the device supports it. Supported color formats are `#RRGGBB` and `#RRGGBBAA`. | | 1.0.0 | | **`vibration`** | boolean | Whether notifications posted to this channel should vibrate. | | 1.0.0 | - #### ListChannelsResult | Prop | Type | Description | Since | | -------------- | ---------------------- | --------------------------------------------- | ----- | | **`channels`** | Channel[] | List of all the Channels created by your app. | 1.0.0 | - #### PermissionStatus | Prop | Type | Description | Since | | ------------- | ----------------------------------------------------------- | -------------------------------------------- | ----- | | **`receive`** | PermissionState | Permission state of receiving notifications. | 1.0.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### Token | Prop | Type | Description | Since | | ----------- | ------------------- | ------------------------------------------------------------------------ | ----- | | **`value`** | string | On iOS it contains the APNS token. On Android it contains the FCM token. | 1.0.0 | - #### RegistrationError | Prop | Type | Description | Since | | ----------- | ------------------- | -------------------------------------------------- | ----- | | **`error`** | string | Error message describing the registration failure. | 4.0.0 | - #### ActionPerformed | Prop | Type | Description | Since | @@ -565,24 +545,20 @@ Remove all native listeners for this plugin. | **`inputValue`** | string | Text entered on the notification action. Only available on iOS. | 1.0.0 | | **`notification`** | PushNotificationSchema | The notification in which the action was performed. | 1.0.0 | - ### Type Aliases - #### Importance The importance level. For more details, see the [Android Developer Docs](https://developer.android.com/reference/android/app/NotificationManager#IMPORTANCE_DEFAULT) 1 | 2 | 3 | 4 | 5 - #### Visibility The notification visibility. For more details, see the [Android Developer Docs](https://developer.android.com/reference/androidx/core/app/NotificationCompat#VISIBILITY_PRIVATE) -1 | 0 | 1 - #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' diff --git a/screen-orientation/README.md b/screen-orientation/README.md index d909a75a6b..8075738a0a 100644 --- a/screen-orientation/README.md +++ b/screen-orientation/README.md @@ -5,7 +5,7 @@ The Screen Orientation API provides information and functionality related to the ## Install ```bash -npm install @capacitor/screen-orientation +npm install @capacitor/screen-orientation@latest-7 npx cap sync ``` @@ -33,13 +33,13 @@ By default, an iPad allows Multitasking and its orientation cannot be locked. If -* [`orientation()`](#orientation) -* [`lock(...)`](#lock) -* [`unlock()`](#unlock) -* [`addListener('screenOrientationChange', ...)`](#addlistenerscreenorientationchange-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`orientation()`](#orientation) +- [`lock(...)`](#lock) +- [`unlock()`](#unlock) +- [`addListener('screenOrientationChange', ...)`](#addlistenerscreenorientationchange-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -58,8 +58,7 @@ Returns the current screen orientation. **Since:** 4.0.0 --------------------- - +--- ### lock(...) @@ -75,8 +74,7 @@ Locks the screen orientation. **Since:** 4.0.0 --------------------- - +--- ### unlock() @@ -88,8 +86,7 @@ Unlocks the screen's orientation. **Since:** 4.0.0 --------------------- - +--- ### addListener('screenOrientationChange', ...) @@ -108,8 +105,7 @@ Listens for screen orientation changes. **Since:** 4.0.0 --------------------- - +--- ### removeAllListeners() @@ -121,38 +117,35 @@ Removes all listeners. **Since:** 4.0.0 --------------------- - +--- ### Interfaces - #### ScreenOrientationResult | Prop | Type | | ---------- | ---------------------------- | | **`type`** | OrientationType | - #### OrientationLockOptions | Prop | Type | Description | | ----------------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | **`orientation`** | OrientationLockType | Note: Typescript v5.2+ users should import OrientationLockType from @capacitor/screen-orientation. | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - ### Type Aliases - #### OrientationLockType -'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | 'landscape-secondary' + + 'any' | 'natural' | 'landscape' | 'portrait' | 'portrait-primary' | 'portrait-secondary' | 'landscape-primary' | + 'landscape-secondary' + diff --git a/screen-reader/README.md b/screen-reader/README.md index 7bd8d69aba..683fa69cf4 100644 --- a/screen-reader/README.md +++ b/screen-reader/README.md @@ -5,7 +5,7 @@ The Screen Reader API provides access to TalkBack/VoiceOver/etc. and provides si ## Install ```bash -npm install @capacitor/screen-reader +npm install @capacitor/screen-reader@latest-7 npx cap sync ``` @@ -33,12 +33,12 @@ const sayHello = async () => { -* [`isEnabled()`](#isenabled) -* [`speak(...)`](#speak) -* [`addListener('stateChange', ...)`](#addlistenerstatechange-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`isEnabled()`](#isenabled) +- [`speak(...)`](#speak) +- [`addListener('stateChange', ...)`](#addlistenerstatechange-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -60,8 +60,7 @@ Readers). **Since:** 1.0.0 --------------------- - +--- ### speak(...) @@ -87,8 +86,7 @@ plugin](https://github.com/capacitor-community/text-to-speech). **Since:** 1.0.0 --------------------- - +--- ### addListener('stateChange', ...) @@ -112,8 +110,7 @@ Readers). **Since:** 1.0.0 --------------------- - +--- ### removeAllListeners() @@ -125,12 +122,10 @@ Remove all the listeners that are attached to this plugin. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### SpeakOptions | Prop | Type | Description | Since | @@ -138,26 +133,24 @@ Remove all the listeners that are attached to this plugin. | **`value`** | string | The text to speak. | 1.0.0 | | **`language`** | string | The language to speak the text in, as its [ISO 639-1 Code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (e.g.: "en"). This option is only supported on Android. | 1.0.0 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### ScreenReaderState | Prop | Type | Description | Since | | ----------- | -------------------- | -------------------------------------------- | ----- | | **`value`** | boolean | Whether a Screen Reader is currently active. | 1.0.0 | - ### Type Aliases - #### StateChangeListener -(state: ScreenReaderState): void + + (state: ScreenReaderState): void + diff --git a/share/README.md b/share/README.md index f85503aee0..d94bc32847 100644 --- a/share/README.md +++ b/share/README.md @@ -8,9 +8,10 @@ API](https://web.dev/web-share/)), though web support is currently spotty. ## Install ```bash -npm install @capacitor/share +npm install @capacitor/share@latest-7 npx cap sync ``` + ## Android By default, Capacitor apps only allow to share files from caches folder. To make other Android folders shareable, they have to be added in `android/app/src/main/res/xml/file_paths.xml` file. Check the Specifying Available Files section in [FileProvider docs](https://developer.android.com/reference/androidx/core/content/FileProvider) for the available locations. @@ -46,7 +47,7 @@ await Share.share({ // Share multiple files using files parameter const { photos } = await Camera.pickImages(options); await Share.share({ - files: photos.map(photo => photo.path!), + files: photos.map((photo) => photo.path!), }); ``` @@ -56,9 +57,9 @@ Each platform uses a different set of fields, but you should supply them all. -* [`canShare()`](#canshare) -* [`share(...)`](#share) -* [Interfaces](#interfaces) +- [`canShare()`](#canshare) +- [`share(...)`](#share) +- [Interfaces](#interfaces) @@ -77,8 +78,7 @@ Check if sharing is supported. **Since:** 1.1.0 --------------------- - +--- ### share(...) @@ -96,26 +96,22 @@ Show a Share modal for sharing content with other apps **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### CanShareResult | Prop | Type | Description | Since | | ----------- | -------------------- | ------------------------------------ | ----- | | **`value`** | boolean | Whether sharing is supported or not. | 1.1.0 | - #### ShareResult | Prop | Type | Description | Since | | ------------------ | ------------------- | ------------------------------------------------------------------------------------------------------------------------ | ----- | | **`activityType`** | string | Identifier of the app that received the share action. Can be an empty string in some cases. On web it will be undefined. | 1.0.0 | - #### ShareOptions | Prop | Type | Description | Since | diff --git a/splash-screen/README.md b/splash-screen/README.md index ebad66dca2..aec3d0f0ea 100644 --- a/splash-screen/README.md +++ b/splash-screen/README.md @@ -5,7 +5,7 @@ The Splash Screen API provides methods for showing or hiding a Splash image. ## Install ```bash -npm install @capacitor/splash-screen +npm install @capacitor/splash-screen@latest-7 npx cap sync ``` @@ -151,16 +151,16 @@ const config: CapacitorConfig = { launchShowDuration: 3000, launchAutoHide: true, launchFadeOutDuration: 3000, - backgroundColor: "#ffffffff", - androidSplashResourceName: "splash", - androidScaleType: "CENTER_CROP", + backgroundColor: '#ffffffff', + androidSplashResourceName: 'splash', + androidScaleType: 'CENTER_CROP', showSpinner: true, - androidSpinnerStyle: "large", - iosSpinnerStyle: "small", - spinnerColor: "#999999", + androidSpinnerStyle: 'large', + iosSpinnerStyle: 'small', + spinnerColor: '#999999', splashFullScreen: true, splashImmersive: true, - layoutName: "launch_screen", + layoutName: 'launch_screen', useDialog: true, }, }, @@ -197,9 +197,9 @@ This plugin will use the following project variables (defined in your app's `var -* [`show(...)`](#show) -* [`hide(...)`](#hide) -* [Interfaces](#interfaces) +- [`show(...)`](#show) +- [`hide(...)`](#hide) +- [Interfaces](#interfaces) @@ -220,8 +220,7 @@ Show the splash screen **Since:** 1.0.0 --------------------- - +--- ### hide(...) @@ -237,12 +236,10 @@ Hide the splash screen **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### ShowOptions | Prop | Type | Description | Default | Since | @@ -252,7 +249,6 @@ Hide the splash screen | **`fadeOutDuration`** | number | How long (in ms) to fade out. | 200 | 1.0.0 | | **`showDuration`** | number | How long to show the splash screen when autoHide is enabled (in ms) | 3000 | 1.0.0 | - #### HideOptions | Prop | Type | Description | Default | Since | diff --git a/status-bar/README.md b/status-bar/README.md index 93dfc5a377..40703a7284 100644 --- a/status-bar/README.md +++ b/status-bar/README.md @@ -5,7 +5,7 @@ The StatusBar API Provides methods for configuring the style of the Status Bar, ## Install ```bash -npm install @capacitor/status-bar +npm install @capacitor/status-bar@latest-7 npx cap sync ``` @@ -90,8 +90,8 @@ const config: CapacitorConfig = { plugins: { StatusBar: { overlaysWebView: false, - style: "DARK", - backgroundColor: "#ffffffff", + style: 'DARK', + backgroundColor: '#ffffffff', }, }, }; @@ -105,14 +105,14 @@ export default config; -* [`setStyle(...)`](#setstyle) -* [`setBackgroundColor(...)`](#setbackgroundcolor) -* [`show(...)`](#show) -* [`hide(...)`](#hide) -* [`getInfo()`](#getinfo) -* [`setOverlaysWebView(...)`](#setoverlayswebview) -* [Interfaces](#interfaces) -* [Enums](#enums) +- [`setStyle(...)`](#setstyle) +- [`setBackgroundColor(...)`](#setbackgroundcolor) +- [`show(...)`](#show) +- [`hide(...)`](#hide) +- [`getInfo()`](#getinfo) +- [`setOverlaysWebView(...)`](#setoverlayswebview) +- [Interfaces](#interfaces) +- [Enums](#enums) @@ -133,8 +133,7 @@ Set the current style of the status bar. **Since:** 1.0.0 --------------------- - +--- ### setBackgroundColor(...) @@ -150,8 +149,7 @@ Set the background color of the status bar. **Since:** 1.0.0 --------------------- - +--- ### show(...) @@ -171,8 +169,7 @@ to use `Animation.None` as the animation on the first c **Since:** 1.0.0 --------------------- - +--- ### hide(...) @@ -188,8 +185,7 @@ Hide the status bar. **Since:** 1.0.0 --------------------- - +--- ### getInfo() @@ -203,8 +199,7 @@ Get info about the current state of the status bar. **Since:** 1.0.0 --------------------- - +--- ### setOverlaysWebView(...) @@ -221,33 +216,28 @@ of the space underneath it. **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### StyleOptions | Prop | Type | Description | Since | | ----------- | --------------------------------------- | --------------------------------------------------------- | ----- | | **`style`** | Style | Style of the text of the status bar. | 1.0.0 | - #### BackgroundColorOptions | Prop | Type | Description | Since | | ----------- | ------------------- | ------------------------------------------------- | ----- | | **`color`** | string | A hex color to which the status bar color is set. | 1.0.0 | - #### AnimationOptions | Prop | Type | Description | Default | Since | | --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------- | ----- | | **`animation`** | Animation | The type of status bar animation used when showing or hiding. This option is only supported on iOS. | Animation.Fade | 1.0.0 | - #### StatusBarInfo | Prop | Type | Description | Since | @@ -257,17 +247,14 @@ of the space underneath it. | **`color`** | string | The current status bar color. | 1.0.0 | | **`overlays`** | boolean | Whether the statusbar is overlaid or not. | 1.0.0 | - #### SetOverlaysWebViewOptions | Prop | Type | Description | Since | | ------------- | -------------------- | ----------------------------------------- | ----- | | **`overlay`** | boolean | Whether to overlay the status bar or not. | 1.0.0 | - ### Enums - #### Style | Members | Value | Description | Since | @@ -276,7 +263,6 @@ of the space underneath it. | **`Light`** | 'LIGHT' | Dark text for light backgrounds. | 1.0.0 | | **`Default`** | 'DEFAULT' | The style is based on the device appearance. If the device is using Dark mode, the statusbar text will be light. If the device is using Light mode, the statusbar text will be dark. | 1.0.0 | - #### Animation | Members | Value | Description | Since | diff --git a/text-zoom/README.md b/text-zoom/README.md index cfba1875f3..a13a32a4f7 100644 --- a/text-zoom/README.md +++ b/text-zoom/README.md @@ -15,7 +15,7 @@ The Text Zoom API provides the ability to change Web View text size for visual a ## Install ```bash -npm install @capacitor/text-zoom +npm install @capacitor/text-zoom@latest-7 npx cap sync ``` @@ -23,10 +23,10 @@ npx cap sync -* [`get()`](#get) -* [`getPreferred()`](#getpreferred) -* [`set(...)`](#set) -* [Interfaces](#interfaces) +- [`get()`](#get) +- [`getPreferred()`](#getpreferred) +- [`set(...)`](#set) +- [Interfaces](#interfaces) @@ -47,8 +47,7 @@ Zoom levels are represented as a decimal (e.g. 1.2 is 120%). **Since:** 1.0.0 --------------------- - +--- ### getPreferred() @@ -64,8 +63,7 @@ Zoom levels are represented as a decimal (e.g. 1.2 is 120%). **Since:** 1.0.0 --------------------- - +--- ### set(...) @@ -83,26 +81,22 @@ Zoom levels are represented as a decimal (e.g. 1.2 is 120%). **Since:** 1.0.0 --------------------- - +--- ### Interfaces - #### GetResult | Prop | Type | Description | Since | | ----------- | ------------------- | -------------------------------------------------- | ----- | | **`value`** | number | The current zoom level (represented as a decimal). | 1.0.0 | - #### GetPreferredResult | Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------------------------------- | ----- | | **`value`** | number | The preferred zoom level (represented as a decimal). | 1.0.0 | - #### SetOptions | Prop | Type | Description | Since | diff --git a/toast/README.md b/toast/README.md index 4a0053dd06..7ca8e758ce 100644 --- a/toast/README.md +++ b/toast/README.md @@ -5,7 +5,7 @@ The Toast API provides a notification pop up for displaying important informatio ## Install ```bash -npm install @capacitor/toast +npm install @capacitor/toast@latest-7 npx cap sync ```