Safe callbacks on Android