private void GetRemoteInput() { RemoteInput remoteInput; foreach (var item in action.GetRemoteInputs()) { if (item.ResultKey != null) { remoteInput = item; break; } } }
public bool ActionRepresentDirectReply() { //Direct reply action is a new feature in Nougat, so when called on Marshmallow and backwards, so in those cases an Action will never represent a Direct Reply. if (Build.VERSION.SdkInt < BuildVersionCodes.N) { return(false); } remoteInputs = action.GetRemoteInputs(); if (remoteInputs == null || remoteInputs?.Length == 0) { return(false); } //In order to consider an action representing a Direct Reply we check for the ResultKey of that remote input. foreach (var remoteInput in remoteInputs) { if (remoteInput.ResultKey != null) { remoteInputDirectReply = remoteInput; return(true); } } return(false); }