Getting Started
このプラグインのインストール手順と全マークダウンガイドを含む設定用の質問をコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-shake`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/shake/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
インストール
「インストール」のセクションbun add @capgo/capacitor-shakebunx cap syncインポート
「インポート」のセクションimport { CapacitorShake } from '@capgo/capacitor-shake';API Overview
API OverviewaddListener
addListener__CAPGO_KEEP_0__で shake イベントを検知します。
__CAPGO_KEEP_0__で shake イベントを検知します。
import { CapacitorShake } from '@capgo/capacitor-shake';
const listener = await CapacitorShake.addListener('shake', () => { console.log('Shake detected!');});
// To remove the listener:await listener.remove();getPluginVersion
コピーGet the native Capacitor plugin version.
__CAPGO_KEEP_0__ プラグインのバージョンを取得します。
import { CapacitorShake } from '@capgo/capacitor-shake';
const { version } = await CapacitorShake.getPluginVersion();console.log('Plugin version:', version);コピー
真実の源このページはプラグインから生成されています。 src/definitions.ts. upstream の public API が変更された場合に再度 Sync を実行してください。
Getting Started から続けてください。
Getting Started から続けてください。Capacitor を使用している場合 Getting Started Capacitor を使用してダッシュボードと API の操作を計画する場合、Capacitor を接続してください。 Capacitor の @capgo/capacitor-shake を使用して、native capability を使用してください。 Capacitor の @capgo/capacitor-shake を使用して、native capability を使用してください。 API の概要 API の実装詳細 Introduction 導入の実装詳細について API キー API キーについての実装詳細、 デバイス デバイスについての実装詳細。