0
0

More than 1 year has passed since last update.

端末のHMSバージョンは次のコードで取得できます。

public String getHmsVersion(Context context) {
    String version = null;

    try {
        PackageManager packageManager = context.getPackageManager();
        if (null != packageManager) {
            PackageInfo packageInfo = packageManager.getPackageInfo("com.huawei.hwid", 0);
            if (null != packageInfo) {
                version = packageInfo.versionName;
            }
        }
    } catch (PackageManager.NameNotFoundException exception) {
        exception.printStackTrace();
    }

    return version;
}
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