[Android Software Development] mcbyte_it:
New features

ROM Stats v2.x

I have been working on implementing new experimental features, which are:

Old functionality with User prompt (Beta 1)

I brought back the old functionality though a build.prop option, when enabled ROM Stats will behave like before: upon first boot the user is prompted to opt-out, and in case of the user selects to opt-in, immediate checkin is done.

When the option is not enabled (default), it will behave as CM10.1: defaults is opt-in, but the first reporting will occur after the update interval, as mentioned in my earlier post. For example if you set it to report once every 7 days, the first report/registration will occur after 7 days of the ROM installation.

To enable add this to build.prop

ro.romstats.askfirst=1

Persistent Opt-Out cookie (Beta 1)

I gave the user the ability to opt-out permanently, though a small file that is written on the SD Card. When it is available no reporting occurs, and no User Prompt will be shown, even on a clean ROM install. This file can also be used in the ROM update script, and if it is found it will not even copy the APK file with the ROM.

Google Analytics reporting (Beta 1)

the new CM Stats 10.1 includes also reporting to Google Analytics, I implemented this also in ROM Stats, through a parameter in build.prop

To enable add this to build.prop

ro.romstats.ga=UA-0000000-0

Hide Launcher Icon (Beta 2)

I added an option to hide the launcher icon, accessible through the menu.

To give the ability to restore the icon, I made this by writing a file on the SD Card:

SDCard\.ROMStats\hide_icon

To restore the icon the user should delete this file and restart the device.

Moved Uninstall to menu (Beta 2)

I moved the uninstall link to the menu, instead of being there all the time.

Immediate report on version change (Beta 2)

I made a functional change, that when the user updates the ROM leaving the ROM Stats installed, it will report immediately and will not wait for the next update interval. (I save the last reported version in the local prefs, and when if changes, it does an immediate reporting).

More information (Beta 2)

I added some more information to the main screen, such as the last time it reported, and the update interval.

Signature validation (Beta 2)

I added yet another experimental feature, but does not know how useful it will be: verify the signing certificate of my app to some internal/internet saved license, in case some malicious user changes the app to report to some other url.

Currently it only checks the license with an internal certificate, and shows Valid/Invalid.

Maybe I can use this to authenticate to the server, making the server accepts only submissions from a valid ROM Stats client.

As you see, I am adding a lot of feature I was thinking of, not all will make it to the final version, it is just things I wanted to try.

I released the sources for beta 1 on my GitHub, for anyone to check and enhance, sources for beta 2 are not ready yet, will release later today or tomorrow.

Any feedback and contributions are welcome

A compiled APK is also attached to this post.

THIS IS AN EXPERIMENTAL VERSION WITH A LOT OF NEW FEATURES,

it is

highly advisable NOT to use it in any ROM

, just for testing purposes.​