DIGIT-ARC read-only archive · snapshot: July 23, 2026

About : Android favorites option

2 posts · originally from https://geek.digit.in/community/threads/about-android-favorites-option.153890/

H
Himali Original post #1
Mar 10, 2012 at 3:04 PM
actually in our project there is an option of favorites.
what i want to do is i want all those applications that has been
visited several times to be in favorites.
for this im going to use shared preferences.
i have thought having a counter
i will increment that counter
everytime a particular application is being accessed.
This counter value will get reflected in the sharedpreferences for
each application.
As soon as the counter reaches to a certain value that application
will be in the list of favorites.
But i dont know how to proceed.
So if anyone can guide then it will be a great help.
thanks alot
sameer.pur
Mar 15, 2012 at 10:53 AM
Are you developing a launcher app?

Assuming yes-
I think favorites should be user select-able, and you can add a most used section.
(Just a opinion)

For tracking favorites or most used apps, use SQLite.
Store app package names which are in the launcher menu.
Your counter approach is fine. Also add a last accessed time in the table.
So it would be package name, counter, accessed time for the table structure.
Here is the Android Developer reference on SQLite-
Data Storage | Android Developers