yohhoyの日記

技術的メモをしていきたい日記

UserManager.isUserAGoat

Android API Level 17(Android 4.2)以降では、ユーザがテレポーテーション対象のヤギ(Goat)か否かを返す関数 UserManager.isUserAGoat が提供される。*1

  • API Level 17〜20:常にfalseを返す。
  • API Level 21(Android 5.0)以降:高度なヤギ認識技術(advanced goat recognition technology)を用いて、ゲーム "Goat Simulator" がインストールされている場合に限りtrueを返す。

public boolean isUserAGoat()

Used to determine whether the user making this call is subject to teleportations.
As of LOLLIPOP, this method can now automatically identify goats using advanced goat recognition technology.

Returns:

  • boolean: Returns true if the user making this call is a goat.
UserManager.isUserAGoat

関連URL

*1:WebブラウザChromeにもテレポートされたヤギ(Goats Teleported)ネタがある。Google社はヤギのテレポーテーションがお好き?公式ブログ記事 "Mowing with goats", "The goats are baaaahk!" 参照