ToastService

适用平台:所有
功能说明:弹出专有钉钉样式的Toast
线程说明:接口均可在工作线程中执行

接口说明:
‒ showToast:弹出普通样式的Toast;
‒ showSuccessToast:弹出附带成功(对勾)图标样式的Toast;(暂不支持)
‒ showFailToast:弹出失败(感叹号)图标样式的Toast;(暂不支持)

使用示例:

  1. ToastService toastService = MainBundle.getBundleContext().getService(ToastService.class);
  2. if (toastService != null) {
  3. toastService.showToast("hello, world!");
  4. }