A Foreground Service for React Native apps, with multiple headless tasks

Why can you need such a kind of service?

A common use case will be when an app is tracking a user’s location. So with the help of the Headless.js and foreground service, you can keep track of the user’s location even he has killed his app from the recent tasks, of course, if permission is given.

How to Configure a foreground service within your app?

Do these steps carefully. 👇

1. You will need to add the permission in your manifest files to keep your app running in the background service

2. Now we need to define the name of the service, its description, and the color it is going to use, as well as we need to define the service and the headless task here

So before the closing tag of…


To elaborate on what a task scheduler is, consider it a corn-job that will run at a certain time and execute a certain task. Google actually has a cloud scheduler, but that requires an extra amount of knowledge, so in this article, I am going to write about making it possible by just using a cloud function and Firestore.

To give you some examples where you would want to use a task scheduler, consider you have an image upload function, but here is the thing, to save up space after the work is done, you might want to delete the…


Assuming you are using firebase and all the features it supports, and now you have to deal with some kind of custom email verification to access some sort of document within the firestore, or let say you have a guest user that you need to sign in, and instead of storing them in the authentication, you are using firestore for there entry, and you want to send a custom code to there email that they can input in the frontend and by which you can authenticate them, how would you do it?

Well, there is a lot of ways to…


Jitsi

Jitsi is an online open-source project, for creating conferencing, Recently I have to work on this project that includes jitsi, and the setup of jitsi actually sometimes quite complicated, so I decided to write proper instructions on how to set up jitsi properly.

This article will be focused purely on how to, Install Jitsi, Customize Branding, Setup Token Authentication, and last Setup Guest.

By the end of the tutorial, you will have an application with proper conferencing and authentication setup and ready to use.

Installation :

Installation of jitsi is pretty straight forward you will have to set up FQDN…


Recently I was tasked to create a captcha service, where your server validates the captcha before every form submission. I was not allowed to use the google captcha because they had all a custom UI.

So I asked myself, how one would create a captcha, What is a captcha? For me, a captcha is a string of limited character, which get validate against client input, and upon validating it let the user to what he desired, Usually an image because if it is text it can be found in the client-side.

There is a concept of the session in every…


Today, I am going to write about how we can create our own static site generator easily.

Recently, I was given a task where I had to convert an HTML website with a lot of hardcoded data. I was asked to remove it and use a data source that can be contentful or prismatic.

Writing a generator that takes your code, changes the content as a pre-requirement, and outputs the project is quite easy thanks to Node.js and file system (fs).

But to make it very easy, I have come up with a solution that is digestible for every person…


Oh, thanks for letting me know man.


Hi! You are here because you have been looking for a solution to detect a route change in your SPA. So, how would you detect that the page has been changed? Since there is no navigation as well as no event for the URL change in the SPA, we need to come up with our own solution and implement our own logic.

The first thing we can do is to setInterval, which will check for the previous and current URL changes after a certain interval. This is a classic way to do it. …


Lately, I have been working with eCommerce Mobile applications to treat Shopify and woo-commerce as a headless CMS. Display Projects and the ability to add to Cart and to checkout to place a successful order.

After completing the Cart, the only problem I had was making a similar checkout system that both Shopify and WordPress support. After a couple of research hours, I decided to use web view and handle checkout steps directly from the website.

We all know that Shopify supports add to cart directly from the link, So http://<You Store>.myshopify.com/cart/<varaiant Id>:<quantity> this will let you add an item…


So you have created up a great looking Electron-based app. Now you want to create an installer for it, There is a lot of articles that can help you, but in this, I am going to share my story of how I did it, and it is also for the people who are using electron and react together.

Now you need to understand 2 things, there is no way of doing it the easy way, like there is no one-click installer creator in electron that you can use, that cover all the 100% of the cases for you, some will expose your app source, or you will end up have a gigantic size of package app and will end up having your whole project including node module in the app source code, that is not what I want.

So how we do it, 2 steps for each platform, and I am going to share my journey of windows…

Raja Osama

I Describe Myself as a Polyglot ~ Tech Agnostic ~ Rockstar Software Engineer. I Specialise in Javascript-based tech stack to create fascinating applications.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store