Skip to content

Commit f50d4d8

Browse files
malandr2copybara-github
authored andcommitted
Added consent sync snippet
PiperOrigin-RevId: 880990090
1 parent c7c2392 commit f50d4d8

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

samples/HelloWorld/Assets/Snippets/UMPSnippets.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@ void Start()
2222
}
2323
// [END request_consent]
2424

25+
26+
void StartWithSyncIdentifier()
27+
{
28+
// [START sync_consent_identifier]
29+
// Create a ConsentRequestParameters object with a consent sync ID.
30+
ConsentRequestParameters requestParameters = new ConsentRequestParameters
31+
{
32+
ConsentSyncId = "CONSENT_SYNC_ID"
33+
};
34+
// [END sync_consent_identifier]
35+
36+
// Request an update of the user's consent information.
37+
ConsentInformation.Update(requestParameters, OnConsentInfoUpdated);
38+
}
39+
2540
void OnConsentInfoUpdated(FormError consentError)
2641
{
2742
if (consentError != null)

0 commit comments

Comments
 (0)