Commits

Anonymous committed 950829e

update to version 1.1.0. (r2363)

Comments (0)

Files changed (14)

  -->
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.openintents.filemanager"
-	android:versionName="1.0.1-rc1"
-	android:versionCode="2">
-	<!-- History: 1.0.0 [1]: 2008-12-10
-	1.0.1 [2]: 2009-01-16 -->
+	android:versionName="1.1.0"
+	android:versionCode="5">
+	<!-- History:
+	[5] 1.1.0:     2009-10-30
+	[4] 1.1.0-rc1: 2009-10-24
+	[3] 1.0.2:     2009-10-15
+	[2] 1.0.1:     2009-01-16
+	[1] 1.0.0:     2008-12-10
+	-->
+
+
+        <uses-sdk android:minSdkVersion="2"
+            android:targetSdkVersion="4"
+
+     />
+
+<supports-screens android:smallScreens="true"
+                  android:normalScreens="true"
+                  android:largeScreens="true"
+/>
+
+	    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
     <application android:icon="@drawable/ic_launcher_folder" android:label="@string/app_name">
+
+        <!-- aTrackDog metadata -->
+        <meta-data android:name="com.a0soft.gphone.aTrackDog.testVersion"
+           android:value="4" />
+
 		<meta-data android:name="org.openintents.metadata.COMMENTS"
                        android:value="@string/about_comments" />
         <meta-data android:name="org.openintents.metadata.COPYRIGHT"
         </activity>  -->
     <provider android:name=".FileManagerProvider" android:authorities="org.openintents.filemanager"></provider>
 </application>
-</manifest> 
+</manifest>
   http://www.openintents.org
 
 ---------------------------------------------------------
-release: 1.0.1
-date: 2008-12-??
-- Added support for following extensions:
+release: 1.1.0
+date: 2009-10-30
+- display file size.
+- show thumbnails for images.
+- copy files.
+- handle GET_CONTENT action.
+- added support for all WebKit extensions.
+- added support for following extensions:
   .amr, .3gp
-- Added support for upper case or mixed case letter
+- added support for upper case or mixed case letter
   extensions (like .png and .PNG)
-- Fix for send files via MMS.
+- fix for send files via MMS.
 - support for OI About.
 - encode file URIs properly
-- translations: French, German
+- translations: Chinese, French, German, Japanese, Spanish
 
 ---------------------------------------------------------
 release: 1.0.0

res/values-de/strings.xml

 	
 	<!-- Automatically filled in by Launchpad: -->
 	<string name="about_translators">Launchpad Contributions:
-  Peli https://launchpad.net/~peli0101</string>
+  Peli https://launchpad.net/~peli0101
+  marco.jahn https://launchpad.net/~accounts+launchpad-net</string>
 	
     <string name="about_comments">OI Dateimanager ist ein offener Dateimanager, der nahtlos mit anderen Anwendungen zusammenarbeitet.</string>  
 	<string name="about_website_label">OI Dateimanager auf OpenIntents</string> 
     <string name="menu_send">Senden</string>
     <string name="menu_open">Öffnen</string>
     <string name="menu_move">Verschieben</string>
-    <string name="menu_copy">Copy</string>
+    <string name="menu_copy">Kopie</string>
     
     <string name="create_new_folder">Neuen Ordner erstellen</string>
     <string name="folder_name">Name des Ordners</string>
     <string name="folder_renamed">Ordner umbenannt.</string>
     <string name="file_moved">Datei verschoben.</string>
     <string name="folder_moved">Ordner verschoben.</string>
-    <string name="file_copied">File copied.</string>
+    <string name="file_copied">Datei kopiert.</string>
     <string name="move_title">Ordner zum Verschieben auswählen</string>
     <string name="move_button">Hierher verschieben</string>
-    <string name="copy_title">Select folder to copy to</string>
-    <string name="copy_button">Copy here</string>
-    
-    <string name="copied_file_name">Copy of %s</string>
-    <string name="copied_file_name_2">Copy %d of %s</string>
+    <string name="copy_title">Wählen Sie Zielverzeichnis für den Kopiervorgang</string>
+    <string name="copy_button">Hierher kopieren</string>
+
+    <string name="copied_file_name">Kopie von %s</string>
+    <string name="copied_file_name_2">%d von %s kopiert</string>
 
     <string name="error_creating_new_folder">Neuer Ordner konnte nicht erstellt werden.</string>
     <string name="error_deleting_file">Datei konnte nicht gelöscht werden.</string>
     <string name="error_renaming_folder">Ordner konnte nicht umbenannt werden.</string>
     <string name="error_moving_file">Datei konnte nicht verschoben werden.</string>
     <string name="error_moving_folder">Ordner konnte nicht verschoben werden.</string>
-    <string name="error_copying_file">Could not copy file.</string>
+    <string name="error_copying_file">Datei kann nicht kopiert werden.</string>
     <string name="error_file_does_not_exists">Datei existiert nicht.</string>
     
     <string name="send_not_available">Keine Anwendung zum Senden vorhanden.</string>

res/values-es/strings.xml

 
 	<!-- Automatically filled in by Launchpad: -->
 	<string name="about_translators">Launchpad Contributions:
+  DiegoJ https://launchpad.net/~diegojromerolopez
   miwie https://launchpad.net/~mw-miwie</string>
 
-    <string name="about_comments">OI File Manager is an open file manager that seamlessly cooperates with other applications.</string>
+    <string name="about_comments">OI File Manager es un gestor abierto de archivos que cooperar fluidamente con otras aplicaciones.</string>
 	<string name="about_website_label">OI File Manager en OpenIntents</string>
 
 	<!-- ***************************
     <string name="menu_send">Enviar</string>
     <string name="menu_open">Abrir</string>
     <string name="menu_move">Mover</string>
-    <string name="menu_copy">Copy</string>
+    <string name="menu_copy">Copiar</string>
 
     <string name="create_new_folder">Crear nueva carpeta</string>
     <string name="folder_name">Nombre de carpeta</string>
     <string name="folder_renamed">Carpeta cambiado de nombre.</string>
     <string name="file_moved">Fichero movido.</string>
     <string name="folder_moved">Carpeta movido.</string>
-    <string name="file_copied">File copied.</string>
+    <string name="file_copied">Archivo copiado.</string>
     <string name="move_title">Seleccionar carpeta de destino</string>
     <string name="move_button">Mover acá</string>
-    <string name="copy_title">Select folder to copy to</string>
-    <string name="copy_button">Copy here</string>
+    <string name="copy_title">Seleccione carpeta a copiar a</string>
+    <string name="copy_button">Copiar aquí</string>
 
-    <string name="copied_file_name">Copy of %s</string>
-    <string name="copied_file_name_2">Copy %d of %s</string>
+    <string name="copied_file_name">Copia de %s</string>
+    <string name="copied_file_name_2">Copia %d de %s</string>
 
     <string name="error_creating_new_folder">No se puede crear la carpeta nueva.</string>
     <string name="error_deleting_file">No se puede borrar el fichero.</string>
     <string name="error_renaming_folder">No se puede cambiar de nombre de la carpeta.</string>
     <string name="error_moving_file">No se puede mover el fichero.</string>
     <string name="error_moving_folder">No se puede mover la carpeta.</string>
-    <string name="error_copying_file">Could not copy file.</string>
+    <string name="error_copying_file">No se pudo copiar el archivo.</string>
     <string name="error_file_does_not_exists">El archivo no existe.</string>
 
     <string name="send_not_available">Aplicación no disponible para enviar.</string>
 	<string name="eula_refuse">Cancelar</string>
 
 	<!-- Update -->
-	<string name="update_box_text">Please check manually for updates or install OI Update
-for automatic notifications.
-Current version: %s
-	</string>
+	<string name="update_box_text">Por favor, compruebe manualmente las actualizaciones o instale OI Update para notificaciones automáticas. Versión actual: %s</string>
 	<string name="update_check_now">Comprobar ahora.</string>
 	<string name="update_get_updater">Obtenga el Actualizador de OI</string>
 	<string name="update_error">Descarga aplicación no disponible.</string>
 
     <!-- About -->
     <string name="about">Sobre</string>
-	<string name="aboutapp_not_available">Version %s\n\nNo compatible extension available to display full info (contact, credits, license).</string>
+	<string name="aboutapp_not_available">La versión %s\nNo es compatible con el complemento disponible para mostrar información completa (contacto, créditos, licencia).</string>
     <string name="aboutapp_get">Obtenga Acerca de OI</string>
 
 

res/values-nl/strings.xml

 
 	<!-- Automatically filled in by Launchpad: -->
 	<string name="about_translators">Launchpad Contributions:
+  Simon de Vlieger https://launchpad.net/~ikanobori
   pjv https://launchpad.net/~pjv</string>
 
     <string name="about_comments">OI File Manager is an open file manager that seamlessly cooperates with other applications.</string>
     <string name="menu_send">Verzenden</string>
     <string name="menu_open">Openen</string>
     <string name="menu_move">Verplaatsen</string>
-    <string name="menu_copy">Copy</string>
+    <string name="menu_copy">Kopieer</string>
 
     <string name="create_new_folder">Nieuwe map aanmaken</string>
     <string name="folder_name">Naam van de map</string>
     <string name="folder_renamed">Map hernoemd.</string>
     <string name="file_moved">Bestand verplaatst.</string>
     <string name="folder_moved">Map verplaatst.</string>
-    <string name="file_copied">File copied.</string>
-    <string name="move_title">Select folder to move to</string>
-    <string name="move_button">Move here</string>
-    <string name="copy_title">Select folder to copy to</string>
-    <string name="copy_button">Copy here</string>
+    <string name="file_copied">Bestand gekopieerd.</string>
+    <string name="move_title">Kies map om naartoe te verplaatsen</string>
+    <string name="move_button">Hierheen verplaatsen</string>
+    <string name="copy_title">Kies map om naartoe te kopiëren</string>
+    <string name="copy_button">Kopieer hier</string>
 
-    <string name="copied_file_name">Copy of %s</string>
-    <string name="copied_file_name_2">Copy %d of %s</string>
+    <string name="copied_file_name">Kopie van %s</string>
+    <string name="copied_file_name_2">Kopie %d van %s</string>
 
     <string name="error_creating_new_folder">Could not create new folder.</string>
     <string name="error_deleting_file">Could not delete file.</string>

res/values-zh-rCN/strings.xml

 	<string name="about_translators">Launchpad Contributions:
   Swandle https://launchpad.net/~swandle</string>
 	
-    <string name="about_comments">OI文件管理是一个开源的文件管理软件,它可以与其它应用程序进行无缝整合。</string>  
-	<string name="about_website_label">OpenIntents的文件管理</string> 
+    <string name="about_comments">OI文件管理器是一个开源的文件管理软件,它可以与其它应用程序进行无缝整合。</string>
+	<string name="about_website_label">开放组件的OI文件管理器</string>
 	
 	<!-- ***************************
 	     Applicatio-specific strings
 	     *************************** -->
-    <string name="app_name">OI文件管理</string>
+    <string name="app_name">OI文件管理</string>
     
     <string name="menu_new_folder">新建文件夹</string>
     <string name="menu_delete">删除</string>
     <string name="folder_name">文件夹名</string>
     <string name="file_name">文件夹名</string>
     <string name="this_folder_is_empty">该文件夹为空</string>
-    <string name="really_delete">你真要删除 %s 吗?</string>
+    <string name="really_delete">确实要删除 %s 吗?</string>
     <string name="file_deleted">文件已删除</string>
     <string name="folder_deleted">文件夹已删除</string>
-    <string name="file_renamed">文件重命名</string>
+    <string name="file_renamed">文件重命名</string>
     <string name="folder_renamed">文件夹已重命名</string>
     <string name="file_moved">文件已移动</string>
     <string name="folder_moved">文件夹已移动</string>

res/values/strings_not_for_translation.xml

 	     *************************** -->
 	<!-- Update -->
 	<string name="update_app_url">market://search?q=pname:org.openintents.filemanager</string>
+	<string name="update_app_developer_url">http://www.openintents.org/en/node/159</string><!-- 159 = OI File Manager -->
 	<string name="update_checker_url">market://search?q=pname:org.openintents.updatechecker</string>
+	<string name="update_checker_developer_url">http://www.openintents.org/en/node/203</string><!-- 203 = OI Update -->
 	
 	<!-- About -->
     <string name="aboutapp_market_uri">market://search?q=pname:org.openintents.about</string>
+    <string name="aboutapp_developer_uri">http://www.openintents.org/en/node/202</string><!-- 202 = OI About -->
     
 	<!-- ***************************
 	     Preferences

res/xml/mimetypes.xml

 	<type extension=".jpeg" mimetype="image/jpeg" />
 	<type extension=".bmp" mimetype="image/bmp" />
 	    
-	<!-- Autio types -->
+	<!-- Audio types -->
 	<type extension=".mp3" mimetype="audio/mp3" />
 	<type extension=".wav" mimetype="audio/wav" />
 	<type extension=".ogg" mimetype="audio/x-ogg" />
 	<!-- Android specific -->
 	<type extension=".apk" mimetype="application/vnd.android.package-archive" />
 	
-</MimeTypes>
+</MimeTypes>

src/org/openintents/distribution/AboutDialog.java

 /**
  * About dialog
  *
- * @version 2009-01-16
+ * @version 2009-02-04
  * @author Peli
  *
  */
 		super(context,
 				RD.string.aboutapp_not_available,
 				RD.string.aboutapp_get,
-				RD.string.aboutapp_market_uri);
+				RD.string.aboutapp_market_uri,
+				RD.string.aboutapp_developer_uri);
 		
 		String version = VersionUtils.getVersionNumber(context);
 		String name = VersionUtils.getApplicationName(context);

src/org/openintents/distribution/GetFromMarketDialog.java

 import android.util.Log;
 import android.widget.Toast;
 
+/**
+ * @version 2009-02-04
+ * @author Peli
+ *
+ */
 public class GetFromMarketDialog extends AlertDialog implements OnClickListener {
 	private static final String TAG = "StartSaveActivity";
 
     Context mContext;
     int mMarketUri;
+    int mDeveloperUri;
     
-    public GetFromMarketDialog(Context context, int message, int buttontext, int market_uri) {
+    public GetFromMarketDialog(Context context, int message, int buttontext, int market_uri, int developer_uri) {
         super(context);
         mContext = context;
         mMarketUri = market_uri;
+        mDeveloperUri = developer_uri;
 
         //setTitle(context.getText(R.string.menu_edit_tags));
         setMessage(mContext.getText(message));
     		
 			Intent intent = new Intent(Intent.ACTION_VIEW);
 			intent.setData(uri);
-			GetFromMarketDialog.startSaveActivity(mContext, intent);
+
+			uri= Uri.parse(mContext.getString(mDeveloperUri));
+			Intent intent2 = new Intent(Intent.ACTION_VIEW);
+			intent2.setData(uri);
+			startSaveActivity(mContext, intent, intent2);
     	}
 		
 	}
 	 * 
 	 * @param context
 	 * @param intent
+	 * @param intent2 Alternative intent to call, if the first is not reachable
 	 */
-	public static void startSaveActivity(Context context, Intent intent) {
+	public static void startSaveActivity(Context context, Intent intent, Intent intent2) {
 		try {
 			context.startActivity(intent);
 		} catch (ActivityNotFoundException e) {
-			Toast.makeText(context,
-					RD.string.update_error,
-					Toast.LENGTH_SHORT).show();
 			Log.e(TAG, "Error starting activity.", e);
+			try {
+				context.startActivity(intent2);
+			} catch (ActivityNotFoundException e2) {
+				Toast.makeText(context,
+						RD.string.update_error,
+						Toast.LENGTH_SHORT).show();
+				Log.e(TAG, "Error starting second activity.", e2);
+			}
 		}
 	}
-}
+}

src/org/openintents/distribution/RD.java

 		public static final int update_box_text = R.string.update_box_text;
 		public static final int update_check_now = R.string.update_check_now;
 		public static final int update_app_url = R.string.update_app_url;
+		public static final int update_app_developer_url = R.string.update_app_developer_url;
 		public static final int update_get_updater = R.string.update_get_updater;
 		public static final int update_checker_url = R.string.update_checker_url;
+		public static final int update_checker_developer_url = R.string.update_checker_developer_url;
 		public static final int update_error = R.string.update_error;
 
 		///////////////////////////////////////
 		public static final int aboutapp_not_available = R.string.aboutapp_not_available;
 		public static final int aboutapp_get = R.string.aboutapp_get;
 		public static final int aboutapp_market_uri = R.string.aboutapp_market_uri;
+		public static final int aboutapp_developer_uri = R.string.aboutapp_developer_uri;
+
 	}
 
 	public class raw {

src/org/openintents/distribution/UpdateMenu.java

 
 package org.openintents.distribution;
 
-// Version Nov 12, 2008
-
 import android.app.AlertDialog.Builder;
 import android.content.ActivityNotFoundException;
 import android.content.Context;
 import android.view.MenuItem;
 import android.widget.Toast;
 
+/**
+ * @version 2009-10-23: support Market and aTrackDog
+ * @version 2009-02-04
+ * @author Peli
+ *
+ */
 public class UpdateMenu {
 	
 	private static final String TAG = "UpdateMenu";
 	
-	public static final String UPDATE_CHECKER = "org.openintents.updatechecker";
+	/**
+	 * If any of the following applications is installed,
+	 * there is no need for a manual "Update" menu entry.
+	 */
+	public static final String[] UPDATE_CHECKER = new String[]
+	    {
+			"org.openintents.updatechecker", // OI Update
+			"com.android.vending", // Google's Android Market
+			"com.a0soft.gphone.aTrackDog" // aTrackDog
+	    };
 
 	/**
 	 * Adds a menu item for update only if update checker is not installed.
 	public static MenuItem addUpdateMenu(Context context, Menu menu, int groupId,
 			int itemId, int order, int titleRes) {
 		PackageInfo pi = null;
-		try {
-			pi = context.getPackageManager().getPackageInfo(
-					UPDATE_CHECKER, 0);
-		} catch (NameNotFoundException e) {
-			// ignore
-		}
-		if (pi == null) {
-			return menu.add(groupId, itemId, order, titleRes).setIcon(
-					android.R.drawable.ic_menu_info_details).setShortcut('9',
-					'u');
-		} else {
-			return null;
+
+		// Test for existence of all known update checker applications.
+		for (int i = 0; i < UPDATE_CHECKER.length; i++) {
+			try {
+				pi = context.getPackageManager().getPackageInfo(
+						UPDATE_CHECKER[i], 0);
+			} catch (NameNotFoundException e) {
+				// ignore
+			}
+			if (pi != null) {
+				// At least one kind of update checker exists,
+				// so there is no need to add a menu item.
+				return null;
+			}
 		}
+
+		// If we reach this point, we add a menu item for manual update.
+		return menu.add(groupId, itemId, order, titleRes).setIcon(
+				android.R.drawable.ic_menu_info_details).setShortcut('9',
+				'u');
 	}
 	
 
 			e.printStackTrace();
 		}
 		final Intent intent  = new Intent(Intent.ACTION_VIEW);
+		final Intent intent2  = new Intent(Intent.ACTION_VIEW);
 		new Builder(context).setMessage(context.getString(RD.string.update_box_text, version))
 		.setPositiveButton(RD.string.update_check_now, new OnClickListener(){
 
 			public void onClick(DialogInterface arg0, int arg1) {
 				intent.setData(Uri.parse(context.getString(RD.string.update_app_url)));
-				startSaveActivity(context, intent);
+				intent2.setData(Uri.parse(context.getString(RD.string.update_app_developer_url)));
+				GetFromMarketDialog.startSaveActivity(context, intent, intent2);
 			}
 			
 		}).setNegativeButton(RD.string.update_get_updater, new OnClickListener(){
 
 			public void onClick(DialogInterface dialog, int which) {
 				intent.setData(Uri.parse(context.getString(RD.string.update_checker_url)));
-				startSaveActivity(context, intent);
+				intent2.setData(Uri.parse(context.getString(RD.string.update_checker_developer_url)));
+				GetFromMarketDialog.startSaveActivity(context, intent, intent2);
 			}
 			
 		}).show();		
 	}
-	
-	/**
-	 * Start an activity but prompt a toast if activity is not found
-	 * (instead of crashing).
-	 * 
-	 * @param context
-	 * @param intent
-	 */
-	private static void startSaveActivity(Context context, Intent intent) {
-		try {
-			context.startActivity(intent);
-		} catch (ActivityNotFoundException e) {
-			Toast.makeText(context,
-					RD.string.update_error,
-					Toast.LENGTH_SHORT).show();
-			Log.e(TAG, "Error starting activity.", e);
-		}
-	}
 
 }

src/org/openintents/filemanager/DirectoryScanner.java

 import java.util.Collections;
 import java.util.List;
 
+import org.openintents.filemanager.util.FileUtils;
 import org.openintents.filemanager.util.MimeTypes;
 
 import android.content.Context;
 import android.content.pm.PackageManager;
 import android.content.pm.ResolveInfo;
 import android.graphics.drawable.Drawable;
+import android.net.Uri;
 import android.os.Handler;
 import android.os.Message;
 import android.os.SystemClock;
     
 
 
-	DirectoryScanner(File directory, Context context, Handler handler, MimeTypes mimeTypes) {
+	DirectoryScanner(File directory, Context context, Handler handler, MimeTypes mimeTypes, String sdCardPath) {
 		super("Directory Scanner");
 		currentDirectory = directory;
 		this.context = context;
 		this.handler = handler;
 		this.mMimeTypes = mimeTypes;
+		this.mSdCardPath = sdCardPath;
 	}
 	
 	private void clearData() {
 
 				String mimetype = mMimeTypes.getMimeType(fileName);
 
-				currentIcon = getDrawableForMimetype(mimetype);
+				currentIcon = getDrawableForMimetype(currentFile, mimetype);
 				if (currentIcon == null) {
 					currentIcon = genericFileIcon;
 				}
      * @param mimetype
      * @return
      */
-    Drawable getDrawableForMimetype(String mimetype) {
+    Drawable getDrawableForMimetype(File file, String mimetype) {
+     if (mimetype == null) {
+	 return null;
+     }
+
    	 PackageManager pm = context.getPackageManager();
    	 
+	 Uri data = FileUtils.getUri(file);
+
    	 Intent intent = new Intent(Intent.ACTION_VIEW);
-   	 intent.setType(mimetype);
+	 //intent.setType(mimetype);
    	 
+	 // Let's probe the intent exactly in the same way as the VIEW action
+	 // is performed in FileManagerActivity.openFile(..)
+     intent.setDataAndType(data, mimetype);
+
    	 final List<ResolveInfo> lri = pm.queryIntentActivities(intent, PackageManager.MATCH_DEFAULT_ONLY);
    	 
    	 if (lri != null && lri.size() > 0) {
+		 //Log.i(TAG, "lri.size()" + lri.size());
+
    		 // return first element
-   		 final ResolveInfo ri = lri.get(0);
+		 int index = 0;
+
+		 // Actually first element should be "best match",
+		 // but it seems that more recently installed applications
+		 // could be even better match.
+		 index = lri.size()-1;
+
+		 final ResolveInfo ri = lri.get(index);
    		 return ri.loadIcon(pm);
    	 }
    	 

src/org/openintents/filemanager/FileManagerActivity.java

           mProgressBar.setVisibility(View.GONE);
           setListAdapter(null); 
           
-		  mDirectoryScanner = new DirectoryScanner(currentDirectory, this, currentHandler, mMimeTypes);
+		  mDirectoryScanner = new DirectoryScanner(currentDirectory, this, currentHandler, mMimeTypes, mSdCardPath);
 		  mDirectoryScanner.start();
 		  
 		  
 		menu.add(0, MENU_RENAME, 0, R.string.menu_rename);
 		menu.add(0, MENU_DELETE, 0, R.string.menu_delete);
 
-        Uri data = Uri.fromFile(file);
-        Intent intent = new Intent(null, data);
-        String type = mMimeTypes.getMimeType(file.getName());
+		//if (!file.isDirectory()) {
+	        Uri data = Uri.fromFile(file);
+	        Intent intent = new Intent(null, data);
+	        String type = mMimeTypes.getMimeType(file.getName());
 
-        intent.setDataAndType(data, type);
+	        intent.setDataAndType(data, type);
+	        //intent.addCategory(Intent.CATEGORY_SELECTED_ALTERNATIVE);
 
-//        Log.v(TAG, "Data=" + data);
-//        Log.v(TAG, "Type=" + type);
-		
-		menu.addIntentOptions(Menu.CATEGORY_ALTERNATIVE, 0, 0,
-				new ComponentName(this, FileManagerActivity.class), null, intent, 0, null);
+	        Log.v(TAG, "Data=" + data);
+	        Log.v(TAG, "Type=" + type);
+
+	        if (type != null) {
+			// Add additional options for the MIME type of the selected file.
+				menu.addIntentOptions(Menu.CATEGORY_ALTERNATIVE, 0, 0,
+						new ComponentName(this, FileManagerActivity.class), null, intent, 0, null);
+	        }
+		//}
 	}
 
 	@Override