package com.bonait.bnframework.common.iot.manager;

import android.content.Context;
import android.widget.Toast;

import com.aliyun.alink.linksdk.tools.ThreadTools;
import com.bonait.bnframework.MainApplication;
import com.bonait.bnframework.common.iot.mode.AppLog;

public class ToastUtils {

    public static void showToast(String message) {
        AppLog.e("客户端接收阿里云数据",message);
        showToast(message, MainApplication.getContext());
    }

    private static void showToast(final String message, final Context context) {
        ThreadTools.runOnUiThread(new Runnable() {
            @Override
            public void run() {
                Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
            }
        });
    }
}
