🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🪟 Windows TippsServertimeout in Outlook über 10 Minuten verlängern(12.09.2026 um 15:10 Uhr)
🪟 Windows ServerSchatten-KI: Verborgene Sicherheitsrisiken minimieren - BornCity(13.09.2026 um 00:31 Uhr)
🪟 Windows TippsThe Gemini desktop app is now available for Windows(11.09.2026 um 17:06 Uhr)
🔧 AI Nachrichten ChatGPT automatically logged out [Fix](12.09.2026 um 17:09 Uhr)
⚠️ Malware / Trojaner / VirenWindows 11 just dropped the tool ransomware abused, Microsoft says don’t restore WMIC(10.09.2026 um 20:11 Uhr)
🪟 Windows TippsServertimeout in Outlook über 10 Minuten verlängern(12.09.2026 um 15:10 Uhr)
🪟 Windows ServerSchatten-KI: Verborgene Sicherheitsrisiken minimieren - BornCity(13.09.2026 um 00:31 Uhr)

🔧 Programmierung 🕛 vor 1 Jahr 4 Min Lesezeit
0

How to make a default SMS app in Flutter(Android)

↗ Quelle (dev.to)
🗣️ Stimme:




In our fast-paced world, SMS messages remain a vital means of communication, even with the rise of chat apps.



With Flutter, you can create beautiful, cross-platform applications, and today we’ll explore how to set your Flutter app as the default SMS application on Android. And it will be described the way how to receive the SMS from our app, the first step of the default SMS app.



Our tutorial starts by creating a new Flutter project using the command line:



flutter create sms_app



To begin, it is essential to include the SMS permission in the AndroidManifest.xml file. As you know, in Android access to sensitive resources such as SMS, storage, and media requires explicit user consent.



For the first, add RECEIVE_SMS permission in the manifest section of the AndroidManifest.xml file.

This permission is necessary for our app to receive incoming sms and this prompts Google Play about the permission used in our app.




CODE
<uses-permission android:name="android.permission.RECEIVE_SMS" />





What is the next step?



It is essential to register receivers and activities where we can receive sms, handle and compose for sending new sms in our app.



CODE
<receiver android:name=".SmsReceiver" android:permission="android.permission.BROADCAST_SMS" android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter>
</receiver>
<receiver android:name=".IncomingSmsReceiver" android:permission="android.permission.BROADCAST_SMS" android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
</receiver>
<!-- BroadcastReceiver that listens for incoming MMS messages -->
<receiver android:name=".MmsReceiver" android:permission="android.permission.BROADCAST_WAP_PUSH" android:exported="true">
<intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
</receiver>
<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity android:name=".ComposeSmsActivity" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>
<!-- Service that delivers messages from the phone "quick response" -->
<service android:name=".HeadlessSmsSendService" android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</service>





Here we registered 2 receivers, 1 activity and 1 service and each of these is for receiving sms, mms and composing new sms.










Now we are at the step of composing MainActivity.kt file to set our app as a default SMS app. This is required because the SMS receiving function is only available if the user sets our app as a default SMS app.



Here we use MethodChannel class of Flutter plugin for Android to ensure communication between dart code and native Android code.



In native Android code, we register the channel where we wrote the kotlin code to set our app as a default SMS app and the dart code calls this channel function.



When the app is opened, the entry point is in the Dart code (main.dart), which calls this method channel to requests Android to prompt the native Android modal asking the user to set the app as the default SMS app.



class which is a Base class for code that receives and handles broadcast intents sent by Context.sendBroadcast(Intent).











In conclusion, setting up a default SMS app in Flutter is a straightforward process that can greatly enhance the functionality of your mobile application.



By leveraging the available packages and best practices above, you can ensure a seamless and efficient messaging experience for your users.



Thanks for reading!!!



Full Source Code

Vollständiger Original-Bericht
Ausführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
↗ Original-Artikel auf dev.to lesen
Wie bewertest du diesen Beitrag?
1 Klick Feedback
Teilen mit Netzwerk & Team:

Community-Analysen & Experten-Meinungen 0

Verfasse deine eigene Analyse, teile Workarounds oder diskutiere diesen Vorfall im Blog.
Noch keine Community-Analyse verfasst. Markiere einen Textabschnitt oder klicke oben auf Eigene Analyse verfassen“!
Community Pulse: Relevanz-Einschätzung
1 Klick Experten-Votum
🔴 Akute Relevanz 0%
🟡 In Evaluierung 0%
🟢 Keine Auswirkung 0%
Spannende Innovation 0%
Verwandte Story-Cluster & Quellen (Vektor-KI)
Port 8095 Engine
2 Quellen
News alert: Bright Security launches AI PT, AI-powered penetration testing that cuts weeks to hours
1 Quelle
Case study: ManageWP Blocks 11.9M+ Threats in 6 Months with Patchstack
1 Quelle
Unauthenticated PHP Object Injection to Remote Code Execution on GiveWP
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten How to make a default SMS app in Flutter(Android)

Thematisch verwandte Begriffe: make, default, FlutterAndroid · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...