I am currently working on an android project which lists all of the apps that are installed on the phone. When the user clicks on it is supposed to provide the package name so that I can later on launch the app. At the moment I am storing the package name on the next line, but I think this may confuse certain users as they don’t really need to know the package name only the application name.
Therefore, is there a way that I can store the package name within the ListView (using a custom adapter with TextView and ImageView) that I can retrieve when the user selects on the app name.
Thanks for any help you can provide.
One way is, you can use the seTag (Object tag) or setTag(int key, Object tag) to store this extra info with
TextViewor any view which is extended fromViewlike:Other approach is to store that info in a separate
Listand make sure that can be accessed via Adapter.