evancharlton / android-mileage

Automatically exported from code.google.com/p/android-mileage
10 stars 15 forks source link

Import/Export not reading/writing files #66

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am transitioning to a new phone. From my old phone I export:
1. go to Import/Export
2. click "Export data"
3. leave choices as "Database" and "mileage-export.db", click "Export data"

Result:
message says:
Exporting to mileage-export.db ...
Exported data to mileage-export.db!

4. connect phone to laptop and look at files using Android File Transfer.

Result: mileage/ directory only contains "mileage-backup.db" file and not the 
new "mileage-export.db" file.

There is no SIM card in the phone, so I think the internal memory card is the 
only place it could be going, and I should be seeing the file in the Android 
File Transfer app on my laptop.

I tried to move data over to the new phone my copying the "mileage-backup.db" 
from the old phone onto my new device. Steps:
1. copy the mileage/ folder with "mileage-backup.db" onto my new phone (copied 
to laptop and then to new phone using Android File Transfer, verified it was 
there)
2. start Mileage app

Result: data does not appear. 

Then I tried importing that file:
1. choose "Import/Export"
2. choose "Import data"
3. leave drop-downs as "Database (*.db)" and "mileage-backup.db", click "Import 
data"

Result:
log messages say:
Starting import...
Make a backup of the current db...
Upgrading database...
Database upgraded...
Cleaning up...
Import finished!

However, when I go back to the app, the History, Statistics, and Vehicles tabs 
show no data.

The mileage-backup.db file is 19 KB, and in the app on my old phone it shows 
about >30 entries.
When I try to scroll through older entries from a previous vehicle, the app 
crashes. Perhaps the data is corrupted and that's why it can't export? If 
that's the case it would be preferable to get an error message and/or a partial 
export/import.
I did delete the vehicle that was causing the problem, but the results of the 
Export process are the same.

Mileage version: 3.1.1 (both phones)
== Old phone:
Android version: 4.3
Device: Galaxy Nexus
== New phone:
Android version: 5.0
Device: Nexus 5

Original issue reported on code.google.com by andrea.f...@gmail.com on 29 Nov 2014 at 4:30

GoogleCodeExporter commented 9 years ago
After a reboot of the old phone, the files started showing up in Android File 
Transfer.
After a reboot of the new phone, the data that I imported was showing in the 
app.
Looks like adding a note about reboot to the instructions might be helpful for 
users since this was a problem on 2 different phones with 2 different versions 
of the OS. Glad it's not a bigger issue!

Original comment by andrea.f...@gmail.com on 29 Nov 2014 at 10:14