/** * Sets the file name of a file for persisting the share history which history will be used for * ordering share targets. This file will be used for all view created by {@link * #onCreateActionView()}. Defaults to {@link #DEFAULT_SHARE_HISTORY_FILE_NAME}. Set to <code>null * </code> if share history should not be persisted between sessions. * * <p><strong>Note:</strong> The history file name can be set any time, however only the action * views created by {@link #onCreateActionView()} after setting the file name will be backed by * the provided file. * * <p> * * @param shareHistoryFile The share history file name. */ public void setShareHistoryFileName(String shareHistoryFile) { mShareHistoryFileName = shareHistoryFile; setActivityChooserPolicyIfNeeded(); }
/** * 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. * * <p><strong>Note:</strong> If you choose the backing share history file you will still be * notified in this callback. * * @param listener The listener. */ public void setOnShareTargetSelectedListener(OnShareTargetSelectedListener listener) { mOnShareTargetSelectedListener = listener; setActivityChooserPolicyIfNeeded(); }