package com.bpa.scalage.message;

import android.app.Activity;
import android.os.Bundle;
import android.os.Message;

import com.bpa.scalage.config.MessageName;

/**
 * 消息中心测试Demo
 */
public class testmode {

    public void Senddata(String str)
    {
        MessageManager.getInstance().sendMessage(MessageName.PullTheDishes.name(),str);
    }

    public void onCreate()
    {
        MessageManager.getInstance().registerMessageReceiver((Activity) null, MessageName.PullTheDishes.name(), new MessageLooper.OnMessageListener() {
            @Override
            public void onMessage(Object msg) {
                if (msg != null) {

                }
            }
        });

    }
    public  void onDestroy()
    {
        MessageName name= MessageName.valueOf("111");
        MessageManager.getInstance().unRegisterMessageReceiver((Activity) null);
    }
}
