Accessing media and pdf files stored in the subdirectory of TW folder in android

Thank you @saqimtiaz
I had already installed RCX in my phone when I saw the discussion you linked before. But today only I learned to use it properly.

I used RCX to serve my onedrive folder of TW files and it’s was able to access the local images which were embedded in the wiki. Accessing local pdf is still a problem. When I click on the pdf link, it tries to download pdf file and a download dialogue box pops up to select the download location.

Also how does saving TW file works with RCX. When I tried to save the wiki, again the download dialogue box pops up to select the download location.

Can to provide a screenshot of the app you use. When I searched in palystore for simplehttpserver, there were a few apps with similar name in the search results.

1 Like

Does this help?

I tried using this app…but it was showing not found message when I tried to load the TW file

Now I figured out how saving works with RCX. No need to click the save button.

This is still a problem

Do you know for sure that your chosen Android browser can view PDF files inline ?

1 Like

That must be the problem. Is there any workarounds ?
Saw this article Open PDF files directly in Chrome for Android - Android Enthusiasts Stack Exchange

I think its ok if I am not able to open pdfs in mobile from the TW file.

Wondering how @clsturgeon was able to do it ?

Did a quick test of RCX. Indeed, it works with minimal fuss :slight_smile:

Opening of pdf with RCX needs further exploration, perhaps somebody can advise:

a. Using mobile Firefox browser, pdf can be opened with long press on pdf link → Open link in external app → select “Drive PDF viewer” (i.e. Google Drive). Short tap on pdf link or selecting other PDF viewer will download the PDF instead.

b. Using mobile Chrome browser, pdf can be opened once directly with a short tap on pdf link. Chrome silently downloaded that pdf and opened it with “Google PDF viewer”. Once that pdf is downloaded in Chrome Download directory, subsequent tap on pdf link will prompt to download the pdf with a non-colliding name. If you delete the downloaded pdf in Chrome Download directory, short tap on pdf link will directly open the pdf again without further prompt. Long press on pdf link offers a “Preview page” option (which failed with “Preview page content is not viewable”) but no “Open link in external app” option.

c. “Google PDF viewer” and “Drive PDF viewer” came about on my phone from earlier exploration with TW5 and pdf files. I can’t recall exactly how they were installed.

RCX definitely works- it easily loads the local images in subdirectory of my wiki. I just had some doubts regarding the time taken for syncing to the onedrive folder.

Using Firefox seem like a better option I think from my short testing. It will allow to open the pdf in an external app or in the Google/drive pdf viewer.

Why I am so much interested in viewing pdf is bcos I have created a tiddlyclip configuration to open a specific page in the pdf on clicking the link attached to the clipped text based on this code
https://kookma.github.io/TW-Scripts/#demo%2Fexmp026%2Flink-pdf-use-tiddlerpath

This works well in desktop. I guess it won’t be possible in mobile.

I have not reviewed this recently. I recall having been unable to open pdf files in the browser with Chrome, Firefox, and Opera. The best I came up was using Samsung Browser. It provided an option to open the pdf in the viewer.

I tested SimpleHttpServer on Android as well. It simply works, like RCX :slight_smile: The behavior of mobile Firefox browser and mobile Chrome on PDF document with SimpleHttpServer are similiar to that with RCX. SimpleHttpServer is much smaller though and I suspect runs with less overhead than RCX. However, I will stick with RCX simply because it can run on localhost internally on the phone without sharing files on the phone’s wifi/mobile network. My usage of TW5 is local within the phone anyway. SimpleHttpServer defaults to the phone’s wifi/mobile network on port 12345. For info.

3 Likes

Hi everyone,
I am us going RCX in my android phone to serve my TW files saved in a one drive folder over WebDAV server. There some pdf files and images in the subdirectory of the TW file. I am embedding the pdf file in tiddlers using _canonical_uri field with relative path of the file. It works in desktop and opens the pdf. But not in mobile broswers (tried both chrome and Firefox). Tiddler shows a message- plug in not supported -in chrome. Tiddler is blank in Firefox. Any suggestions?

A quick search for “android chrome embed pdf” got me this link:

https://support.google.com/chrome/thread/68561173/android-chrome-browser-don-t-preview-pdf?hl=en

1 Like

I was not expecting chrome to open pdf. But what happened to Firefox. Is firefox behaving the same for others also. I wanted to know whether the firefox behaviour is a bug because the TW wasn’t working well in android firefox. I was wondering whether this was due to some plug ins installed in my wiki. Previously firefox used to work nicely with TW.

1 Like

I don’t know if it will help in this case but it seems like it might. You can give “Open Link With” a try:

It helps me in a handful of corner cases where the browser (or the wrong browser) opens up by default.

/Mike

I found a workaround using Kiwi browser. It allows chrome extensions like pdf viewer. This let’s you to see the embedded pdf within the tiddler.

I believe if you install a good PDF viewer app it will add viewers into at least the common browsers. I have not had problems viewing and embedding PDF in Chrome and FireFox. I am an enthusiastic user of the FoxIt PDF Reader.

But we’re talking about Android here, where the mainline browsers shut down almost all extensions.

Perhaps, but FoxIt reader has mobile apps as well. I would need to test different combinations to be sure.

However my point is typically if you want support for any particular file format, PDF included, you need to install that support on the device where you want that support, and good support integrates with the browser.

  • Many mobile devices I use, primarily Android, already handle PDF adequately, for me it is a “non issue”.

I don’t know if it’s matter of the Firefox for Android version (2024, v. 126.0.1), but I’m viewing embedded PDFs in tiddlers just now (using the _canonical_uri + application/pdf type way, pointing to a path like “sub/sub/directory/file.pdf”).

I was using Tiddloid, where embedded PDF files doesn’t load, so I tried with RCX + Firefox and works like a charm, no additional extensions needed in the browser.

Notes:

  • In RCX + Firefox for Android + TW, tiddlers with PDF files embedded via iframe will freeze the tab where the TW it is being displayed.
  • I’ll keep Tiddloid for regular work in Android, and will use RCX when needed.