Author Topic: Remote File Location  (Read 2871 times)

rodgos

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Remote File Location
« on: June 27, 2020, 04:37:10 am »
This is a bit of a flyer. I'm a bit of a fan of databases, and have a good number on my old psion netBook.Unfortunately, I've not really succeeded in transfering these to the Cosmo. The files will transfer, (as .csv) but empty fields in the source do not get installed in the target, so all the data is mislocated across many fillds
However, there is another problem. With a number of Android devices, it is not very satisfactory to have, say a data file instlalled on mulitiple devices, since there's no real way of keeping them in sync. It would be better to have a central server, which holds a single copy, which can be accessed by a number of devices.  Taking Data as an example, we're not given the opportunity to locate the data file anywhere but where the app puts it, wherever that might be We don't have even the opportunity to locate the daa file in the SD card, if we have one. I've a reasonably large collection of video files on a NAS unit, which is accessible by almost every device I have. On the Cosmo, the CX File explorer allows me to stream the video content, with ease, from the NAS init.
Does anyone have any idea how the same facility can be obtained for files generated on individual devices? It would ertainly widen the scope of the Cosmo quite markedly.

KMM

  • Newbie
  • *
  • Posts: 29
    • View Profile
Remote File Location
« Reply #1 on: June 27, 2020, 01:18:29 pm »
I don't think I fully understand what you mean, but Jellyfin, EMIT and Plex come to mind... check these out and see if they could be what you're looking for.

Or, use Google Remote Desktop.
« Last Edit: June 27, 2020, 01:24:35 pm by KMM »

rodgos

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Remote File Location
« Reply #2 on: June 29, 2020, 02:37:30 am »
I thought I made the cas e clear. However, let me put it another way. if I create a new database in Data. The device , whatever it is, will store that database as a file. We're not told what the file will be called, or where it's stored. Now a database is a store of knowledge, generally about data which is not a part of the device. it might be, say a database of a book collection, distributed about the house. The database will, perhaps tell me the Title, the Author, the Genre, the location of the bookcase and the shelf the book is on. All this data is relevant to things held external to the device, but the data is only local to that device. If I want to see this data on another device, I can copy it from the one to the other. But that gives me two databases, which are not linked to each other. If I add more book titles to one, I have to carry out the same exercise on the other. It makes sense to have the database source file held centrally, on a server, which the app on all devices can access. Since this is in Android, then theoretically (and hopefully, practically), this data can be accessed from any Android device. On my Linux machines, I have Calibre as my books database, and I can read any book therein whilst attached to the LAN. Now, Calibre is a physical database, it holds the actual book file, whereas Data is a knowledge database which holds only information on the book, and not the book itself.
In the days of yore (not very lonhg ago, you probably only had one device, and a database on that device was sufficient, but now, with most of us having a number of similar devices, phones, tablets desktop machines it makes sense to have central storage and access.

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Remote File Location
« Reply #3 on: June 29, 2020, 09:55:20 am »
From what I'm able to gather, there is no way to make e.g. windows file shares (Samba mounts) visible in Android as a storage directly to apps (just like internal storage is). If there is a method to that, someone can point that out.

However, you *can* mount samba file shares in general.

So what I think you can do is:

  - Root your phone
  - Mount your samba share
  - Do a bind-mount or symlink (As root) from the application's data storage directory to your network drive mount point

Haven't tested.

Obvious solution is of course just use Google drive...

rodgos

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Remote File Location
« Reply #4 on: June 29, 2020, 10:40:01 am »
Quote from: Zarhan
From what I'm able to gather, there is no way to make e.g. windows file shares (Samba mounts) visible in Android as a storage directly to apps (just like internal storage is). If there is a method to that, someone can point that out.

However, you *can* mount samba file shares in general.

So what I think you can do is:

  - Root your phone
  - Mount your samba share
  - Do a bind-mount or symlink (As root) from the application's data storage directory to your network drive mount point

Haven't tested.

Obvious solution is of course just use Google drive...

Actually, there is such a facility. to use remote files in an app.VLC has the facility to load video from devices on the LAN, in addition to files held in local storage. But this does noy get round the problem of not knowing where, in the present case, the files are stored, nor the name of the file. If that was known, there is a possibility that the the file could be a link to a remote file

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Remote File Location
« Reply #5 on: June 29, 2020, 11:43:12 am »
I still don't quite get what you are trying to do. Is your problem the lack of import/export of data from applications?

Or the fact that applications save their data to their private folders (on android, they are kept separate) with no view on what's going on.
In the latter case, rooting + mounting a shared location to the app's own directory might indeed work. So you no longer need to care. Just like you can tell apps to save their data on an SD card, you can tell them to put it to your network location of choice.

I still don't quite get what your problem exactly *is*. Proprietary formats? Don't use such apps.

rodgos

  • Jr. Member
  • **
  • Posts: 68
    • View Profile
Remote File Location
« Reply #6 on: June 30, 2020, 09:56:18 am »
The particular point is that since on creating a database, the user is given no choice as to where and what is the file that is holding the data. Even Windows (At leastwhen I did actually use Windows, a good few years ago) offered to locate the saved files in a directory (folder) of your choice. If Planet Data had this facility, it could be located remotely, such that any Android device which could access for read and write, could use a single data set. As it stands, you have to have identical databases on every device that you want to use, with no way of syncronising any of them. So a single exta piece of data has to be entered by hand on every device. Which is totally unworkable.
I did create  a test database, both on an Android phone, and on the Cosmo, and then searched for where the data file might be. I did, eventually find a file structure in >Android>data>com.prpla.gemini.data.file, bu it only records an empty folder. I even ran (on the Cosmo) as rooted Android but that too showed an empty folder. Always assuming that the machine was actually running rooted, since there seems no obvious way of establishing the fact. I am aware that the user functions in Android are quite capable of telling you that a directory is empty, when in fact it does hold files. But I would have expected them to show in the rooted version.
The import of database using .CSV (Comma Separated Values), does not work either. .CSV does not actually import a database, it simply imports the data. To use it, you have to creatte a new, empty database on the new device, with the same field structure. Then use the import facility to populate the database. But this does not work, either. It is quite legitimate to have a database with empty fields. Perhaps for that item the field does not apply, or that item of data is not known. But what does happen on import, is that the data which should be entered in the next field, is, in fact, put in the field which should be empty. Then all subsequent data in that entry is in the wrong place. On my Psion netBook, I have seventeen databases, some of them I'd love to have on the Cosmo, Even if they were nowhere else, but the required multiple correction make it not worth the effort. particularly since they cannot easily be kept in sync

Zarhan

  • Sr. Member
  • ****
  • Posts: 363
    • View Profile
Remote File Location
« Reply #7 on: July 01, 2020, 02:58:32 am »
Ok, so your beef is actually with Planet Data? Well, don't use that then!

How about using something else? Like just plain sqlite?

https://play.google.com/store/apps/details?...nager&hl=en

Tom D

  • Newbie
  • *
  • Posts: 44
    • View Profile
Remote File Location
« Reply #8 on: July 01, 2020, 01:02:29 pm »
Quote from: rodgos
The particular point is that since on creating a database, the user is given no choice as to where and what is the file that is holding the data. Even Windows (At leastwhen I did actually use Windows, a good few years ago) offered to locate the saved files in a directory (folder) of your choice. If Planet Data had this facility, it could be located remotely, such that any Android device which could access for read and write, could use a single data set. As it stands, you have to have identical databases on every device that you want to use, with no way of syncronising any of them. So a single exta piece of data has to be entered by hand on every device. Which is totally unworkable.
I did create  a test database, both on an Android phone, and on the Cosmo, and then searched for where the data file might be. I did, eventually find a file structure in >Android>data>com.prpla.gemini.data.file, bu it only records an empty folder. I even ran (on the Cosmo) as rooted Android but that too showed an empty folder. Always assuming that the machine was actually running rooted, since there seems no obvious way of establishing the fact. I am aware that the user functions in Android are quite capable of telling you that a directory is empty, when in fact it does hold files. But I would have expected them to show in the rooted version.
The import of database using .CSV (Comma Separated Values), does not work either. .CSV does not actually import a database, it simply imports the data. To use it, you have to creatte a new, empty database on the new device, with the same field structure. Then use the import facility to populate the database. But this does not work, either. It is quite legitimate to have a database with empty fields. Perhaps for that item the field does not apply, or that item of data is not known. But what does happen on import, is that the data which should be entered in the next field, is, in fact, put in the field which should be empty. Then all subsequent data in that entry is in the wrong place. On my Psion netBook, I have seventeen databases, some of them I'd love to have on the Cosmo, Even if they were nowhere else, but the required multiple correction make it not worth the effort. particularly since they cannot easily be kept in sync

Yeah, I think you are having an issue with Android itself. App can't just read and write anywhere they want due to Android security. App are restricted by Android as to the folder they can write to. That is standard android behavior.

As for apps on several devices at the same time - you are really looking for a web-service at that point. No way is an Android Database going to have permissions to write out to network folders like in the Windows Desktop world. Instead, you would replace that functionality by using an app that has a server, and writes are made to the server via a web-service. That is a totally different animal and requires hosting a server somewhere. For instance, Evernote does this because your data is hosted in the Evernote cloud - their servers. All of your apps are communicating with the Evernote server. This is way out of the realm of anything Planet should be doing with their applications.

So this is not a Planet Computer's issue.

KMM

  • Newbie
  • *
  • Posts: 29
    • View Profile
Remote File Location
« Reply #9 on: July 02, 2020, 07:16:34 am »
Either use Google Remote Desktop to access the file you store on your PC or use Google Drive. There must be one central location where you store the database.