Posts: 1,878
Threads: 290
Joined: Sep 2014
Reputation:
32
04-22-2016, 07:49 AM
(This post was last modified: 05-05-2016, 03:07 AM by itsme.)
If the tablet is restarted while MSP is running, it happens "sometimes" (I have not yet investigated the exact conditions when this happens) that MSP reports "database not found, shall the internal backup be restored" or the like. If I answer "No" the library is empty, if I answer "Yes" it seems to work and the restored library seems OK.
BUT: the database is NOT restored to the original directory on the external sdcard that was set before:
/storage/sdcard1/Android/data/com.zubersoft.mobilesheetspro/files
but to SD0 instead.
Now mobilesheets.db exists twice, on SD0 and SD1. The previous one on SD1 is still OK, I can change the path and use it again.
Not a big deal, I know how to handle it and can easily fix it manually. But it should not happen. It's too easy to mix it up, backup the wrong database and rely on an outdated backup that does not contain later changes.
Posts: 277
Threads: 45
Joined: Oct 2014
Reputation:
0
(04-22-2016, 07:49 AM)itsme Wrote: If the tablet is restarted while MSP is running, it happens "sometimes" (I have not yet investigated the exact conditions when this happens)
I have noticed unplugging the charger on my phone sometimes causes apps to restart. Maybe something like that is causing the problem.
I'll let Mike answer about the moving database
Andy
Posts: 1,878
Threads: 290
Joined: Sep 2014
Reputation:
32
This post is to report the MSP issue.
One example in my case was caused by Google Now: it is started by swiping up the Android buttons, but I don't use it and don't want to. If I did that swipe accidentally Google Now was opened and invited me to join. Without internet connection that caused a message saying "no internet connection" and that well-known spinning button and prevented all other actions for a long time. To stop that I often had to restart my tablet. The final solution was to install a little app that links into that "swipe up buttons" action and replaces starting Google Now by a menu that allows starting other apps.
Posts: 13,389
Threads: 302
Joined: Apr 2012
Reputation:
237
That problem would indicate that your device is taking a very long time to mount the external SD card upon reboot. My app waits about 10 seconds for the external SD card to be mounted (if the storage location points to an external SD card), and in the case that it isn't mounted in that time, it reverts to internal storage. That is really strange that your device is taking that long to do that though. If people want, I can change the behavior so that my app will wait for awhile for the SD card, and if it isn't detected, prompt the user for what to do (wait longer, switch to internal storage, close the app).
Posts: 13,389
Threads: 302
Joined: Apr 2012
Reputation:
237
This should have been fixed in version 1.4.6 (you will be prompted as to what action you want to take), so please let me know if you see it again.
Posts: 1,878
Threads: 290
Joined: Sep 2014
Reputation:
32
05-04-2016, 07:37 AM
(This post was last modified: 05-04-2016, 07:37 AM by itsme.)
Yes, the issue is fixed. When I restart the tablet while MSP displays a song, the new option dialog is shown when restarting MSP. I select "continue waiting" and everything is fine. Many thanks.
May I propose an additional option: let the user replace the storage directory by a different one.
I ran into an issue when I switched from Android 4.2 to 4.4 and back. The different Android versions had changed the folder name of the SD card's root directory. There are other reports in the forum that make me think that this also happens with other Android versions.
Currently the only possibilities to fix this are either moving all the data to the internal memory or using Sciurius' (excellent & useful) external tools.
see
http://zubersoft.com/mobilesheets/forum/...p?tid=3144
http://zubersoft.com/mobilesheets/forum/...p?tid=2978
Posts: 7
Threads: 1
Joined: Nov 2014
Reputation:
0
I am using an Acer Iconica tablet, Android 5.1
I moved the Mobile Sheets Pro app to the sd card (sd1), however the database that informs the app still points to sd0, so I cannot load any of my music files. I could batch import from the new location on sd1 I suppose, but then I would lose all the metadata connected with the files - genre, collections, setlists etc.
How can I change the database to refer to the new location, but retain all the other information about all my music files?
Posts: 13,389
Threads: 302
Joined: Apr 2012
Reputation:
237
You can do this if you expose the database file in the storage settings, transfer that file to your PC, use an application such as sqliteadmin to open the database, run a query on the database to update all paths so they reference sdcard1 instead of sdcard0, then drop the database back on the database and reload the application. A command for updating the database would be something like:
UPDATE Files SET Path = replace(Path, '/sdcard0/', '/sdcard1/' ) WHERE Path LIKE '/sdcard0/%'
You'd obviously need to put the exact path in place of /sdcard0 and /sdcard1.
Mike
Posts: 1,341
Threads: 99
Joined: Jul 2013
Reputation:
6
(05-05-2016, 08:52 AM)Zuberman Wrote: You can do this if you expose the database file in the storage settings, transfer that file to your PC, use an application such as sqliteadmin to open the database, run a query on the database to update all paths so they reference sdcard1 instead of sdcard0, then drop the database back on the database and reload the application. A command for updating the database would be something like:
UPDATE Files SET Path = replace(Path, '/sdcard0/', '/sdcard1/' ) WHERE Path LIKE '/sdcard0/%'
You'd obviously need to put the exact path in place of /sdcard0 and /sdcard1.
Crikey!
This is all very well for the more computer literate user, but this is an app primarily used by musicians not tech experts. It might as welll be written in Ancient Greek for a lot of your customers.
Is there not another way to handle this problem?
Posts: 13,389
Threads: 302
Joined: Apr 2012
Reputation:
237
Moving the application directory without doing it through MobileSheetsPro itself is not recommended for anyone. If the user changes the MobileSheetsPro storage location in the MobileSheetsPro settings, all of the files will be properly moved and the database will be updated to reflect those changes. There is no benefit to trying to move the application through the OS unless this done before the library is constructed.
Mike
Posts: 1,047
Threads: 112
Joined: Dec 2015
Reputation:
11
Please refer also to the Marshmallow Thread in which Sciurius provided me a Perl tool to solve a similar problem due to the marshmallow update. Much easier to use than sqlite.
Posts: 7
Threads: 1
Joined: Nov 2014
Reputation:
0
So, if I move the app back to tablet storage, via the OS settings process, my files should be able to be accessed as before?
Then I could move the storage location to the SD card by using the MobileSheets settings, then the database will be updated to point to the new storage folder?
Posts: 13,389
Threads: 302
Joined: Apr 2012
Reputation:
237
In theory, yes, as long as the paths all remained the same as they originally were.
Posts: 7
Threads: 1
Joined: Nov 2014
Reputation:
0
(05-06-2016, 03:43 AM)Zuberman Wrote: In theory, yes, as long as the paths all remained the same as they originally were.
Success. I copied my file folder to the folder that MobileSheets said was empty and it all works again - thanks for the help.
|