Best Practice - Adding your App to the Android Share Menu

前端 未结 3 648
傲寒
傲寒 2021-01-31 10:26

My App sends files(all mime Types) over a TCP connection and hence I wanted my app to appear in the Android Share menu.

I added the following intent filters to my Activi

相关标签:
3条回答
  • 2021-01-31 10:31

    I tried to deal with this issue and I pretty sure that samsung's gallery uses some custom action for sharing through that menu. Taking into account that all the listed application are preinstalled ones it's obvious that Samsung agreed with all of the listed application developers to use it's custom intent action.

    I have also tried to contact to Samsung and they haven't replied yet.

    0 讨论(0)
  • 2021-01-31 10:40

    I've outlined it here how to get in the menu:

    http://blog.blundellapps.com/add-your-app-to-the-android-menu/

    Basically it's having your mimetype / :

            <intent-filter>
                <action android:name="android.intent.action.GET_CONTENT" />
    
                <category android:name="android.intent.category.DEFAULT" />
    
                <data android:mimeType="*/*" />
            </intent-filter>
    

    If you do that and it doesn't show up, it means they are using an intent menu and it's a custom share list so you cannot force your way in.

    0 讨论(0)
  • 2021-01-31 10:46

    i think you are sharing the images from outside the app. plz define the minetype in intentfiler. it is working fine at mine side.

    <activity
                android:name=".SharePhotoFromOutSide"
                android:theme="@android:style/Theme.Translucent.NoTitleBar" >
                <intent-filter>
                    <action android:name="android.intent.action.SEND" />
    
                    <category android:name="android.intent.category.DEFAULT" />
    
                    <data android:mimeType="photo/*" />
                </intent-filter>
            </activity>
    
    0 讨论(0)
提交回复
热议问题