I want to intercept the user selecting the share intent and if they select facebook to launch the facebook sdk.
I am confused by the API documentation which is contradicting. http://developer.android.com/reference/android/widget/ShareActionProvider.html
public void setOnShareTargetSelectedListener (ShareActionProvider.OnShareTargetSelectedListener listener)
Added in API level 14
Sets a listener to be notified when a share target has been selected. The listener can optionally decide to handle the selection and not rely on the default behavior which is to launch the activity
but if you look at the listener http://developer.android.com/reference/android/widget/ShareActionProvider.OnShareTargetSelectedListener.html
public abstract boolean onShareTargetSelected (ShareActionProvider source, Intent intent)
Added in API level 14
Called when a share target has been selected. The client can decide whether to perform some action before the sharing is actually performed.
Note: Modifying the intent is not permitted and any changes to the latter will be ignored.
Note: You should not handle the intent here. This callback aims to notify the client that a sharing is being performed, so the client can update the UI if necessary.
One says you can intercept one says you can't intercept. Looks like you can't by playing with the return value on the listener but I was wondering if anyone had a workaround or fix for this.