androidshareactionprovider

Show share menu like other apps on my android phone


I have added share action on my app's actionbar and followed these steps:

http://www.codewithasp.net/2016/11/share-action-provider-android-application-actionbar-appcompat-v7.html

This is showing a nice simple looking share menu on my actionbar. But problem is that all other application on my phone have different share menu and all of them are similar.

Here is how my share menu look:

enter image description here

Here is how other apps showing share menu on my device

enter image description here


Solution

  • There was one more thing to add in SadClown's answer and I got what I wanted. Actually while calling startActivity instead of just pass your share intent we need to call intent chooser

    getContext().startActivity(Intent.createChooser(sendIntent, "Share"));
    

    It is explained here in detail