A blog post by Pushbullet detailed a solution to this problem: create a BroadcastReceiver
which listens for PACKAGE_REPLACED
:
<receiver android:name=".UpdateReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:path="<YOUR_PACKAGE_NAME_HERE>"
android:scheme="package" />
</intent-filter>
</receiver>
Which will be called whenever your app is updated. When this is called, you should forget your registration id and re-register with GCM.