Xamarin: ログ出力

概要 XamarinのiOS, Androidアプリでログ出力する方法。 OS共通のAPI デバッグ用ビルドの場合のみ出力するAPI。 System.Diagnostics.Debug.WriteLine("System.Diagnostics.Debug.WriteLine"); デバッグ用とリリース用ビルドで出力するAPI。 System.Diagnosti…

Xamarin: ファイルパスの取得

概要 iOS, Androidのシステムディレクトリを取得する。 iOS, Android共通のAPI Xamarin.Essentials.FileSystem及びSystem.Environment.SpecialFolderを使用することができる。 サンプルコード System.Console.WriteLine("FileSystem.CacheDirectory=" + File…

Xamarin: JSONのエンコード、デコード

概要 XamarinでJSONのエンコード、デコードを行う。 依存関係 NuGetでSystem.Text.JSONを追加する必要があります。 *System.Text.JSONについては以下に説明があります。 docs.microsoft.com サンプルコード public MainPage() { InitializeComponent(); Stri…

Xamarin: プロジェクト内のリソースファイルを読み込む

概要 プロジェクト内に任意のファイルを配置し、それをアプリ内で読み込んで使用する。 プロジェクト内に任意のファイルを追加 プロジェクト内に任意のファイルを追加する。 *以下ではSampleText.txtを追加している。 追加したファイルのプロパティを開き、…

Amazon RDS: How to resolve problem that slow query log is stop on the Cloud Watch

AWS

Problem Amazon RDS can output slow query log to Cloud Watch. The cause is unclear but this log is sometimes stop. You can check log is working correctly by SQL below. select sleep(5); *The argument value of the sleep function (5 in above e…

Amazon RDS: スロークエリのログが出力されなくなった時の対応方法

AWS

症状 Amazon RDSではCloud Watchにスロークエリのログを出力することができる。 原因は分からないが、このスロークエリのログが出力されなくなってしまう場合がある。スロークエリが正常に出力されているかどうかは、以下のSQLを実行して確認できる。 select…

How to detect Chrome on iOS by JavaScript when "Request Desktop Site" setting is enabled.

Problem When the setting of "Request Desktop Site" of Chrome on iPhone is enabled, navigator value is changed that not include text CriOS. So you cannot detect browser is Chrome by JavaScript. *This problem and solution is checked on Chrom…