addCount
(
name
, count
)
|
Add 'count' to the achievement with the given name. This must be a COUNT achievement. The largest number that is supported by this method is the max value of a signed 64-bit integer. If the number is larger than that, it is clamped to that max value before being passed to the servers.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementUpdate> com.meta.horizon.platform.ovr.requests.Achievements.addCount(String name, long count) Parameters name: String
- The api_name of the achievement that will be adding count, which can be retrieved by com.meta.horizon.platform.ovr.models.AchievementDefinition#getName().
count: long
- The value of count that will be added to the achievement.
|
addFields
(
name
, fields
)
|
Unlock fields of a BITFIELD achievement.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementUpdate> com.meta.horizon.platform.ovr.requests.Achievements.addFields(String name, String fields) Parameters name: String
- The api_name of the Bitfield achievement whose field(s) will be unlocked, which can be retrieved by com.meta.horizon.platform.ovr.models.AchievementDefinition#getName().
fields: String
- A string containing either '0' or '1' characters. Every '1' will unlock the field in the corresponding position.
|
getAllDefinitions
()
|
Retrieve all achievement definitions for the app, including their name, unlock requirements, and any additional details.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementDefinitionArray> com.meta.horizon.platform.ovr.requests.Achievements.getAllDefinitions() |
getAllProgress
()
|
Retrieve the progress for the user on all achievements in the app.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementProgressArray> com.meta.horizon.platform.ovr.requests.Achievements.getAllProgress() |
getDefinitionsByName
(
names
)
|
Retrieve the achievement definitions that match the specified names, including their name, unlock requirements, and any additional details.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementDefinitionArray> com.meta.horizon.platform.ovr.requests.Achievements.getDefinitionsByName(String[] names) Parameters names: String []
- The api_names of the achievements used to retrieve the definition information, which can be retrieved by com.meta.horizon.platform.ovr.models.AchievementDefinition#getName().
|
getProgressByName
(
names
)
|
Retrieve the user's progress on the achievements that match the specified names.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementProgressArray> com.meta.horizon.platform.ovr.requests.Achievements.getProgressByName(String[] names) Parameters names: String []
- The api_names of the achievements used to retrieve the progress information, which can be retrieved by com.meta.horizon.platform.ovr.models.AchievementDefinition#getName().
|
unlock
(
name
)
|
Unlock the achievement with the given name. This can be of any achievement type: a simple unlock, count-based, or bitfield-based achievement. The Meta Quest Platform supports three types of achievements: simple, count and bitfield. Each achievement type has a different unlock mechanism. Simple achievements are all-or-nothing. They are unlocked by a single event or objective completion. For example, a simple achievement is unlocked when Frodo reaches Mount Doom. Count achievements are unlocked when a counter reaches a defined target. Define the com.meta.horizon.platform.ovr.models.AchievementDefinition#getTarget() to reach that triggers the achievement. For example, a target achievement is unlocked when Darth Vader chokes 3 disappointing Imperial officers. Bitfield achievements are unlocked when a target number of bits in a bitfield are set. Define the com.meta.horizon.platform.ovr.models.AchievementDefinition#getTarget() and com.meta.horizon.platform.ovr.models.AchievementDefinition#getBitfieldLength() that triggers the achievement. For example, a bitfield achievement is unlocked when Harry destroys 5 of the 7 Horcruxes.
Signature
static Request<com.meta.horizon.platform.ovr.models.AchievementUpdate> com.meta.horizon.platform.ovr.requests.Achievements.unlock(String name) Parameters name: String
- The api_name of the achievement that will be unlocked, which can be retrieved by com.meta.horizon.platform.ovr.models.AchievementDefinition#getName().
|