使用前提
使用 TapTap.Billboard 前提是必须依赖以下库:
命名空间
using TapTap.Billboard;
接口描述
1.初始化
var dimensionSet = new HashSet<Pair<string, string>>();
Pair<string, string> pair = new Pair<string, string>("platform", "ios");
Pair<string, string> location = new Pair<string, string>("location", "CN");
dimensionSet.Add(pair);
dimensionSet.Add(location);
var templateType = "navigate";
var billboardServerUrl = "https://your-billboard-server-url";
var config = new TapConfig.Builder()
.ClientID("your_client_id")
.ClientToken("your_client_token")
.ServerURL("https://your_server_url")
.RegionType(RegionType.CN)
.TapBillboardConfig(dimensionSet, templateType, billboardServerUrl)
.ConfigBuilder();
TapBootstrap.Init(config);
2.打开公告
TapBillboard.OpenPanel((any, error) =>
{
if (error != null)
{
} else
{
}
});
3.获取小红点
TapBillboard.QueryBadgeDetails((badgeDetails, error) =>
{
if (error != null)
{
}
else
{
if (badgeDetails.showRedDot == 1) {
} else {
}
}
});
4.注册自定义事件监听
TapBillboard.RegisterCustomLinkListener(url =>
{
});
5.解除已注册的自定义事件监听
TapBillboard.UnRegisterCustomLinkListener(registerdListener);