Protect toasts from being disabled by feature introduced in Android >= 4.2 (Jelly Bean).
Add dependency to gradle build script:
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'moe.banana:toast-compat:<version>'
}
And toast:
ToastCompat.makeText(context, "hello world!", Toast.LENGTH_SHORT).show();
(The MIT License)