source creator coins twittersingletonbillboard

Get social proof notifications even when you’re offline

It’s a known fact that getting notifications from your favorite social networks lets you feel more loyal to them. But what if you don’t check the network for a while and miss out on all this? Sorry! You can’t get these precious notifications anymore, right? Wrong!

Recently I’ve read a wonderful article called ” Get enriched Phone Notifications when you’re in the subway ” and I got to thinking: what if we went in a slightly different direction and made notifications work offline? That way, even when an app is closed or your phone is in standby mode, you’ll still get to know about new posts/likes/messages.

bluesky twitterrobertson theverge

What is social proof notification and how it can help your business 

The most common type of notifications you see in almost every app are those that warn you about something: “Remember to buy bread at the store”, “Your Uber is nearby”, etc. These kinds of notifications can be easily scheduled and triggered out of any kind of data connection, but what happens when the user starts closing these apps or puts his device in standby mode? In this case, you don’t get to deliver these messages anymore.

What’s worse is that some apps allow you to receive notifications only when the app itself is running in foreground mode . This means that despite having push notifications turned on, you’ll miss a lot of important messages – just because the user doesn’t have your app open.

What if there was a way to deliver these messages anyway? And it turns out that the solution is really easy – all you need is what I call “social proof notifications”, which are well-customized persistent notifications.

twitter super followsnewtonplatformer

You are not online, how to get social proof notifications?

When users are not onlnie, you can use push notification technology to deliver your messages regardless of the app’s state. When I call them “social proof notifications”, what I actually mean is that the user gets them exactly when he needs them most – when he opens up your app after a period of time.

These notifications can be delivered as a push notification as soon as the app becomes active. In case you’re wondering, I’ve tested this on Android and it works fine. Let’s go over the tech details now. We’ll make use of GCM (Google Cloud Messaging) to send our messages from a custom-built backend service. This kind of notifications requires a secure connection (using SSL) and that’s why we’ll use Telegram Bot API to send our messages.

After creating an account on BotFather , you can get your unique Telegram token in just a few seconds. Now, let’s go over the implementation details – I’ll focus mostly on React Native app development (for iOS), but if you’re using different frameworks, you can check out the source code in my GitHub repository .

Register your app with GCM and get your API key. If you already have an existing Google project, skip this step. If not, create a new one now by clicking on “Add Project”. Give it any name you want – I called mine “Offline Push Notifications” – and select your country.

Once you’ve created your project, create a new Android app (or use an existing one). You can name it anything you want (I called mine “Offline Push”) and pick any package name (e.g. “com.whatever”).

 

After creating your app, you’ll be able to find your Android package name in the “App Package” section. Now let’s go back to our browser and select this package name in GCM console , so we can generate our API key.

TIP: if you’re having an issue finding the App ID or JSON file, try setting the country to United States (even if you’re located elsewhere).