コンテンツにジャンプ

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

__CAPGO_KEEP_0__ スキルをAIツールに追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

クリップボードにコピー

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-shake` plugin in my project.

クリップボードにコピー

Manual セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
bun add @capgo/capacitor-shake
bunx cap sync

クリップボードにコピー

インポート
import { CapacitorShake } from '@capgo/capacitor-shake';

API オーバービュー

APIの概要

デバイス上の振動イベントを検知する

デバイスの加速度計を使用して振動パターンを検出する

import { CapacitorShake } from '@capgo/capacitor-shake';
const listener = await CapacitorShake.addListener('shake', () => {
console.log('Shake detected!');
});
// To remove the listener:
await listener.remove();

Get the native Capacitor plugin version.

クリップボードにコピー

import { CapacitorShake } from '@capgo/capacitor-shake';
const { version } = await CapacitorShake.getPluginVersion();
console.log('Plugin version:', version);

__CAPGO_KEEP_0__は src/definitions.ts. API のアップストリームが変更されたときは、再度 Sync を実行してください。

Capgo を使用している場合 Getting Started Capgo を使用してダッシュボードと API の操作を計画する場合、API を接続してください。 @capgo/capacitor-shake を使用 @capgo/capacitor-shake のネイティブ機能の実装詳細 API の概要 API の実装詳細 導入 __CAPGO_KEEP_0__ の実装詳細 API キー API キーと デバイス デバイスの実装詳細