Watchmaker Wiki

The ultimate watch maker for Android Wear!

User Tools

Site Tools


lua

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
lua [2024/08/10 15:00] – [WatchMaker Lua API] korkmanlua [2024/10/20 20:29] (current) – Added volume controls frutejuise
Line 211: Line 211:
     wm_action('sw_start_stop'         -- start or stop the stopwatch     wm_action('sw_start_stop'         -- start or stop the stopwatch
     wm_action('sw_reset'              -- reset stopwatch     wm_action('sw_reset'              -- reset stopwatch
 +    wm_action('media_next'            -- next track
 +    wm_action('media_prev'            -- previous track
 +    wm_action('media_play'            -- play media       
 +    wm_action('media_pause'           -- pause media       
 +    wm_action('media_play_pause'      -- play paused media or pause playing media    
 +    wm_action('vol_up'                -- increase the volume on the connected phone
 +    wm_action('vol_down'              -- decrease the volume on the connected phone
     wm_action('m_update_weather'      -- update weather     wm_action('m_update_weather'      -- update weather
     wm_action('m_task:MyTask'         -- run Tasker task 'MyTask'     wm_action('m_task:MyTask'         -- run Tasker task 'MyTask'
Line 237: Line 244:
 *About wm_action w_app *About wm_action w_app
  
-The delimiter for the app definition is a backtick ''`'' and the app definition consists of two or three parts:+The delimiter for the app link is a backtick ''`'' and it consists of two or three parts:
  
   * App name (may be empty)   * App name (may be empty)
Line 245: Line 252:
 The app name is optional. If it is empty, the app main activity is launched. Example: ''wm_action('w_app:`com.samsung.android.watch.weather')'' The app name is optional. If it is empty, the app main activity is launched. Example: ''wm_action('w_app:`com.samsung.android.watch.weather')''
  
-The easiest way to find the package name (example ''com.samsung.android.calendar'') is to search for the app on https://www.apkmirror.com/ or https://apkpure.net/. The package names are listed on the download pages. The more direct approach is to run the shell command ''pkginfo --list'' on the watch, but that requires developer tooling (TODO: document that).+The easiest way to find the package name (example ''com.samsung.android.calendar'') is to search for the app on https://www.apkmirror.com/ or https://apkpure.net/. The package names are listed on the download pages. more precise approach is to create a tap action first, select the app via "Watch: Select Application", export the watch, unzip the .watch file and search for ''tap_action="w_app:'' in watch.xml. It uses the same app link format.
  
 Available activities of apps can be obtained by downloading the APK file and uploading it to https://www.virustotal.com/. The "details" tab will list all activity names. Though at the time of writing, no activity could be launched successfully, so this may be broken (Wear OS 4). Available activities of apps can be obtained by downloading the APK file and uploading it to https://www.virustotal.com/. The "details" tab will list all activity names. Though at the time of writing, no activity could be launched successfully, so this may be broken (Wear OS 4).
lua.1723302049.txt.gz · Last modified: 2024/08/10 15:00 by korkman