Improve export/import, add stats sync across devices #106
Comments
Thanks @nelenkov ! I haven't found the time to look at your implementation but from my point of view it is be a great enhancement to getting exports from one device to another manually. Autosync is definitely the nicest way and we should see if someone can find the time in the future to implement this for an upcoming release. |
hitting the import button leads to an app crash (fresh install from dev branch): 07-24 11:10:31.551: E/AndroidRuntime(10474): FATAL EXCEPTION: main (I checked, the activity is in the manifest...) |
...forget about it... Eclipse didn't properly refresh to manifest... works now... |
Just for a little discussion, we should find a namining pattern for the zip file. "andlytics.zip" doesn't work for me since I have three dev console accounts atm and thus couldn't put all exports in the same folder (on dropbox or whatever) and I couldn't distinguish between the exports of the different accounts. Any thought? with this we could even import based on the zip's filename ;) (a bit hacky I know) |
I actually thought about adding this, but it would require some more work to let you select a file if there are multiple ones. Right now the only way is manually rename and go through the ANDROID_VIEW action. It probably also needs a way to select the account to import to, right now it's fixed to the current (from preferences) account. Sanitized email should work as an identifier. We could also add a timestamp, but that would result in a bunch of files if you export often. |
Not sure about the timestamp, having just the email as identifier in the name would get us a implizit connection between account and export.zip. So we could then (at some point) find the matching account during import :) I would save that for later, but already implement the naming pattern? What do you think? |
Looks good so far, definately make an export activity, and remove the buttons and replace them with a split action bar, or standard dialog style button (using the proper seperator style). The cancel button can be replaced with a homeAsUp actionbar indicator/pressing back. Also there is the blue dialog border that could be removed. I also think something should be done about just having one file name, can we not have wildcard intent to look for all andlytics-*.zip files? |
OK, account name is now included, please test. To export you need to switch to the relevant account. There is no 'export all' action (yet?). I've removed the dialog border, and renamed the the close button to 'Cancel'. If we decide to use native buttons, it should be done for the whole app. If you want to keep the current look and feel, we should create a button style based on the current button-like layouts. I don't think the bottom bar makes sense in those activities, so I've kept the buttons. |
I'll test this later today. |
The import into the wrong account protection worked. Maybe change the notification to include the full file name and path. Otherwise, works well. |
How does the import work now? |
It should be looking for a 'andlytics-your@email.com.zip' file and displaying the names of the files (packages) inside. It doesn't use CSV files directly. |
hmm will have to check that later. Just deleted the csv file in the folder and now I get a "SD card not mounted or invalid file format" toast... |
I see the problem now. It does read from the zip file, but when verifying tries to use the CSV files directly. Will fix. |
Let me know when it is fixed and I will retest it then :-) |
This has to work now :) Also writes directly to the zip files and thus export should be slightly faster. |
Works fine now on my device :) |
What is the status of this, any thing else that needs doing before the next public release (it can obviously be improved on later)? |
The zip export/import works and unless anyone has any issues ideas, I consider it done for now. The next phase -- auto sync, Google Docs, etc., should go in some next release. I will check how it works with latest dev tomorrow, but there shouldn't be any problems. |
Works fine on my device |
Could old export still be imported? Would be nice for the next version-bump |
My 1st try to export: Service com.github.andlyticsproject.io.ExportService has leaked ServiceConnection android.media.MediaScannerConnection@41492790 that was originally bound here |
Old style exports can't be imported automatically, but if you do need them you can simply zip them up and import. Re: the stack trace, this a warning, will see if it can be avoided. |
In that case, we should put a note on google play with instructions for importing old style data for the first few weeks after releasing 2.2. Does it need to be named anything in particular? |
The file should be named andlytics-account_name.zip, where 'account_name' is the developer account email (dev@gmail.com, etc.) The latest merge uses the new notifications and properly handles detaching AsyncTaks. Re: the MediaScanner error, this appears to be a bug in MediaScanner. Default apps (Email, etc.) don't handle it in any special way, so leaving it as is for now. |
A few small comments: Use In the import one, maybe don't show the .csv bit on the end, it might confuse users and doesn't make that much sense anymore I know I said this before, but it stands out even more now that users can hide AdMob: |
I don't think homeAsUp makes sense here: this is not master-detail, and the fact the import/export is started from the previous activity is merely an implementation detail. For example, import can be started by opening a zip file, and the main activity may not even be running. I'll look into the .csv extensions thing. I could just replace them with regular buttons, but that would break the overall design, especially on 2.x where buttons are light gray(ish). Is everyone OK with that? |
I forgot about that. Good point. I'm not sure what the best solution would be tbh, its more the fact it goes half white when you hold it down that doesn't fit. It is fine for now, it was just an observation. |
OK, I see. It seems this comes from the gradient in the image_button drawable, but not sure what the best way to handle it is. Moving all colors and dimensions to resources would be a good start, so all of this is a little more readable. BTW, drawable/image_button shows up in the following layouts: layout/admob_config_addaccount.xml Are all of those currently used? |
Translate and feedback aren't. You can answer for the stats ones, AdMob is. |
just pushed a fix on the image_button to dev. Works for the import/export & admob. |
I think crash is as well. Clearing out unused resources is another thing on my todo list. |
image_button looks good. Fixed notifications and .csv extension in latest pull request. |
Someone has made a very interesting comment on Google Play
The first part would be especially useful for new users. |
Also think that would be very helpful especially with new users, so we could probably just download the csv file per app and use that data (just an idea, no idea how easy/hard this would be to implement) but we would then endup with the API calls for the csv file and for the comments plus we could even get all data present in the console for installs/uninstalls/devices/countries/etc. :) |
That's an interesting idea, but the console stats only have installs/uninstalls/upgrades numbers. Real data seems to start from November 2011, but the daily active_device_installs and total_user_installs could probably be used to fill out the installs. Everything else has to be 0/undefined. |
OK, I'll mark this as closed for now. We can open a new one later with enhanced features |
Ideas:
https://github.com/nelenkov/andlytics/tree/zipped-export
The text was updated successfully, but these errors were encountered: