Did my search on the Stackoverflow and Google before already but I could not find any answer that worked out for me as I get errors when using them or that there are certain codes/parts missing or, that there could be a need to install additional library files.
So basically what I want to do is to retrieve all the installed apps in the android phone and display it out but I have no clue as to how to go about doing it. I usually run into error regarding the "context" variable or that my xml files does not match the .java files in one way or another.
Would anyone be kind enough to give me the source codes for all the required files(e.g. xml, java, manifest, drawable, layout etc) in order to achieve the objective of retrieving all android apps? Help would be very much appreciated
First create main.xml file as follows,
This
list
will be used to populate the installed applications,Now create the Activity class to fetch the installed applications,
Edit- If you want to open the application from the list, once you click it. You have to override the onItemClick method of the ListView and in that method, you have to pass the intent to open the selected application.
Have a look here,
These will most probably solve your issue.