Flutter | Send SMS in the background

Mohammed Waseem
Apr 29, 2023

--

Send an SMS through your Flutter app automatically.

Note — > This package doesn't work: flutter_sms

Requirements (Imports)

  1. Permission_handler package from pub dev
  2. Background SMS package from pub dev

Add the following permissions to 👇.

android > app > src > main > AndroidManifest.xml

The SEND_SMS permission is required to send SMS messages, and the READ_PHONE_STATE permission is to get the phone number of the device.

Modify build.gradle

android > app > build.gradle

Now we can send a message to test.

Create a Function👇 to call whenever you send an SMS.

--

--

Mohammed Waseem
Mohammed Waseem

Written by Mohammed Waseem

BSc in IT Graduate | CCNA | IT Support | Networking

No responses yet