2016-11-14 1 views
1

J'essaie d'utiliser des filtres d'intention pour ce faire. J'ai essayé ceci Intent filter for files only mais cela n'a pas fonctionné. Je souhaite que mon application apparaisse dans le menu partagé pour tous les types de fichiers.Comment enregistrer une application pour partager tous les types de fichiers?

Voici mon filtre intention

  <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
      <intent-filter> 
       <action android:name="android.intent.action.SEND" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="text/plain" /> 
      </intent-filter> 
      <intent-filter> 
       <action android:name="android.intent.action.SEND" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:mimeType="image/*" /> 
      </intent-filter> 
      <intent-filter> 
       <action android:name="android.intent.action.SEND" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
       <data android:scheme="content" /> 
       <data android:mimeType="*/*" /> 
       <data android:host="*" /> 
      </intent-filter> 
+0

Essayez cette

+0

@AnkitaShah J'ai essayé ce ' 'mais il s'est plaint de code manifestes mal formé – Saumya

+0

Maintenant, tr y ' ' –

Répondre

1

essayer. Il travaille dans mon projet

 <intent-filter> 
      <!----> 
      <action android:name="android.intent.action.SEND" /> 

      <category android:name="android.intent.category.DEFAULT" /> 

      <data android:mimeType="*/*" /> 
     </intent-filter> 
+0

Cela a fonctionné. Merci !! J'ai essayé cela pendant des jours: D – Saumya