Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import org.contentauth.c2pa.Action
import org.contentauth.c2pa.Builder
import org.contentauth.c2pa.BuilderIntent
import org.contentauth.c2pa.C2PA
import org.contentauth.c2pa.C2paSettings
import org.contentauth.c2pa.C2PASettings
import org.contentauth.c2pa.CertificateManager
import org.contentauth.c2pa.DigitalSourceType
import org.contentauth.c2pa.FileStream
Expand Down Expand Up @@ -526,20 +526,25 @@ class C2PAManager(private val context: Context, private val preferencesManager:
Timber.d( "Starting signImageData")
Timber.d( "Manifest JSON: ${manifestJSON.take(200)}...") // First 200 chars

val createdLabels = (Builder.DEFAULT_CREATED_ASSERTION_LABELS + listOf(
"proofmode.metadata",
)).joinToString(", ") { "\"$it\"" }

val settingsJson = """
{
"version": 1,
"builder": {
"created_assertion_labels": ["c2pa.actions"]
}
}
""".trimIndent()
{
"version": 1,
"builder": {
"created_assertion_labels": [$createdLabels]
}
}
""".trimIndent()

val settings = C2paSettings().apply {
val settings = C2PASettings.create().apply {
updateFromString(settingsJson, "json")
}

val builder = Builder.fromJson(manifestJSON, settings)
settings.close()
if (!embed)
builder.setNoEmbed()

Expand Down Expand Up @@ -574,7 +579,7 @@ class C2PAManager(private val context: Context, private val preferencesManager:
)
builder.addAction(action)

// builder.setIntent(BuilderIntent.Create(DigitalSourceType.DIGITAL_CAPTURE))
builder.setIntent(BuilderIntent.Create(DigitalSourceType.DIGITAL_CAPTURE))

val ingredientJson = JSONObject().apply {
put("title", fileName)
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ listenablefuture = "9999.0-empty-to-avoid-conflict-with-guava"
zxing = "3.5.4"
bitcoinj = "0.14.7"
#c2pa = "0.0.9-beta.4"
c2pa = "0.0.9-beta.5"
c2pa = "0.0.9-beta.6"
play-integrity = "1.6.0"

# Testing
Expand Down