SMS Receiving and Sending in Flutter Application
You are going in a big project by implementing a package like that. But there is no door a dev can't open :-)
There are some thing you should know before starting your project:
- Flutter is not able to do this by nature, Flutter is an UI SDK, every non-UI thing relay to the underlying platform (Android, iOS, Web, Desktop)
- Flutter is able to communicate with the native platform to do specific platform things (in your case, manage SMS)
You have to learn how to create a native Flutter plugin, a plugin implemented in platform-specific code (Java/Kotlin, Swift/Objective-c, C/C++/Go) which communicate with some Flutter UI code (written in Dart) via Platform Channels.
There are some tutorials found over the web:
- Platform Channels, Benefits and Limitations
- Flutter Platform Channel (A pretty complete tutorial on Medium)
- Method Channel In Flutter (A simple one with example for Android platform)
Hope this will help, and good luck!
Adnan Ahmed
Updated on December 19, 2022Comments
-
Adnan Ahmed over 1 year
I am building a flutter app in which i want to capture incoming sms. I searched on pub.dev and found few packages offering similar functionality i.e. sms_maintained and sms_retreiver etc. I tried them but i am not satisfied with the provided functionality. I need more control such as listening to incoming sms messages while app is not running and manual control to start and stop listening for messages. So, i am thinking of writing own SMS handling code from scratch instead of using a package. I want guidance to achieve this. i.e. where to start??? I am new to flutter and mobile app dev, i don't know whether my question is worthy of being answered or not, that's why i am asking.