Type Event Revision Release 2025.3721 Keywords communication, parental approval, contact permissions, communicationEvent See also plugin.ageRange.requestCommunicationPermission() plugin.ageRange.*
Communication permission event dispatched in response to plugin.ageRange.requestCommunicationPermission() and background responses.
String. The string "communicationEvent".
Boolean. true if an error occurred, false otherwise.
String. The contact handle (phone, email, or custom ID) from the request.
String. Type of handle: "phone", "email", or "custom". Android only in responses.
Boolean. true if the permission request was successfully sent to the parent/guardian. iOS only.
Boolean. true if this is an asynchronous response from a parent/guardian. iOS only.
Boolean. true if the parent/guardian approved communication, false if denied.
iOS: Present when isBackgroundResponse is true
Boolean. true if user is under supervision (Family Link). Android only.
Boolean. true if communication requires parental approval. Android only.
String. Supervision status. Android only.
Values: - "supervised" - User is supervised - "approvalPending" - Approval pending - "approvalDenied" - Approval denied
String. Platform identifier: "android" or "ios".
String. App store identifier. Currently only "google" for Android.
String. Platform-specific informational message.
Android: Explains that Android doesn’t have direct communication approval equivalent.
String. Error description if isError is true.
local function ageRangeListener(event)
if event.name == "communicationEvent" then
print("Handle:", event.handle)
if event.platform == "android" then
print("Platform:", event.platform)
print("Message:", event.message)
if event.isSupervised then
print("User is supervised")
print("Requires approval:", event.requiresParentalApproval)
print("Status:", event.userStatus)
else
print("User not supervised")
end
else
-- iOS
if event.questionSent then
print("Request sent to parent")
elseif event.isBackgroundResponse then
if event.approved then
print("Communication approved")
else
print("Communication denied")
end
end
end
if event.isError then
print("Error:", event.errorMessage)
end
end
end