Additional fixes:
- In SendDocsAsyncTask, check that the activity is not null before
using it.
- In SendDocsUtils, close the GDataParser in the finally block.
- When catching an exception, always log it.
to show progress bar and an AysncTask to send
to Google Docs.
Future plan:
Plan to place common code across SendDocs, SendFusionTables,
and SendMaps in abstract classes.
Also fixed the following:
in uploadAllTrackPoints, introduce a "readCount" variable
rather than using the zero based index "i".
in prepareAndUploadPoints, add a lastBatch parameter
so can include the (Part 1) marker if there is more than
one segment.
in prepareTrackSegment, set a new segment's stop time
to the last location's time.
to send to Google Fusion Tables.
Use an AsyncTask to send a track to Google Fusion Tables.
Fix bugs with retry logic, screen rotation, sending
results back to SendActivity.
Benefits of the refactor:
- can support screen rotation when choosing an account
- reduce complexity in SendActivity
Also change the minSdkVersion to 7 so that
- in AccountChooserActivity, can just use the Android AccountManager
- in SendActivity, can use Account
- in SendActivity, can remove the Constants.GET_LOGIN callback
from the legacy AuthManager (AuthManagerOld)
to pick the Google services to send a track to.
Benefits of the refactor:
- ServicePickerActivity can easily handle screen rotation
- Reduce complexity in SendActivity
Note using the "yyyy-MM-dd HH:mm" format so it is readable
for users. However, the colon, ":", is not a valid
FAT32 filename character. So when saving to the SD card,
the filename becomes "yyyy-MM-dd HH_mm".
- typography warnings should be just informational (too many of them)
- unused IDs/resources make no sense for the library project
- layout errors should be errors
In StringsUtils, add formatDateTime, formatTime, formatElapsedTime.
Note that verified when sending to Google Docs, no longer need
to always show the hours when displaying total time and moving time.