Home / Technology / Google Messages has a hidden RCS API for third-party apps

Google Messages has a hidden RCS API for third-party apps

Update 2 (07/09/2021 @ 16:49 ET): We’ve learned that this RCS API is not currently intended for use by third-party apps. Click here for more information.

Previous updates

Update 1 (07/09/2021 @ 14:53 ET): We have updated the article with information that the API can only be found in the Samsung-exclusive version of the Google Messages app. Click here for more information.

RCS, which stands for Rich Communication Services, is generally seen as the successor to SMS. It supports features such as group chat management, higher quality file sharing, read receipts, write indicators and end-to-end encryption. In order to use the RCS chat protocol, it must be supported by the network, the phone̵

7;s operating system and the phone’s messaging app via an API. US carriers dragged their feet too long to adopt RCS, so Google bypassed them and added its own RCS backend to the Google Messages app. However, on Android, only The Google Messages app has access to the Android RCS API. This can be changed if Google opens its “Android Messages API.”

Back in 2019, we learned that Google was working on adding an RCS API. Unfortunately, the APIs were hidden from developers and can only be used by apps on a hidden permission list – which includes the Google Messages app. While the Google Messages app has improved a lot lately, it is still updated with the basic features found in many other text messaging apps for Android. The problem with switching to one of the other apps is that you will not be able to send messages over RCS, so you will lose all the features we talked about above. However, we found evidence that Google has an unpublished “Android Messages API” that allows any third-party text messaging app to send SMS / MMS / RCS messages using Google Messages.

A breakdown of APK can often predict features that may come in a future update of a program, but it is possible that some of the features we mention here may not do so in a future release. This is because these features are not currently implemented in live build and can be pulled at any time by the developers in a future build.

As Google Messages rolled out today on Google Play, we decoded the APK and discovered the following strings in the resources:

With this permission the app will be allowed to send SMS/MMS/RCS using Android Messages. It will have an access to send messages without any extra approvals.
Permission to send SMS/MMS/RCS messages using Android Messages API

These strings clearly describe a permission that third-party messaging apps may request to be able to send SMS, MMS or RCS messages via the Google Messages app. Within the Google Messages app’s Manifest file, we also found permission for messaging apps to declare:

The permission type is listed as “dangerous”, which means that it is not given to an app that requests it without a confirmation being displayed to the user. This is also indicated in the strings built in above, which state that an app that has the permission can “send messages without extra approvals ”, which means that approval must first be given. The permission is grouped under the SMS category, which makes sense, since it is only meant to be used by messaging apps.

While we were hoping to see Google open the Android platform’s RCS API, it’s potentially a big advantage to have Google Messages to handle messaging. This may mean that all RCS messages sent via a third-party messaging app will use Google’s Chat service, which is by far the most used RCS implementation since none of the carriers’ versions have taken off.

We have not found an announcement from Google on this Android Messages API yet, but we hope to see it open soon. Third-party text messaging apps are a drawback right now, as they lack RCS support, but this API will mean you can use your favorite text messaging app and enjoy the benefits of RCS. Of course, the third-party text messaging app must actually implement the new API, but it does not look like it will be too difficult to implement.

Update 1: API only found in the Samsung version of the app

Shortly after we published this article, we learned that the strings and the Manifest entry for the Android Messages API can only be found in the Google Messages app for Samsung Galaxy phones. It’s the same app and package name, but Google Play is dynamically rolling out this version of the app for Samsung Galaxy phones. These entries were added several versions ago so that the API itself does not appear to be new. We’m not sure why the listings only appear in the version of the Samsung Phones app, but it is possible that Google has created the API so that Samsung’s Messaging app can use Google’s Chat service without users having to switch apps. however, not why this API can not be opened for other apps, nor do we see any evidence yet in the Samsung Messages app itself that it uses this API. Hopefully, the Google API will open all third-party messaging apps by including it in the main version of the app.

Update 2: API limited to Samsung apps

Digging deeper into the Google Messages app (h / h) 9to5Google), we found evidence that this Android Messages API is currently restricted to use of selected Samsung apps. In particular, it seems that this feature is aimed at allowing Samsung laptops and connected tablets to send SMS, MMS and RCS messages via Google Messages. This is part of Samsung’s function for call and call continuity.

The current permission list includes the package for call and message continuity, ie “Com.samsung.android.mdecservice”, among other apps. The code checks the package name and signature of the requested app before giving access to the API. A flag gives all apps access to the API, but this value is clearly not intended for public use. (The flag is appropriately named “allow_any_app_to_connect_do_not_use_in_public_builds”.)

Thanks to PNF Software for giving us a license to use JEB Decompiler, a professional reverse engineer tool for Android applications.

Source link