私は両方のトークンを必要としています...私はPushNotification Pluginを使用しています...私はそのトークンを返すことを知っています...しかし、私はドキュメントが非常に悪いと思う...私は通知を表示する必要はありません...私はトークンが必要なのです... ONLY IT 誰かが私を救うことができますか?ほんとうに必要だ。アプリデベロッパーで設定が必要ですか? 私はすでにアンドロイドの送信者IDを持っていると私は両方でプラグインを初期化:AppDelegateとMainActivity ヘルプPLEEEAAAAAAASExamarinフォームでアンドロイドとIOSデバイストークンを取得する方法は?
が私のクラス、GoogleとAppleの両方がであなたにトークンを送信しますPCL
using PushNotification.Plugin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json.Linq;
using PushNotification.Plugin.Abstractions;
namespace neoFly_Montana
{
public class PushNot : IPushNotificationListener
{
public void OnError(string message, DeviceType deviceType)
{
throw new NotImplementedException();
}
public void OnMessage(JObject values, DeviceType deviceType)
{
throw new NotImplementedException();
}
public void OnRegistered(string token, DeviceType deviceType)
{
throw new NotImplementedException();
}
public void OnUnregistered(DeviceType deviceType)
{
throw new NotImplementedException();
}
public bool ShouldShowNotification()
{
throw new NotImplementedException();
}
}
}
ヘイジョイス!私はPushNotificationPluginの使用をお勧めしません。あなたは抽象化から多くを得ることができず、プッシュ通知なしでそれを処理するためのコードを追加するのはかなり簡単です。より良いツールは、Mobile Center Push SDK(https://mobile.azure.com)です。モバイルセンターでは、プッシュ通知の管理が非常に簡単になりました。 –