OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Remote File Location, having a Central (Server) location for data in apps
rodgos
post Jun 27 2020, 12:37 AM
Post #1





Group: Members
Posts: 67
Joined: 2-May 18
From: United Kingdom
Member No.: 822,018



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.
Go to the top of the page
 
+Quote Post
KMM
post Jun 27 2020, 09:18 AM
Post #2





Group: Members
Posts: 22
Joined: 18-February 20
Member No.: 865,897



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.
Go to the top of the page
 
+Quote Post
rodgos
post Jun 28 2020, 10:37 PM
Post #3





Group: Members
Posts: 67
Joined: 2-May 18
From: United Kingdom
Member No.: 822,018



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.
Go to the top of the page
 
+Quote Post
Zarhan
post Jun 29 2020, 05:55 AM
Post #4





Group: Members
Posts: 173
Joined: 27-June 19
Member No.: 850,871



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...
Go to the top of the page
 
+Quote Post
rodgos
post Jun 29 2020, 06:40 AM
Post #5





Group: Members
Posts: 67
Joined: 2-May 18
From: United Kingdom
Member No.: 822,018



QUOTE(Zarhan @ Jun 29 2020, 01:55 PM) *
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
Go to the top of the page
 
+Quote Post
Zarhan
post Jun 29 2020, 07:43 AM
Post #6





Group: Members
Posts: 173
Joined: 27-June 19
Member No.: 850,871



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.
Go to the top of the page
 
+Quote Post
rodgos
post Jun 30 2020, 05:56 AM
Post #7





Group: Members
Posts: 67
Joined: 2-May 18
From: United Kingdom
Member No.: 822,018




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
Go to the top of the page
 
+Quote Post
Zarhan
post Jun 30 2020, 10:58 PM
Post #8





Group: Members
Posts: 173
Joined: 27-June 19
Member No.: 850,871



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
Go to the top of the page
 
+Quote Post
Tom D
post Jul 1 2020, 09:02 AM
Post #9





Group: Members
Posts: 43
Joined: 5-January 18
Member No.: 815,874



QUOTE(rodgos @ Jun 30 2020, 08:56 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


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.
Go to the top of the page
 
+Quote Post
KMM
post Jul 2 2020, 03:16 AM
Post #10





Group: Members
Posts: 22
Joined: 18-February 20
Member No.: 865,897



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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 4th July 2020 - 08:05 AM