Android: SMS application is available in the section "Choose which application to open it with" -dialog

I am developing an SMS application. How to make an application available in the "Choose which application to open this dialog box?"

Thanks Martin

/ EDIT: I think you just misunderstood me.

I don’t want to write sms with my application, I want others to be able to write sms using my application, and that my application is indicated in the "Choose which application to open it" dialog box when you take SMS from the contact list.

Excerpt from my application manifest:

    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.APP_MESSAGING" />
        </intent-filter>
    </activity>

Adding the category "APP_MESSAGING" just didn't solve it.

+3
source share
3 answers

, . . :

    <activity
        android:name="com.example.sms.MainActivity"
        android:label="@string/title_activity_main" >
        <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.SENDTO"/>
              <category android:name="android.intent.category.DEFAULT" />
              <data android:scheme="sms" />
              <data android:scheme="smsto" />
        </intent-filter>

    </activity>
0

Just add two intent filters to the main action, your application will be available in the list of SMS applications

<activity
        android:name=".activities.MainAcitivty"
        android:label="@string/app_name" >

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

       <!--add these intent filters to your app-->
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:mimeType="vnd.android.cursor.dir/mms"/>
        </intent-filter>
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.DEFAULT"/>
            <data android:mimeType="vnd.android-dir/mms-sms"/>
        </intent-filter>
</activity>
0
source

All Articles