obsidian-toggl-integration icon indicating copy to clipboard operation
obsidian-toggl-integration copied to clipboard

Support for Mobile Devices

Open rolikeusch opened this issue 2 years ago • 12 comments

Hi i really love this Plugin! Are there any plan to support mobile devices? I‘m a heavy iPad User and would love to use this Plugin there.

rolikeusch avatar Feb 19 '22 13:02 rolikeusch

Hi Rolikeusch!

I would really like to use the plugin on mobile too.

The reason it does not support mobile currently is because of a third party library I use to interface with the Toggl API.

Recently, the Obsidian devs added some first-party API for web requests, something that could potentially allow me to interact with the Toggl API on mobile as well.

I will have to experiment some with this API first to see if it can make cross-origin requests on mobile, and if that is the case I will have to port the third-party library I use to this new request API. But it is definitely something I am thinking of doing!

PS: If you're looking for a good mobile alternative to the Toggl official app and you're on iOS, I highly recommend Timery.

mcndt avatar Feb 20 '22 08:02 mcndt

Oh i see there are some gaps to fix first. But thanks for your efforts! Timery is the App i actually use ;)

rolikeusch avatar Feb 20 '22 12:02 rolikeusch

I took some time today to migrate the API wrapper to the Obsidian request API (commit fb611303b6 for reference).

The Obsidian API that I needed is only available as of Obsidian version 0.13.25, which is currently only available for testing on the Insider program. Once the API is available in the public release of Obsidian I will look into what I can do to make the plugin available on mobile.

Can you tell me which features you primarily want to use on mobile?

mcndt avatar Feb 20 '22 22:02 mcndt

Wow i see your working already on this! I'm part of the insider Program, but i think for mobile the latest API Version is 0.13.24.

I like to see the reports and also stop/start a timer ;) Mostly i work remote and do my documentation stuff on the iPad so i don't have always to switch between Apps... and my iPad is always with me ;)

rolikeusch avatar Feb 22 '22 13:02 rolikeusch

I would also like this. I'm on Android, and I do tasks that don't use my computer (eg work around the house and on the go), so being able to operate toggl for them remotely is super important for me to accurately track stuff for comparing it to my estimated times.

SpongebobSquamirez avatar Mar 19 '22 22:03 SpongebobSquamirez

Hello! have there been any updates on this? Since we’re on version 15 i’m guessing there should be support for the fix you were talking about.. Do I have to change some settings to allow Obsidian to install the plugin! ty!!

Alex23rodriguez avatar Aug 25 '22 13:08 Alex23rodriguez

Same here. Any updates on mobile compatibility?

NaturallyAsh avatar Sep 08 '22 02:09 NaturallyAsh

Spent a few hours today attempting to get the plugin working on mobile. I used https://github.com/shabegom/obsidian-mobile-logging is useful to get error messages.

Starting from a manual install of v0.9.0, and changing the manifest to isDesktopOnly: false, the first error is SyntaxError: Invalid regular expression: invalid group specifier name. This is the result of a lookbehind regex in a dependent library, https://github.com/sindresorhus/normalize-url; either a monkey-patch of the regex or installing an older version should work.

The next issue is ReferenceError: Can't find variable: process. This seems to be a node globals not available in the browser environment issue; https://github.com/remorses/esbuild-plugins#esbuild-pluginsnode-globals-polyfill was one solution I tried. I added that to esbuild.config.mjs, and it adds the polyfill; the polyfill however has a bunch of issues with the lack of the globals variable itself though, leading to ReferenceError: Can't find variable: global.

An attempt to further monkey-patch the polyfill leads to a TypeError: Right side of assignment cannot be destructured, and as the mobile logger I was using does not provide further information on where the error is occurring, I wasn't able to make further progress. This is odd though, as even the polyfilled build was able to successfully activate on desktop, and there shouldn't be differences in syntax interpretation between desktop and mobile?

There might be a bit more work needed to fully support the mobile runtime - some of the dependencies do not seem to have been written with running in a browser environment in mind. Glad to see that mobile support is still an issue with support and interest - hoping others can also look into it and that we can continue sharing progress towards a solution!

leoccyao avatar Sep 09 '22 04:09 leoccyao

@leoccyao thanks for doing some research! It's most welcome. FYI I'm always open to merging contributions or taking on maintainers.

On a more general note, how would the plugin operate on e.g. a mobile phone? A big advantage of the desktop plugin is that the current timer is always present in the sidebar. On mobile, there is no static sidebar, the user must swipe on the right to reveal it, and even then there are many obscured tabs.

Of course the reporting feature is more straight-forward to port to mobile.

Any feedback on the desired user experience is welcomed.

mcndt avatar Sep 09 '22 20:09 mcndt

@mcndt As far as use cases on mobile go, I personally have two primary goals.

1st the reporting feature would be great. 2nd I would like to have the full timer functionality used by this quickadd script: github link

I don't use the sidebar timer that much to be honest. Thanks for developing this tool!

TLauzen avatar Nov 18 '22 03:11 TLauzen

@leoccyao thanks for doing some research! It's most welcome. FYI I'm always open to merging contributions or taking on maintainers.

On a more general note, how would the plugin operate on e.g. a mobile phone? A big advantage of the desktop plugin is that the current timer is always present in the sidebar. On mobile, there is no static sidebar, the user must swipe on the right to reveal it, and even then there are many obscured tabs.

Of course the reporting feature is more straight-forward to port to mobile.

Any feedback on the desired user experience is welcomed.

Any update on this? I would love to be able to get my reports to show up on my iPad. I don’t really use Obsidian on the iPhone much except as reference.

travelingflwr avatar Jan 12 '23 15:01 travelingflwr

@leoccyao thanks for doing some research! It's most welcome. FYI I'm always open to merging contributions or taking on maintainers. On a more general note, how would the plugin operate on e.g. a mobile phone? A big advantage of the desktop plugin is that the current timer is always present in the sidebar. On mobile, there is no static sidebar, the user must swipe on the right to reveal it, and even then there are many obscured tabs. Of course the reporting feature is more straight-forward to port to mobile. Any feedback on the desired user experience is welcomed.

Any update on this? I would love to be able to get my reports to show up on my iPad. I don’t really use Obsidian on the iPhone much except as reference.

No intention to develop this feature in the near future. I maintain this project for free (though I have received some kind donations through BMAC) because I use it myself, but I personally have no need for the mobile functionality. Hence it is difficult to justify the significant time commitment required to support mobile without financial support.

I don't rule it out in the future, but as things stand there is no priority to this.

mcndt avatar Jan 15 '23 13:01 mcndt