我想发出一个推送通知,当用户尚未登录游戏时触发该通知。我想向用户发送消息//---- Setup Handles ----
//Create a Handle to come back to window 1
string currentHandle = driver.CurrentWindowHandle;
//Creates a target handle for window 2
string popupWindowHandle = wait.Until<string>((d) =>
{
string foundHandle = null;
// Subtract out the list of known handles. In the case of a single
// popup, the newHandles list will only have one value.
List<string> newHandles = driver.WindowHandles.Except(originalHandles).ToList();
if (newHandles.Count > 0)
{
foundHandle = newHandles[0];
}
return foundHandle;
});
//Now you can use these next 2 lines to continuously swap
//Swaps to window 2
driver.SwitchTo().Window(popupWindowHandle);
// Do stuff here in second window
//Swap back to window 1
driver.SwitchTo().Window(currentHandle);
// Do stuff here in first window
。我想我可以使用离线通知来做到这一点。但是我不知道该怎么做。谢谢。
PS:我使用Unity积分一个信号。
答案 0 :(得分:0)
https://docs.unity3d.com/ScriptReference/iOS.LocalNotification.html 对于IOS,Unity在IOS中具有本地通知API,您可以观看。
https://assetstore.unity.com/packages/tools/integration/simple-android-notifications-free-68626 对于Android,Unity不是Souport,但是您可以免费下载插件,请检查此链接。