HTTP instead of HTTPS in Android SDK Manager

Sometimes (often?) downloads in the Android SDK Manager are annoyingly slow. The problem is that downloads are done over HTTPS. HTTPS is more secure but also slower than HTTP. Fortunately, Google allows us to change this behavior.

You can do this in the Android SDK Manager’s options. You find them in the menu bar under Tools -> Options....

Options menu item in Android SDK Manager

Important: This menu item is not available if you started the SDK Manager from Eclipse. You need to start the standalone version (in the SDK directory: /SDK Manager.exe on Windows, and /tools/android everywhere else). Why this behavior is different is beyond me.

In the options select Force https://... source to be fetched using http://....

Force SDK manager to download via http

That’s it.

Creating an Application class in Mono for Android

Android provides an Application class.

Base class for those who need to maintain global application state.

Here’s how to create such a class in Mono for Android:

[Application]  // <-- Attribute required
class MyApp : Application {
  // Required constructor
  public MyApp(IntPtr javaReference, JniHandleOwnership transfer) 
    : base(javaReference, transfer) { }

  // Test method - not required
  public override void OnCreate() {
    base.OnCreate();
  }
}

Note: There can only be one such class in an Android application.