Search code examples
androidemail-client

Android don't show my app in other application


I am developing an android email client app with the use of one email client open source. The user can configure his email-id through my app. After that user open the camera(using another app) and take photo, the camera app prompts the user to send that photo using the installed email clients(with my email client app) list. But I don't want to show my email client app in that list. How can I avoid my app in another application? Can you give me some suggestions regarding this would be great.

My code snippet of Android Manifest file is given below:

     <activity
        android:name="com.test.activity.MessageCompose"
        android:configChanges="keyboardHidden|orientation|screenSize"
        android:enabled="false"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.SENDTO" />
            <data android:scheme="mailto" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND" />
            <data android:mimeType="*/*" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.SEND_MULTIPLE" />
            <data android:mimeType="*/*" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <data android:scheme="mailto" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
        </intent-filter>
    </activity>

Solution

  • If you don't want to receive intents from other apps, you may remove all intent-filters. You may read more about it here: http://developer.android.com/guide/components/intents-filters.html#ifs