How to show apk files to the user to choose one to install?
The following code should have enumerated the list of .apk files. but it does not. Also how do I show those apk files in a list?

    case R.id.install_apk:

			
    File file[] =Environment.getExternalStorageDirectory().listFiles(apkFilter);
			
    for (int i=0; i < file.length; i++)
    {
		           
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(Uri.fromFile(file[i]),   
    "application/vnd.android.packagearchive");
    startActivity(intent);
		        }
			
			

			return true; 

//inner class


    class ExtFilter implements FilenameFilter { 
	        String ext; 
	        public ExtFilter(String ext) { 
	            this.ext = "." + ext; 
	        } 
	        public boolean accept(File dir, String name) { 
	            return name.endsWith(ext); 
	        }
	    }

How to show apk files to the user to choose one to install?
===

The following code should have enumerated the list of .apk files. but it does not. Also how do I show those apk files in a list?

    case R.id.install_apk:

			
    File file[] =Environment.getExternalStorageDirectory().listFiles(apkFilter);
			
    for (int i=0; i < file.length; i++)
    {
		           
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.setDataAndType(Uri.fromFile(file[i]),   
    "application/vnd.android.packagearchive");
    startActivity(intent);
		        }
			
			

			return true; 

//inner class


    class ExtFilter implements FilenameFilter { 
	        String ext; 
	        public ExtFilter(String ext) { 
	            this.ext = "." + ext; 
	        } 
	        public boolean accept(File dir, String name) { 
	            return name.endsWith(ext); 
	        }
	    }
