私はXamarin.Formsアプリケーションでプッシュ通知を実装しようとしています。
私はthis Microsoft docに従ってきましたが、Xamarin.Forms Azureプッシュ通知 - "MobileServiceInvalidOperationException:このディレクトリまたはページを表示する権限がありません"
await push.RegisterAsync(RegistrationID, templates);
ライン上Unauthorized
エラーを取得しています。次のように例外がある:
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: You do not have permission to view this directory or page.
私が追加したSender ID
(Firebaseから)
public class PushHandlerBroadcastReceiver : GcmBroadcastReceiverBase<GcmService>
{
public static string[] SENDER_IDS = new string[] { "<my_sender_id_here>" };
}
私もFirebaseから(Server key
を追加した(彼らは、ドキュメントの「プロジェクト番号」それを呼び出します) )をAzureポータルの通知欄の「Google(GCM)APIキー」に追加します。
私のAVDでGoogleアカウントにサインインしました。 (Azure AD B2Cを使用してAzure MobileServicesClientにサインインしましたが、ここでは問題はないと思っています)
other people with this same issueが見つかりました(「許可」を検索し、直接リンクは機能しません)。それの1つのインスタンスのみ。そして誰もその解決法を提供しません。
私には何が欠けていますか?
古典的なGoogle。 – Marcus
これは私のために働きました。私は、 'push.RegisterAsync(...))の代わりに、代わりのコード(' client.InvokeApiAsync(...) 'メソッドを使いました。ありがとうエイドリアン! –
Marcus