@Nullable
  public String getPackageName() {
    try {
      final Method method = contextClass.getMethod("getPackageName");
      return (String) method.invoke(getContextInstance());
    } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {
      e.printStackTrace();
      return null;
    }
  }
@return the package name of the Android app if available, otherwise, null
src/main/java/com/google/maps/android/Context.java