Search code examples
androidandroid-intentandroid-sharing

Title of activity receiving data from intents


I added activity that receives intents with data, this is how it looks like in manifest

<activity
        android:name="com.example.SavePictureActivity"
        android:label="@string/save_image_to_gallery"
        >
    <intent-filter>
        <action android:name="android.intent.action.SEND"/>
        <category android:name="android.intent.category.DEFAULT"/>
        <data android:mimeType="image/*"/>
    </intent-filter>
</activity>

On some devices title of this activity in "Share" dialog is set to string "save_image_to_gallery" in my resources, it is ok, but on another devices, in particular on devices Samsung Galaxy S4 and Samsung Galaxy Note 2 this title is set to my application's title, this is not ok. What can I do with this? I also tried to set "android:label" attribute for intent-filter tag, effect is the same.


Solution

  • I found the reason, it was that I had two different activities with the same labels and android changed them to application names to make them different.