Incorporated all changes recommended by the code review for the iOS and Android samples.