Motivation: it would be nice to open a specific page quickly in OneNote on an Android tablet.
In Zsh, upon loading the alias and function in .zshrc.snippet
, use the
following syntax to open the page-specific link obtained from the OneNote
desktop app.
one "onenote:https://d.docs.live.net/...§ion-id={xxx}&page-id={xxx}"
Assuming the tablet is connected through adb (to connect, use adb connect
),
the intent will go through and the page will be loaded on the Android tablet.
Note, of course, that for the link to work, one needs to set up the OneNote APK on Android appropriate, such that the page actually exists there.
When setting up a new tablet with a new Win 10 computer, two things are needed:
# In cmd, initiate wireless connection over ADB, by:
adb tcpip 5555
# Then, in WSL, connect to the Android tablet throuhg this port (need to know the IP address of the tablet)
adb connect 192.168.0.195:5555
- For now, even with the alias, I need to wrap the long OneNote string in
quotes. It would be nice to directly use
one URL
to make things simpler. - Alternatively, it would be nice to have a fully functional AutoHotKey function that does all these steps: parse the URL, connect to an Android tablet, and send the intent using the OneNote link in clipboard.
Renate commented on using
adb shell input keyevent 26
.Then, the Zsh function
adb_screen_on()
can be simplified into one line.