title: How to make a synchronous call using Retrofit on Android
body: <p>I have a login view in an android app that I would like to function synchronously. That is, I want the user to stay on the page until the login rest call completes. If it fails, the user can reenter their id and password. If it is successful they are routed to a welcome page.</p>
  
  <p>Retrofit gives examples of how to make synchronous calls. But it comes with a warning that "synchronous requests trigger app crashes on Android 4.0 or newer. You’ll run into the <code>NetworkOnMainThreadException</code> error." I've seen various responses on stackoverflow including using Otto and Robospice. Others to use homegrown listeners and others to use synchronous requests. </p>
  
  <p>What would be the easiest, safest way to implement this functionality.</p>