Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

jins-meme/JinsMemeSDK-Plugin-Cordova

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JINS MEME SDK Cordova Plugin

【重要】サポート終了のお知らせ

第一世代 JINS MEME は2021年3月末をもちましてサポートを終了しています。Plugin につきましても2021年9月末をもって動作しなくなりますのでご注意ください。

https://jins-meme.com/ja/support/user-support/jins-meme%E3%81%AE%E3%82%B5%E3%83%9D%E3%83%BC%E3%83%88%E7%B5%82%E4%BA%86%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6/

Change Log - 更新履歴

  • ver. 1.3.1: Cordova9 complient.
  • ver. 1.3.0: Enable background buffering.

How to use - 使い方

公式マニュアル

Plug-in structure - プラグイン構造

├── README.md                              # This document - 本文書
├── hooks
│   └── ios_after_plugin_install.js        # インストール時フックスクリプト(iOS)
├── node_modules                           # 依存するnodejsモジュール群(iOS)
│   └── ...
├── plugin.xml                             # Cordovaプラグイン定義ファイル
├── src
│   ├── android                            # Androidソースコード一式
│   │   ├── JinsMemePlugin.java
│   │   ├── MemeLib.jar
│   │   └── Message.java
│   └── ios                                # iOSソースコード一式
│       ├── JinsMemeMessage.h
│       ├── JinsMemeMessage.m
│       ├── JinsMemePlugin.m
│       └── MEMELib.framework
└── www
    └── jins_meme_plugin.js                # JavaScriptインタフェース

JavaScript API

Error objects - エラーオブジェクト

Error structure - 構造

  • Example JSON error object - JSONオブジェクトでエラーcodeとmessageを返す
{
    code: -100,
    message: "some message"
}

Error code - エラーコード

  • Connection status - プラグイン独自
初期化失敗 : -100
未初期化  : -101
スキャン中 : -102
未接続   : -103
  • MemeStatus
OK                   : 0
ERROR                : 1
ERROR_SDK_AUTH       : 2
ERROR_APP_AUTH       : 3
MEME_ERROR_CONNECTION: 4
MEME_ERROR_LOGICAL   : 5  # Android (MEME_DEVICE_INVALIDと同じ意味)
MEME_DEVICE_INVALID  : 5  # iOS (MEME_ERROR_LOGICALと同じ意味)
MEME_CMD_INVALID     : 6
MEME_ERROR_FW_CHECK  : 7
MEME_ERROR_BL_OFF    : 8
その他(UNKNOWN)       : -1

CalibStatus

  • isCalibStatusで取得した値を以下の数値に変換して返す
CALIB_NOT_FINISHED : 0
CALIB_BODY_FINISHED: 1
CALIB_EYE_FINISHED : 2
CALIB_BOTH_FINISHED: 3
その他(UNKNOWN)     : -1

Reported Data

  • JSONオブジェクトでデータを返す
{
    eyeMoveUp: 0,
    eyeMoveDown: 0,
    eyeMoveLeft: 0,
    eyeMoveRight: 0,
    blinkSpeed: 0,
    blinkStrength: 0,
    walking: 0,
    roll: 0,
    pitch: 0,
    yaw: 0,
    accX: 0,
    accY: 0,
    accZ: 0,
    noiseStatus: 0,
    fitError: 0,
    powerLeft: 0,
}

Android

SDK

  • JINS MEME SDK Android 1.2.0

App setting - アプリ設定

  • cordova-diagnostic-plugin などのユーザー許可ダイアログを使用し、permission.ACCESS_COARSE_LOCATION の権限を取得してからスキャンを開始してください。

iOS

SDK

  • JINS MEME SDK iOS 1.2.0

Dependent node.js module - 依存するnodejsモジュール

iOSプラグインではXcodeのEmbedded BinariesにMEMELib.frameworkを追加するためにnode-xcodeを使用している。node-xcodeとその依存ライブラリは基本的にMIT LicenseとUnlicenseで使用可能である。各種詳細と依存関係は以下の通り。

  • MIT License
  • 依存関係
├─ node-uuid                # Dual License under MIT and GPL
├─ pegjs                    # MIT License
└─ simple-plist             # MIT License
    ├─ bplist-creator         # MIT License
    │   └─ stream-buffers     # Unlicense
    ├─ bplist-parser          # MIT License
    └─ plist                  # MIT License
        ├─ base64-js          # MIT License
        ├─ util-deprecate     # MIT License
        ├─ xmlbuilder         # MIT License
        │   └─ lodash-node    # MIT License
        └─ xmldom             # MIT License
  • node-xcodeで使用
  • Dual licensed under the MIT and GPL licenses.
  • 依存関係なし
  • node-xcodeで使用
  • MIT License
  • 依存関係なし
  • node-xcodeで使用
  • MIT License
  • 依存関係
    • bplist-creator
    • bplist-parser
    • plist
  • simple-plistで使用
  • MIT License
  • 依存関係
    • stream-buffers
  • bplist-creatorで使用
  • UNLICENSE
  • 依存関係なし
  • simple-plistで使用
  • MIT License
  • 依存関係なし
  • bplist-creatorで使用
  • MIT License
    • base64-js
    • util-deprecate
    • xmlbuilder
    • xmldom
  • plistで使用
  • MIT License
  • 依存関係なし
  • plistで使用
  • MIT License
  • 依存関係なし
  • plistで使用
  • MIT License
  • 依存関係
    • lodash-node
  • xmlbuilderで使用
  • MIT License
  • 依存関係なし
  • plistで使用
  • MIT License
  • 依存関係なし

その他流用ライブラリ

iOSプラグインではXcodeのEmbedded BinariesにMEMELib.frameworkを追加するために以下のコードを使用している。

ios_after_plugin_install.js

About

The repositorty for Cordova Plugin.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
-