0
0

More than 1 year has passed since last update.

Xamarinのアンドロイドアプリで、サービスからアプリを起動するとApplication.Currentがnullになる

Last updated at Posted at 2021-11-14

Xamarinのアンドロイドアプリで、サービスからアプリを起動するとApplication.Currentがnullになる現象が発生し、以下の情報から、サービスのOnCreate時、以下の2行を

Forms.Init(this, bundle);
Xamarin.Forms.Application.Current = new Xamarin.Forms.Application();

で動作するようになった

情報元
https://docs.microsoft.com/ja-jp/xamarin/xamarin-forms/platform/native-forms

以下も参考にさせていただきました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0