title: urban airship take off must be called before shared (kit kat only)
body: <p>I'm trying to learn how to use urban airship to send push notifications, and for that, I created a very simple dummy app that uses it.</p>
  
  <p>The app has a custom autopilot and a custom notification factory in order to test some features. It all works fine on androids with api versions >19.</p>
  
  <p>However, for devices with version 19 (the lowest I need to support) the autopilot is never initialized and so, whenever I try to access <code>UAutopilot.shared()...</code> the app crashes with error </p>
  
  <blockquote>
    <p>takeoff must be called before shared</p>
  </blockquote>
  
  <p>Even calling <code>Autopilot.autoTakeoff(application)</code> doesn't solve it.</p>
  
  <p>MainActivity:
  </p>
  
  <pre><code>public class MainActivity extends AppCompatActivity{
  
      TextView mTextView;
      Button mButton;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          mTextView = (TextView) findViewById(R.id.text);
          mButton = (Button)findViewById(R.id.button2);
          mButton.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                  mTextView.setText(UAirship.shared().getPushManager().getChannelId());
              }
          });
      }
  }
  </code></pre>
  
  <p>CustomAutopilot:
  </p>
  
  <pre><code>class CustomAutopilot extends Autopilot {
  
  @Override
  public void onAirshipReady(UAirship airship) {
      Logger.info("onAirshipReady");
      airship.getPushManager().setUserNotificationsEnabled(true);
      airship.getPushManager().setNotificationFactory(new CustomNotificationFactory(UAirship.getApplicationContext()));
  }
  
  @Nullable
  @Override
  public AirshipConfigOptions createAirshipConfigOptions(@NonNull Context context) {
      Logger.info("setting airship config options");
      AirshipConfigOptions options = new AirshipConfigOptions.Builder()
              .setDevelopmentAppKey("xxxxxxxxxxx")
              .setDevelopmentAppSecret("xxxxxxxxxxx")
              .setDevelopmentLogLevel(Log.DEBUG)
  
              .setInProduction(false)
  
              .setGcmSender("232973289571")
  
              .setNotificationIcon(R.drawable.icon)
              .setNotificationAccentColor(Color.rgb(0, 72, 51))
              .build();
          return options;
      }
  }
  </code></pre>
  
  <p>customNotificationFactory:
  </p>
  
  <pre><code>public class CustomNotificationFactory extends NotificationFactory {
      public CustomNotificationFactory(@NonNull Context context) {
          super(context);
      }
  
      @Nullable
      @Override
      public Notification createNotification(@NonNull PushMessage message, int notificationId) {
          NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(getContext())
                  .setContentTitle("altered " + message.getTitle())
                  .setContentText(message.getAlert())
                  .setSmallIcon(message.getIcon(getContext(), R.drawable.icon))
                  .setColor(Color.rgb(212, 45, 198))
                  .setVibrate(new long[]{100, 50, 100, 200, 100, 50, 100})
                  .setPriority(Notification.PRIORITY_MAX);
  
          return builder.build();
  
      }
  }
  </code></pre>