Google Cloud IoT Integration in Mobile IoT App

NOVASOLUTIONS.TECHNOLOGY is engaged in the development, support and maintenance of iOS, Android, PWA mobile applications. We have extensive experience and expertise in publishing mobile applications in popular markets like Google Play, App Store, Amazon, AppGallery and others.
Development and support of all types of mobile applications:
Information and entertainment mobile applications
News apps, games, reference guides, online catalogs, weather apps, fitness and health apps, travel apps, educational apps, social networks and messengers, quizzes, blogs and podcasts, forums, aggregators
E-commerce mobile applications
Online stores, B2B apps, marketplaces, online exchanges, cashback services, exchanges, dropshipping platforms, loyalty programs, food and goods delivery, payment systems.
Business process management mobile applications
CRM systems, ERP systems, project management, sales team tools, financial management, production management, logistics and delivery management, HR management, data monitoring systems
Electronic services mobile applications
Classified ads platforms, online schools, online cinemas, electronic service platforms, cashback platforms, video hosting, thematic portals, online booking and scheduling platforms, online trading platforms

These are just some of the types of mobile applications we work with, and each of them may have its own specific features and functionality, tailored to the specific needs and goals of the client.

Showing 1 of 1 servicesAll 1735 services
Google Cloud IoT Integration in Mobile IoT App
Medium
~3-5 business days
FAQ
Our competencies:
Development stages
Latest works
  • image_mobile-applications_feedme_467_0.webp
    Development of a mobile application for FEEDME
    756
  • image_mobile-applications_xoomer_471_0.webp
    Development of a mobile application for XOOMER
    624
  • image_mobile-applications_rhl_428_0.webp
    Development of a mobile application for RHL
    1052
  • image_mobile-applications_zippy_411_0.webp
    Development of a mobile application for ZIPPY
    947
  • image_mobile-applications_affhome_429_0.webp
    Development of a mobile application for Affhome
    862
  • image_mobile-applications_flavors_409_0.webp
    Development of a mobile application for the FLAVORS company
    445

Google Cloud IoT Integration in Mobile IoT Applications

Google Cloud IoT Core was officially deprecated on August 16, 2023. If you came here asking "how to integrate GCP IoT Core" — important to know this right now. Projects relying on it should have migrated to alternatives.

What Instead of Google Cloud IoT Core

Google recommends several migration paths:

1. MQTT bridge via Cloud Pub/Sub directly. Devices publish to Cloud Pub/Sub via custom MQTT broker (HiveMQ, EMQX, Mosquitto), not managed GCP IoT Core. Mobile app subscribes to Pub/Sub topics via gRPC API.

2. Partner platforms. Google officially directs to Clearblade IoT Core and Cognite, which offer compatible API. Migration from Cloud IoT Core to Clearblade — minimal client code changes.

3. Switch to different cloud IoT provider — AWS IoT Core or Azure IoT Hub if no GCP lock-in.

We most often recommend Cloud Pub/Sub + custom MQTT broker for clients wanting to stay in GCP ecosystem.

Mobile App Architecture Based on GCP

Direct Cloud Pub/Sub connection via gRPC requires Google Cloud credentials. Can't embed Service Account key in app. Use Firebase Authentication + Cloud Firestore/Realtime Database as transport layer for IoT states.

It works like this: IoT devices publish telemetry → MQTT broker → Cloud Pub/Sub → Cloud Function → Firestore. Mobile app reads states from Firestore via realtime subscriptions and writes commands there. Separate Cloud Function listens for Firestore changes and publishes commands back to MQTT broker to device.

On Flutter via cloud_firestore package:

FirebaseFirestore.instance
  .collection('devices')
  .doc(deviceId)
  .snapshots()
  .listen((snapshot) {
    final state = DeviceState.fromJson(snapshot.data()!);
    // update UI
  });

On React Native — @react-native-firebase/firestore with same API.

Cloud Run + MQTT for IoT

More correct production architecture: EMQX or HiveMQ on Cloud Run / GKE → Cloud Pub/Sub → Cloud Functions → Firestore. EMQX supports Rule Engine (analog of AWS IoT Rules): can publish to Pub/Sub by conditions directly from broker without separate Lambda/Functions.

Mobile client connects to EMQX via MQTT over WebSocket with JWT auth (issued by Firebase Auth). EMQX validates token via HTTP Authentication hook — request to your backend on every connection.

Firebase Cloud Messaging for IoT Events

Push by IoT events — native strong point of GCP stack. Cloud Function triggered by Pub/Sub message, sends FCM notification via Admin SDK:

await admin.messaging().send({
  token: userFcmToken,
  notification: { title: 'Motion Sensor', body: 'Motion detected in hallway' },
  data: { deviceId: '...', eventType: 'motion' }
});

On Flutter firebase_messaging handles notifications in background via onBackgroundMessage handler. Important: handler must be top-level function, not class method — else crash receiving notification in killed state.

Timeline

Basic architecture (MQTT broker + Pub/Sub + Firestore + mobile client) — 3–4 weeks. Push notifications, Cloud Functions for automation — another 1–2 weeks. Pricing calculated individually, GCP infrastructure billed by message volume and compute.