How to check Google Play services version?

前端 未结 12 1202
走了就别回头了
走了就别回头了 2020-11-28 03:44

In my application, I need to check Google Play services version (which is installed in user\'s device). Is it possible ? And if yes, how can I do that? I searched Google but

12条回答
  •  隐瞒了意图╮
    2020-11-28 03:59

    int registeredVersion = prefs.getInt(PROPERTY_APP_VERSION, Integer.MIN_VALUE);
        int currentVersion = getAppVersion(context);
        if (registeredVersion != currentVersion) {
            Log.i(TAG, "App version changed.");
            return "";
        }
    

提交回复
热议问题