title: Getting list of installed app's, easy. But how to launch one of them?
body: <p>My first application will just be a kind of launcher that I would like to improve.
  This launcher will launch a custom Home that the user has installed.</p>
  
  <p>That's like the application "Home Switcher, but I would like to do that myself.</p>
  
  <p>So my first goal is to get all "Home" applications list: that's really easy and the code is there:</p>
  
  <pre><code>Intent mainIntent = new Intent(Intent.ACTION_MAIN, null); 
  pm=getBaseContext().getPackageManager();
  mainIntent.addCategory(Intent.CATEGORY_HOME); 
  List&lt;ResolveInfo&gt; list = pm.queryIntentActivities(mainIntent,0);
  </code></pre>
  
  <p>Now I would like to do that in a listview. My first problem is to get the Icon: I failed, but that's not my main problem ( if you can help me I would be happy)</p>
  
  <p>I succeed to make a listview with all the names of the installed Home: </p>
  
  <pre><code>for(...){
      map = new HashMap&lt;String, String&gt;(); 
      map.put("titre",info.activityInfo.applicationInfo.loadLabel( pm ).toString());
      map.put("pck",info.activityInfo.packageName);
      listItem.add(map);
  }
      SimpleAdapter homeAdapter = new SimpleAdapter (this.getBaseContext(), listItem, R.layout.row,
      new String[] {"img", "titre"}, new int[] {R.id.img, R.id.titre});
      myListView.setAdapter(homeAdapter);
  </code></pre>
  
  <p>And now when I click on a home, I would like to launch the Home, so what I did is:</p>
  
  <pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {
   super.onListItemClick(l, v, position, id);
  
   HashMap&lt;String, String&gt; map = (HashMap&lt;String, String&gt;) myListView.getItemAtPosition(position);
   Intent myIntent = new Intent();
   myIntent.setPackage(map.get("pck"));
   startActivity(myIntent);  
  
  }
  </code></pre>
  
  <p>So, there is a box that that appear and ask me:</p>
  
  <p>Complete action using:
     LauncherPro - or Sense - or ADW
     Wallaper Gallery</p>
  
  <p>I think I am close to what I would like to do, but, I think I'm missing something, am I?</p>