NomarCub / obsidian-copy-url-in-preview

Image Context Menus - Obsidian.md image context menus: copy, open in default app, show in system explorer, reveal in navigation context menu. Also Open PDF externally context menu.
MIT License
63 stars 8 forks source link

The plugin doesn't seem to work on Android #5

Closed mnaoumov closed 2 years ago

NomarCub commented 2 years ago

It works for me, and looks like the way it does in the readme. Please be more specific. What did you do, what doesn't work that should?

mnaoumov commented 2 years ago

I'm sorry I was not specific enough. Yes, copying urls from links works. But tapping on the image doesn't work at all on Android. It works on computer though

NomarCub commented 2 years ago

I see. As far as I know Android doesn't have a clipboard concept for images. I guess a share dialog would make sense there. Is that what you thought should happen?

mnaoumov commented 2 years ago

@NomarCub yes! Ability to share the image is the must.

P.S. I am a programmer myself but I have zero experience with mobile development. When I was dealing with this issue I was trying to debug it by myself. I googled how to debug Electron apps on Android and I found literally nothing. Can you please share some links? I would like to be learn to debug and patch plugin like yours to send my Pull Requests

mnaoumov commented 2 years ago

I recorded a video to show the issue. I think for completeness of the bug report it'd better be added here

https://user-images.githubusercontent.com/735878/165522046-437aa6a7-c045-4882-9c58-7d94593de955.mp4

NomarCub commented 2 years ago

Thanks for the offer!

I'm not that good with web and mobile, but I've got some info I've gathered for plugins in Obsidian. You can debug the Android app by plugging the phone in debug mode, and opening chrome://inspect on your host browser. Here's more info about this from the Obsidian Discord. You can also emulate mobile on the desktop (although I'd guess that doesn't have Android specific features).

There is now a mobile emulation flag that can be used to emulate mobile mode. Use app.emulateMobile(true) to turn on emulation and app.emulateMobile(false) to turn off.

This site has some useful info about Obsidian plugin development and further pointers to other resources and developer communities.

NomarCub commented 2 years ago

Thank you for the contribution! I merged your PR and will make a release soon.