请教,我想获取推送的消息,然后再App内部状态栏使用,怎么弄
我想获取推送的消息,然后再App内部状态栏使用,求指教
using UnityEngine;
using System.Collections;
using JPush;
using System.Collections.Generic;
using System;
using UnityEngine.UI;
#if UNITY_IPHONE
using LitJson;
#endif
public class Notice : MonoBehaviour {
string str_unity = "";
int callbackId = 0;
void Start () {
gameObject.name = "Main Camera";
JPushBinding.Init(gameObject.name);
JPushBinding.SetDebug(true);
}
void Update () {
}
void OnReceiveMessage(string jsonStr)
{
//Debug.Log("recv----message-----" + jsonStr);
gameObject.GetComponent<Text>().text = "2222222222";
//str_unity = jsonStr;
}
void OnReceiveNotification(string jsonStr)
{
//Debug.Log("recv---notification---" + jsonStr);
gameObject.GetComponent<Text>().text = "3333333333";
}
}