ja | en

スマホの「回転角度」をリモート監視 Remotely monitor your smartphone's "rotation angle"

SPセンサアプリでは、スマホ端末自体の上下回転となる「ピッチ(Pitch)」と傾斜回転となる「ロール(Roll)」の角度を常時監視しており、 センサー側アプリで取得したスマホの角度データを監視側アプリのスマホに同期することで、その「回転角度」の状態をリモート監視できます。
SP sensor constantly monitors the "Pitch" angle (up and down rotation) and the "Roll" angle (tilt rotation) of the smartphone itself. By synchronizing the angle data acquired by the sensor side app on the smartphone with the monitoring side app, it is possible to remotely monitor the state of the "rotation angle".

設定方法 How to setup

まずは、Androidスマホの両方に「SPセンサ」をインストールします。※アプリの通知の許可を確認するメッセージが表示されるので許可してください。
First, install "SP Sensor" on both Android smartphones. *A message will appear asking for permission to grant notifications to the app; please allow it.
センサー側アプリのスマホのメニューから「SPセンサの登録・状態確認」を選択し、「SPセンサを登録」をクリックして、QRコードを表示します。
Select "SP Sensor Registration/Status check" from the menu on sensor side smartphone, then click "Register SP Sensor" to display the QR code.
そして、監視側アプリのスマホで、そのQRコードを読込み登録を行います(QRコード読取は、専用アプリ等を使用してください)。 これで、スマホ同士の紐付けが完了します。
Then, use monitoring side smartphone to read the QR code and register (please use a dedicated app to read the QR code). This completes the linking between the smartphones.
次に、センサー側のスマホのメニューから「フォアグラウンドで稼働(推奨)」を起動します(アプリを連続稼働させる場合、バックグラウンドで稼働するよりもOSによる強制終了が抑止されるため)。
Next, start "Runs in the foreground (recommended)" from the menu of the sensor side smartphone (This is because, when running the app continuously, it is less likely to be forcibly terminated by the OS than when running in the background).

センサー側スマホのアプリを出来る限り止めないようにするには

SPセンサの状態を監視したい間は、センサー側のスマホを稼働した状態にしておく想定ですが、スマホOS側の処理によって、稼働中のアプリが強制的に停止やスリープする場合があります。 その対策としては、以下の方法があります。

  • スマホの電源を充電した状態にしておく。
  • 開発者向けオプションを有効にして、「充電中に画面をスリープしない」を有効にする。
  • Google Playの「アプリの自動更新」を「アプリを自動更しない」にする。
  • アプリを「フォアグラウンドで稼働」で実行する。
    ※OS側の仕様により、アプリのフォアグラウンドサービスの連続稼働時間に制限があり、 アプリ内部のサービスを約5時間毎に自動で停止・起動を行っています(Android 14以降)。 また、アプリがバックグラウンドで動いている時は、フォアグラウンドサービスの起動ができないため、 連続稼働させる場合は、フォアグラウンドでの稼働を推奨します(Android 12以降)。

How to avoid stopping the app of the sensor side smartphone as much as possible

It is assumed that the sensor side smartphone will be left running while you want to monitor the status of SP Sensor, but depending on the processing on the smartphone OS side, the running the app may be forcibly stopped or put to sleep. As a countermeasure, there are the following methods.

  • Keep your smartphone charged.
  • Enable developer options and enable "Screen wil never sleep while charging".
  • Set "Auto-update apps" in Google Play to "Don't auto-update apps".
  • Run the app in "Runs in the foreground".
    * Due to OS specifications, there is a limit to the continuous operation time of the app's foreground service, and the app's internal services are automatically stopped and started approximately every 5 hours (Android 14 and later). Also, since foreground services cannot be started when the app is running in the background, we recommend running the app in the foreground if you want to run it continuously (Android 12 and later).
最後に、監視側のスマホのメニューから「SPセンサの登録・状態確認」を選択し、登録したセンサー側のスマホを選択すると、センサーの状態が確認できます。
Finally, select "SP Sensor Registration/Status check" from the monitoring side smartphone's menu and select the registered sensor side smartphone to check the status of the sensor.

警告閾値設定 Alert threshold setting

「ピッチ」と「ロール」角度の警告閾値を設定することで、監視側アプリに警告・復旧通知を行うことが可能です。
By setting warning thresholds for "Pitch" and "Roll" angles, the monitoring application can issue Alert(occurred) and Normal(restored) notifications.
閾値は、-180°から180°までの範囲で入力し、その範囲内で警告にする/しないを設定します。
The threshold is entered within the range of -180° to 180°, and you can set whether or not to issue a alert within that range.
「ピッチ」と「ロール」の閾値でどちらかが合致した場合に「警告(発生)」が通知され、どちらも合致しない場合に「通常(復旧)」が通知されます。
A "Alert(Occurred)" notification is sent if either the "Pitch" or "Roll" threshold is met, and a "Normal(restored)" notification is sent if neither threshold is met.
過去の通知や回転角度の状態は、イベント履歴として直近の約7日分を確認することが可能です。
Past notifications and rotation angle status can be viewed as event history for the most recent approximately 7 days.
監視側およびセンサー側のどちらのアプリからでも対象スマホの閾値設定が可能です。
Threshold settings for the target smartphone can be configured from either the monitoring side app or the sensor side app.