简体   繁体   中英

How to make my android app appear at the TOP of the share via.. list?

How can I get my android app to appear at the TOP of the Share via.. list, when a share is initiated from another app?

I have seen it done on some apps, eg pearltrees, which is always at the top of the list, but can't work out how they did it.

Is it simply alphabetical order, in which case it is the name of the app?

Can this order be changed in any way through programming?

Thanks.

EDIT: I worked it out. This has the desired effect I was looking for: I used the android:label property in the intent filter eg

    <intent-filter android:label="@string/name_you_want_to_appear_in_the_list">

If you set the string as say "* MyApp *" using characters such as an asterisk, it will go to the top.

No, it cannot be changed by programming. It is based on alphabetical order.. So if you really want to make your app appear first you gotta follow the strategy adopted by Dropbox, Pocket.. etc, ie "Add to Dropbox" "Add to pocket" so that A appears first in the list

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM