Skip to content

Trying to recall why we didn't want a GCM static dependency #445

Closed
@inlined

Description

@inlined

I started working on ParseServer #1369 and was trying to implement this the same way as we did v3--without any compile-time dependencies on the GMS library.

Between GCM v3 and v4, things have become much more sophisticated. Now there's the InstanceId API, which is basically OAuth for the device instead of the user. If you want to send a GCM message to that device, you get the device to issue a "GCM" scope token. If I write this all from scratch, I'm going to have to write compatibility shims for Messenger on older platforms, manage crypto keys, sign values, etc. There's a very non-zero chance I'll get some of this wrong, so I wanted to revisit our decision to not depend on the GMS libraries.

The two reasons I can recall are portability or file size, but neither of those are really valid. The GMS client libraries are themselves weakly bound to underly GMS service. It's actually totally possible for Fire Phones to implement some of the same services (though the client Android Manifest would have to explicitly trust the package name). The file size issue doesn't seem to be a big deal anymore either since we could require just com.google.android.gms:play-services-gcm:8.4.0

Side Note: With the GCM v4 upgrade, we might also want to consider using the device's Instance ID as the ParseInstallation.installationId for better record stability (since installations are already upserted by that field). I don't recall if there's still regexes anywhere that expect that to be a UUID though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions