kirti Hudda
kirti Hudda

Reputation: 304

How can I set the name of application diffrent at the time of "Launcher" and "share via"

I want to know the way to set the application name different at the time of launcher and at the time of browser sharing list by share . I know sharing functionality takes place by intent filter, but I am not able to set the name different. I want my application name on the name of main activity (e.g "Info Store") but name of application in browser sharing list custom(e.g in Share Via dialog "Add to your Info"). Currently I am getting "Info Store" at both place"

Here is my mainfest code

 <activity
        android:name=".views.activities.InfoStoreActivity"
        android:label="@string/title_activity_infostore" 
         >
        <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="*/*" />
      </intent-filter>


    </activity>

Upvotes: 0

Views: 102

Answers (2)

kirti Hudda
kirti Hudda

Reputation: 304

with the help of @commonsWare, I am going to post complete code of my manifest file. It might help to others.

      <activity
        android:name=.views.activities.InfoStoreActivity"
            android:theme="@style/Theme.AppCompat"  

             >
         <intent-filter
             android:label="Add to Item Info"
             android:icon="@drawable/info_icon">
            <action android:name="android.intent.action.SEND" />

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

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

    </activity>

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1007554

Try adding android:label to your <intent-filter> for ACTION_SEND, with your alternative caption.

Upvotes: 1

Related Questions