WatchdroidでのUIのメモ
2021 0306追記。電話受信時分。
2021 0310追記。
自分用メモですが、もしかするとWatchDroidを使用している人には参考になるかもしれません。各UIでのActivityと操作ボタンのUI elementなどです。これらを用いればWatchdroidがどの状態であるか判別出来ますし、自動操作マクロが作れます。なお、UIの言葉みる限り、作者の人はイタリアあたりの人なんかな…。微妙に読めん。
Ver. 15.11.46.15の場合です。
Watchdroid Assistantのパッケージ正式名
Package:
"com.lumaticsoft.watchdroidassistant"
Watchdroid Assistant起動時の画面
アクティビティ
"com.lumaticsoft.watchdroidassistant.WDPD"
※アクティビティを指定することでWatchDroidがどの画面を開いているか判別出来ます。
通知履歴に入るボタン
UI Element Class:
※これは単に画像あり動作ボタンを意味するだけのものです。他のアプリ含めて同様な画面に表示されるボタンは同じようなクラスを持ちます。以降、classはなくともボタン指定可能ですので省略します。(少なくともAutomateはIDのみ指定でOK)
UI Element ID:
"com.lumaticsoft.watchdroidassistant:id/imageViewPantGenericaLinCentIzq"
※こちらが基本的にボタンを指定するIDです。
音楽操作へ入るボタン
UI Element Class:
UI element ID
"com.lumaticsoft.watchdroidassistant:id/imageViewPantGenericaLinSupDer"
心拍数測定、歩数履歴に入るボタン
UI Element Class:
UI element ID
"com.lumaticsoft.watchdroidassistant:id/imageViewPantGenericaLinCentDer"
通知履歴画面内では
アクティビティ
"com.lumaticsoft.watchdroidassistant.WDPNL"
バックボタン
UI element class:
"android.widget.RelativeLayout"
UI element ID:
"com.lumaticsoft.watchdroidassistant:id/relativeLayoutPantVolverGenericoLista"
※履歴から通知を開いた場合からの戻るボタンも同じもIDです。どうも通知履歴内部での処理は同じ名前のものが多く、マクロ処理は簡単ではなさそうです。
音楽操作画面内では
アクティビティ
"com.lumaticsoft.watchdroidassistant.WDPCRMC"
次の曲ボタン
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/imageButtonPantControlRepMusicaCoverProximo"
前の曲ボタン
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/imageButtonPantControlRepMusicaCoverPrevio"
再生/停止
UI element ID
"com.lumaticsoft.watchdroidassistant:id/imageButtonPantControlRepMusicaCoverPlayPausa"
音量アップ
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/imageButtonPantControlRepMusicaCoverVolMas"
音量下げる
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/imageButtonPantControlRepMusicaCoverVolMenos"
着信時
アクティビティ
"com.lumaticsoft.watchdroidassistant.WDPNLl"
電話拒否
UI element class:
UI element text:
"拒否"
※電話対応で出るかどうかのボタンは、UI element textで区別されます。すなわち、システムの言語が日本語の場合は「拒否」と「電話に出る」となります。
UI element ID:
"com.lumaticsoft.watchdroidassistant:id/textViewPantOpcionesLista"
電話に出る
UI element class:
UI element text:
"電話に出る"
UI element ID:
"com.lumaticsoft.watchdroidassistant:id/textViewPantOpcionesLista"
WatchDroidAssistantがPhoneから通知を取得したとき
アクティビティ
"com.lumaticsoft.watchdroidassistant.WDPNDD"
タイトル部分のUI Element ID:
"com.lumaticsoft.watchdroidassistant:id/textViewPantNotificacionCompletaDe"
テキスト部分のUI Element ID:
"com.lumaticsoft.watchdroidassistant:id/textViewPantNotificacionCompletaTexto"
通知を確認
UI element class:
UI Element text:
"捨てる"
※通知を確認と「声で書く」などの反応はtextで識別されます。すなわち、日本語専用。
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/textViewPantOpcionesLista"
声で返答
UI element class:
UI Element text:
"声で書く"
UI Element ID
"com.lumaticsoft.watchdroidassistant:id/textViewPantOpcionesLista"
声で書く内部
アクティビティ:
"com.lumaticsoft.watchdroidassistant.WDPNRT"
※メッセージ返答前の待ち時間も同じアクティビティ
応答ボタン
UI element class:
UI element text:
"応答"
UI element ID:
"com.lumaticsoft.watchdroidassistant:id/buttonNotificacionRespuestaTecladoEnviar"
途中ですが、
全部書き出そうと思うと相当大変なので、主に使用するであろう通知履歴部分と音楽再生部分を書き出してみました。通知履歴部分はもう少し動作みないとよくわからぬ。
なお、調べ方はAutomateのIntractブロックやらApp foregroundブロックなどを使って調べています。また、今後WatchDroidの仕様、つーか内部の名前が変わると使えなくなる可能性があります。その場合は許してください。