0

ich mit einem Aufruf wie folgt eine ActivityNotFound Ausnahme bin immer:Android Implizite Intents mit benutzerdefinierten mime

Intent displayModule = new Intent(Intent.ACTION_MAIN); 
     displayModule.addCategory(Intent.CATEGORY_DEFAULT); 
     displayModule.setType("application/x-content"); 
     displayModule.putExtra(Modules.Plan_ID, holder.planId); 
     displayModule.putExtra(Modules.Module_ID, holder.moduleId); 
     startActivity(displayModule); 

die Standard-Kategorie machen keinen Unterschied Hinzufügen.

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW typ=application/x-content (has extras) } 

oder

android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW cat=[android.intent.category.DEFAULT] typ=application/x-content (has extras) } 

, wenn ich diese Tätigkeit zu verweisen bin versucht:

<activity android:name=".ContentActivity" > 
      <intent-filter> 
        <action android:name="android.intent.action.VIEW" > 
        <category android:name="android.intent.category.DEFAULT" /> 

        <data android:mimeType="application/x-content" /> 
       </action> 
      </intent-filter> 
     </activity> 

Außerdem, wenn es hilft ich diese

+1

mich auf Ihren Anruf zeigen Aktivität starten – confucius

+0

ich die Zeilen aus logcat aus diesem Grund an der Spitze aufgenommen hatte. Wie auch immer, ich hatte die Frage aktualisiert –

Antwort

0

in einem Fragment tue ich denke, es ist das umschließende action Tag

versuchen dies bitte:

<activity android:name=".ContentActivity" > 
      <intent-filter> 
        <action android:name="android.intent.action.VIEW" /> 
        <category android:name="android.intent.category.DEFAULT" /> 
        <data android:mimeType="application/x-content" /> 
      </intent-filter> 
     </activity>