如何确认安卓应用是否使用GCM?已收到Firebase迁移至FCM的邮件
Hey there! Let's walk through how to figure out if your Android app is using GCM, plus what this migration means for your current push services (OneSignal and Airbop).
确认你的安卓应用是否使用GCM
Start with these checks to spot direct GCM usage in your app:
- Check build.gradle dependencies: Look in your module-level
build.gradlefile for lines likecom.google.android.gms:play-services-gcm— this is the old GCM library. If you see this, your app is directly using GCM. - Scan for GCM-specific code: Search your codebase for classes like
com.google.android.gcm.GCMRegistrar,GCMListenerService, or any logic that registers for GCM tokens. These are clear signs GCM is in use. - Inspect AndroidManifest.xml: Look for
<service>or<receiver>tags related to GCM, like receivers handlingcom.google.android.c2dm.intent.RECEIVEor services extending GCM's base classes.
关于你的推送服务:OneSignal & Airbop
Let's break down what this migration means for each tool you're using:
- OneSignal: Good news — OneSignal has supported FCM as its Android push backend for years, and it's the default setup now. If you're using a recent version of the OneSignal SDK, your Android and Web pushes are already running on FCM. Just double-check your OneSignal dashboard to confirm your Android app is linked to a Firebase project (FCM) instead of the old GCM setup.
- Airbop: This one needs closer attention. Airbop is an older service that originally relied on GCM. First, verify if Airbop even supports FCM now — if it's no longer maintained or doesn't offer FCM integration, you'll need to plan a migration to a modern service like OneSignal (to unify your push handling) or another FCM-compatible tool. If it does support FCM, follow Airbop's docs to update your app's configuration to use FCM credentials instead of GCM.
Next Steps to Stay Compliant
- Resolve Airbop first: If it supports FCM, update your config immediately. If not, start migrating your app push traffic to OneSignal or another FCM-ready service.
- Clean up direct GCM references: Remove any
play-services-gcmdependencies from your build files, and replace any GCM-specific code with FCM equivalents (likeFirebaseMessagingService). - Test thoroughly: Send test pushes to your Android app after making changes to ensure everything works as expected — you don't want users to stop getting notifications.
内容的提问来源于stack exchange,提问作者Udi Burg
相关产品推荐
相关产品推荐

