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

108 views Asked by At

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>
2

There are 2 answers

0
kirti Hudda On BEST ANSWER

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>
2
CommonsWare On

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