보관처리는 관리자가 패키지 이름으로 보관처리 앱을 지정할 수 있는 문자열 값을 허용하는 messages_archival 키를 사용하여 Google 메시지에서 구성됩니다. 값이 비어 있거나 null이거나 키가 없으면 보관이 사용 중지됩니다. 값이 지정되면 보관처리가 사용 설정되고 Google 메시지에서 메시지 이벤트에 대해 지정된 패키지 이름으로 명시적 브로드캐스트를 전송합니다.
보관처리 앱에 대한 알림
명시적 브로드캐스트가 지정된 보관 앱으로 전송되며 작업은 다음과 같습니다.
GOOGLE_MESSAGES_ARCHIVAL_UPDATE
경우에 따라 메시지 URI가 브로드캐스트 추가 항목에 포함되며, 이는 브로드캐스트를 트리거한 메시지를 가져오는 데 사용할 수 있습니다.
com.google.android.apps.messaging.EXTRA_ARCHIVAL_URI
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# RCS Google Messages archival\n\nBackground\n----------\n\nThis document outlines how to integrate with, test, and validate the RCS\narchival feature in Google Messages.\n\n### Solution overview\n\n- **Client-side archival:** Archival vendors need to develop an Android app for IT admins to deploy on their managed devices.\n- **Powered by Google Messages:** This feature requires Google Messages to be the [default messaging app](https://support.google.com/messages/answer/6089066). IT admins can use Android Enterprise controls to enforce the default.\n- **Requires Android Enterprise:** This feature is available only on fully managed devices.\n\n| **Important:** Work profiles (on neither personally-owned nor company-owned devices) are not supported.\n\n### Workflow\n\n**Figure 1.** RCS archival workflow.\n\n1. IT admin deploys archival app using Android Enterprise.\n2. **Optional** : IT admin programmatically configures archival app using Android Enterprise controls.\n - Required:\n - The archival app needs [`READ_SMS`](/reference/android/Manifest.permission#READ_SMS) permission\n - Recommended:\n - [Disallow user control](/reference/android/app/admin/DevicePolicyManager#setUserControlDisabledPackages(android.content.ComponentName,%20java.util.List%3Cjava.lang.String%3E)) over Google Messages and archival app\n - IT admin [enforces](/reference/android/os/UserManager?_gl=1*wrcrs6*_up*MQ..*_ga*MTgxMTgzNzc3NC4xNzM4NjY5MDMy*_ga_6HH9YJMN9M*MTczODY2OTAzMS4xLjAuMTczODY2OTAzMS4wLjAuMTQ0OTczNTMyMg..#DISALLOW_CONFIG_DEFAULT_APPS) Google Messages as the default SMS/RCS client\n - Optionally, IT admin can pre-enroll archival app using MCM as well, if archival solution supports MCM\n3. IT admin enables archival in Google Messages using [MCM](#google-messages-mcm-schema).\n4. Google Messages writes message data to Android on message events. A message event is one of: message sent, message received, message edited, or message deleted.\n5. Google Messages [notifies archival app](#notification-to-archival-app) of new message event, for both RCS and SMS/MMS messages.\n6. The archival app reads the message data from the [`Telephony`](/reference/android/provider/Telephony) provider.\n7. The archival app batches updates and sends them to the server.\n\nImplementation\n--------------\n\n### Google Messages MCM schema\n\nArchival is configured in Google Messages using the `messages_archival` key,\nwhich accepts a string value for admins to specify their archival app by package\nname. If the value is empty, null, or the key is not present, archival is\ndisabled. If the value is specified, archival is enabled, and Google Messages\nsends an explicit broadcast to the specified package name on a message event.\n\n### Notification to archival app\n\n- An explicit broadcast is sent to the specified archial app, with the action: `GOOGLE_MESSAGES_ARCHIVAL_UPDATE`\n- In some cases, the message URI is included in the broadcast extras, which can be used to fetch the message that triggered the broadcast: `com.google.android.apps.messaging.EXTRA_ARCHIVAL_URI`\n\n### Archival app requirements\n\n**Required:**\n\n- Claim the [FOREGROUND_SERVICE permission](/reference/android/Manifest.permission?_gl=1*ir8law*_up*MQ..*_ga*NDcyNDIyNTk3LjE3NDAzOTEzODM.*_ga_6HH9YJMN9M*MTc0MDM5MTM4My4xLjAuMTc0MDM5MTM4My4wLjAuMTM5NTk3NjU1Nw..#FOREGROUND_SERVICE).\n- Declare a foreground service in your manifest, which includes the intent filter for the archival update broadcast, and is [permission-granted](/privacy-and-security/risks/access-control-to-exported-components#permission-based-access-control-to-exported-components-mitigations) to assure only Google Messages can start the service.\n\n \u003cservice\n android:enabled=\"true\"\n android:foregroundServiceType=\"shortService\"\n android:name=\".TestService\"\n android:exported=\"true\"\n android:permission=\"android.permission.WRITE_SMS\"\u003e\n \u003cintent-filter\u003e\n \u003caction android:name=\"GOOGLE_MESSAGES_ARCHIVAL_UPDATE\" /\u003e\n \u003c/intent-filter\u003e\n \u003c/service\u003e\n\n- Implement that service to handle the intent, read from telephony, and determine the type of the message event by comparing the prior state of telephony with the current state, and then cache both the message event to be uploaded to the archival service backend, and the updated state of Telephony to compare against on the next event.\n\n**Recommended:**\n\n- Batch updates of message events to the server with [`JobScheduler`](/reference/android/app/job/JobScheduler).\n\n | **Important:** Don't attempt to sync every message event with your backend in your service.\n - IT admins can guarantee your app isn't killed or your app data deleted by users, making sure your batched updates can proceed as expected.\n - Minimizing foreground service time to just the critical archival requirement minimizes UX and system health impact.\n- Enable programmatic configuration of your app using MCM (as mentioned in\n [Messages MCM schema](#google-messages-mcm-schema)), so users don't need to sign in or specify server\n enrollment details manually.\n\nTesting\n-------\n\nTo test your implementation, use [TestDPC](https://github.com/googlesamples/android-testdpc) or your preferred EMM\nclient."]]