Skip to content
theqiyas.cc
Problem Solver
cc · project · Open source

Autoreply

An Android app that answers the calls you miss. A minute later it sends a WhatsApp message or an SMS, picked by how many times they called, and stays quiet if you already called back.

Android Fastify Flutter Kotlin Node.js SQLite WhatsApp

You are in a meeting, driving or asleep, and someone calls. Then calls again. By the time you look at the phone they are angry. Autoreply is an Android app that answers those calls for you: a minute after a call you missed, it sends the person a message over WhatsApp, a normal SMS, or both.

How it decides

A call only counts as missed when the phone rang and went quiet without being picked up. Answered calls, rejected calls and your own outgoing calls are left alone.

Then it waits a minute. That minute is your chance to call back. Before anything is sent, it checks every reason not to send: the app is switched off, it is quiet hours, the number is blocked, you already called them back or picked up a later call, or they already got a reply a few minutes ago. A “can’t talk right now” message arriving after you already talked is the worst thing this app could do, so that check comes before everything else.

If it does send, it counts how many times the person has tried. The first call can say “Busy right now”, the second “Is it urgent?”, the third “Calling you back in 15”. Rules can also be limited to certain hours or to unknown numbers. The first matching rule wins.

What makes it work on a real phone

Android is very good at killing apps that try to do things in the background. Autoreply is built around that:

  • The engine is written in Kotlin and runs without the Flutter UI being open. The screen can stay locked.
  • The one minute wait uses an exact alarm, because ordinary background jobs cannot be trusted with a one minute delay when the phone is sleeping.
  • The number is saved to storage the moment the phone rings, because Android may kill the app between “ringing” and “quiet”.
  • SMS goes out straight from the phone. WhatsApp goes through a small server bridge that answers right away, so the app knows immediately if a message failed and can tell you.
  • Every call, message and delivery receipt goes into a log, with the reason when something was skipped.

There is no Firebase, no push service and not a single third party Dart package.

The bridge

The WhatsApp side is a small Node.js server. You link your WhatsApp number once, by scanning a QR code or typing an 8 character pairing code on a one time page, and from then on the phone sends messages through it. Phones join with an invite code, and link pages expire after ten minutes.

The app, the bridge and the landing page with its short explainer film are all in the repository.

Built with Flutter and Kotlin on Android, and Node.js, Fastify and SQLite on the server.