ZotDroid - A Zotero Client for Android

189111314
  • Hi,
    I have webdav working when attachments are stored in the default location (/storage/emulated/0/Documents/ZotDroid). However, I wish to use an SD card for storage. When I change the configuration to /storage/0000-0000/ZotDroid (this is on a samsung galaxy A3 2016 running android 7.0) I get the error : "Error: Could not find file to download. Please check your webdav settings and make sure the download directory exists......"
    For this I added an attachment and a temp directory to the ZotDroid directory.
    So 1) webdav works, 2) the download directory exists. Now what is wrong?
    Does anyone have a suggestion?
    Paul
  • Hello there.
    I've noticed a few folk have trouble saving to "Real" external storage. It's something I can't test because I don't have an android device that takes an SD card. I've tried to replicate this in an emulator and it appears to work.

    I suspect that some form of sandboxing or similar is happening, or permissions. I've followed the google guide for saving files to external storage but the term 'external storage' can refer to a few things it seems.

    I need to find the solution and put out another update I think. It's just a shame I can't test it. I'll try and get access to an android phone and a willing tester.

    Cheers

    B
  • Out of curiosity, can you try saving to '/sdcard/ZotDroid' and see what happens? I believe Android might use symlinks or similar that have the correct permissions.
  • edited June 11, 2018
    @OniDaito : /sdcard is not a symlink to the external sd card

    I created a folder on the external sd called zotdroid.
    With the path /storage/XXXX-XXXX/zotdroid I got an error.
    With /sdcard/zotdroid I can download and access files, but it stores the files in /storage/emulated/0/zotdroid

    I would also like to use my external sd card as storage. Internal storage is limited and I have some large documents in my library.
  • I'll need to look into this further but one of these is a symlink or similar I believe. /storage/emulated/0 I think maps to the same place as /sdcard, or at least it is on the devices I've tested. I'm attempting to hunt down a real device with an SD card slot but I don't have one to test with at present
  • edited June 15, 2018
    @OniDaito when I looked into a similar problem with a different software, I found the Android developer guide very hard to understand on this issue. I think the developers don't really want apps to use removable media. Also, this all has changed significantly at least twice between Android version 4.3. and 7. Before 4.3 you could access it like when plugging it into a desktop computer. But that was seen as a security risk, so now apps are extremely limited in what they can do on a removable SD card. This site gives a bit of insight: https://commonsware.com/blog/2017/11/15/storage-situation-removable-storage.html

    As you say, "external" confusingly means the (inbuilt) memory that non-system apps use. When you first plugin an SD card, the system asks you if you want it reformatted (in which case it becomes part of this "external" storage, but can't be taken out and used on any other computer any more), or keep it as a "removable storage". I think what people are asking is when the SD card is kept as removable storage, so you should search the docs for "removable storage", not "external". But documentation on that is hard to find.

    Now, because a removable SD card can be manipulated on another computer, so it can contain malicious code, Android is very restrictive on what user apps can do on removable storage. If I remember correctly, an app can only access its own specific directory, which is something like /sdcard/xxxx-xxxx/Android/data/yyy.yyyyy/files where yyy.yyyy is specific for the app (e.g. com.adobe.reader for the Adobe Reader). This restriction is for security so that one malicious app can't manipulate data from other apps and mess up the system.

    The user can create other directories on the SD card on a computer or with the Android file manager (being a system app, this has more power) but your app won't be able to use it, you can only use the above path.

    Also your app has to request the permission to use removable storage explicitly. How to do that is explained here (but I'm not sure which permission exactly is needed): https://developer.android.com/training/permissions/requesting


  • @smatthie thanks a lot for that! That's really good of you!

    I'd gotten most of the way there, including requesting permissions. Zotdroid should ask you on first use, but really, it should probably ask when you try and change directories.

    The real gem in all that is which directory we are actually allowed to use! Now that is very handy knowledge and not something that I'd managed to find.

    I need to get hold of an actual device to test this on at some point. I'll see about that.

    thanks!
  • Somehow I cannot download attachment from the BOX WebDAV. The connection check is successful, but nothing get downloaded.
  • Hello there.
    First thing to try - make sure the URL has "/zotero" at the end of it. It's caused a few problems with Box before now.

  • Hi @OniDaito, do you know if anyone has successfully set up ZotDroid to use the webdav option to store / retrieve attachments on OneDrive?

    ZotDroid looks like it is developing into a very capable Android client for Zotero and if it means I could come off Zotero storage it would be a real bonus!

    I've read through the OneDrive posts in the forum but none look like they have worked and none refer specifically to ZotDroid.

    Thanks.
  • Hello @richard.masters
    Thanks for getting in touch. I've not used OneDrive - I'm not familiar with it. I seem to recall a few folks have had some sucess. Under the hood, ZotDroid uses simple WebDav to do all it's moving around and so if OneDrive supports that, it should work fine.

    I suspect I will need to write some tutorial pieces on the website for each of the major storage providers. Once I've gotten through my final thesis writeup, I'll be looking into this.
    Cheers
    Ben
  • Hi @OniDaito
    I've now tried WebDAV with CloudMe, which provides a straightforward WebDAV implementation and I'm getting the same error as with OneDrive.

    The error is "Connection failed: Failed to access: https://webdav.cloudme.com/richardm/CloudDrive/zotero.2131623980"

    I think this is the same error as an earlier poster.

    Is there any way you can figure out the problem and fix WebDAV functionality - it would be extremely useful!

    Thanks
    Richard
  • Hello there,
    Thanks for getting in touch. Looking at your URL, it appears that there is a '.' where there shouldn't be.
    Double check the server string in the settings. It should be:

    https://webdav.cloudme.com/richardm/CloudDrive/zotero/

    It's becomming clear that this is causing trouble for users, so as soon as my MRes is submitted at the end of september, I'll be adding a proper error warning and check for this.

    Cheers
    Ben
  • Hi @OniDaito

    I have now got Zotero and ZotDroid synchronising file attachments successfully with pCloud over WebDAV!

    Getting the local Android file storage and WebDAV set up and working was a bit fragile in terms of the sequence of actions taken, but it's good that it's working now.

    Now that is working I can really see how ZotDroid can become a key part of my research process, but I would like to see a couple of feature improvements for it to be more powerful:

    * Sync the URL field and make it active in ZotDroid.
    * Sync any "Link to URI" entries (under "Add attachment") and make them active.
    * Make any URLs in notes active.

    Would it be possible to add these functions once you've got some breathing space?

    Many thanks Ben,
    Richard

  • Hello Richard,

    Thank-you for your feedback! I think there are definitely things we can do here.

    Adding fields should be no problem, although folks have begun to complain about the UX so I need to consider carefully where these extra fields will go.

    Active notes might work if I can get local HTML support in notes which is... tricky on Android.

    I'm not familiar with the link to URI bit but I think I know what you mean. Attachments that are links right?

    Cheers

    Ben
  • Hi Ben

    Thanks for the positive response. Yes, in Zotero on Windows when you right-click on an item the context menu offered has "Add attachment" with a sub-option of "Add link to URI". Here you can supply a URL and optional title.

    Thanks,
    Richard
  • Hi Richard

    That's no problem I think. It's simply a case of figuring out the UX which has been a criticism. I think I'll start adding these in the next release anyway, whilst thinking about the new design.

    Eventually, I'd like a two way sync with ZotDroid feeding back to Zotero but that's a much more dangerous path and requires more thought :)

    cheers
    Ben
  • Hi Ben, I have installed ZotDroid on Android 8.0.0. Everything worked well on first registration of my credentials, whereby my entire library was downloaded/synced. However, after that, syncing no longer works: I get no updates/changes in my upstream library. Whenever I scroll down a list of items, I just see a red circle arrow and 'Nope!'. I can still "Reset and Sync" the whole library, though, but that's not very handy.
    Thank you and best wishes,
    Marco
  • Hello Marco
    Interesting! I think the 'nope!' message appears at the top of the list right? For now, scrolling up does nothing, hence the message. As a little test, if you update your library and then sync, try changing the order (by Author or by title) and see if your new items appear.
    The default ordering of items is simply however they are listed in Zotero which seems to be a bit random.
    I wonder, perhaps I should highlight new items that have been added since last sync. That's not such a bad idea.

    B
  • Nope! :-)
    Even if I select Sync with Zotero from the menu and try changing the order as you suggested, new items do not appear.
  • Hello @prufrockjalf
    Are these full items - entries and not a hanging pdf with no parent? Is this in a shared collection or your own, personal library? Where are you adding the new items to? A subcollection or right at the top?
    Cheers
    Ben
  • Hi Ben, actually, it turns out you were right, the new items get synced. But they are somehow hidden. I changed the order by Author or Title, and then switched back to Order by date modified, as I am more accustomed to. There I expected the new added items to be on top of the list, but they are not. I can only find the new added items by searching by keywords. It would be indeed nice to have the new added items highlighted. But also to have them in the correct date order.
    Thank you for you patience,
    Marco
  • I think that's going to be one of the high priority things to add I reckon. Thanks for the feedback! :)
  • What can be done with this app? After sync there is a chronological list with titles and urls which open to a " Benjamin computer"page which is gibberish. The other list is alpha list of collection titles which all lead to a Back button when selected. No attachments or notes visible. No input in this app?
  • That sounds like two things:
    a) I probably need to write more and better help pages
    b) I suspect you've filled in the webdav server list incorrectly?
    I'm having a hard time following what you've said but I'll certainly add these two items to the list of things to do.
    B
  • @ OniDiato, I just bought the zotdroid from the playstore. I am using it on Huawei M3, android 7.0. I had problem with webdav. I am using the box.com webdav service. I select use personal webdav storage enabled, key in my webdav username and password. For the server address, I put https://dav.box.com/dav/zotero/ However, when i try to test personal webdav, i got the error message "connection Failed: Failed to access: https://dav.box.com/dav/zotero/.213....... " Please help with this. I
  • Hello @siechuong
    We've had a couple of problems with box.com for some reason. Not quite sure why. The 'TEST' function doesn't work with box as certain commands aren't supported. Rather than test, simply go with sync. I'll be using a different test method in the next version that box.com supports.
  • Note that Box.com is ending their WebDAV support entirely, so I wouldn’t spend much time trying to troubleshoot it.
  • It's because the 'test' function uses 'PROP' webdav request (I believe, but basically not GET or POST) and box doesn't support that, whereas others do. The WebDav works fine aside from that. I've not decided on a better way to test the webdav collection without attempting a download of an existing file.
  • Hello,
    I just installed the app for the purpose of adding the epubs and pdfs I'm reading on my phone to Zotero. But I don't see to be able to find how to do that, there seems to be no option to add files form your phone. But it does exist, I presume? Since if it does not, then I don't know, what would be the function of the app (except for browsing you library).
    Best, Izidor
Sign In or Register to comment.