telephony से फॉर्क किया गया एक Flutter प्लगइन जो नेटवर्क जानकारी प्राप्त करने, फ़ोन कॉल शुरू करने, एसएमएस भेजने और प्राप्त करने और आने वाले एसएमएस के लिए सुनने के लिए उपयोग करने के लिए है।
सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
Another Telephony एक Flutter प्लगइन है जो मूल telephony पैकेज से फॉर्क किया गया है, जिसका उद्देश्य Android ऐप्स को टेलीफोनी विशेषताओं तक पहुँच प्रदान करना है। यह डेवलपर्स को नेटवर्क जानकारी प्राप्त करने, फोन कॉल शुरू करने, SMS संदेश भेजने और प्राप्त करने, और आने वाले SMS के लिए सुनने की अनुमति देता है। पैकेज में विश्वसनीय आने वाले SMS के लिए निर्धारण के लिए ठीक करने शामिल हैं, जिससे यह वास्तविक समय में SMS इंटरैक्शन की आवश्यकता वाले एप्लिकेशन के लिए उपयुक्त है। विशेष रूप से Android के लिए बनाया गया, यह Flutter ऐप्स में मूल टेलीफोनी कार्यक्षमता को एकीकृत करने के लिए एक सीधा इंटरफेस प्रदान करता है।
उपयोग
SMS सत्यापन प्रणाली
एप्स में कॉल प्रारंभ
रियल-टाइम आने वाले एसएमएस का मॉनिटरिंग
नेटवर्क स्थिति ट्रैकिंग
द्वि-कारक प्रमाणीकरण
स्वचालित संदेश प्रबंधन
मुख्य विशेषताएँ
SMS भेजने और प्राप्त करने का समर्थन करता है
फ़ोन कॉल प्रारंभ करने की अनुमति देता है
नेटवर्क जानकारी प्राप्त करता है
आगमी एसएमएस लिस्टनर में सुधार किया गया
Android-केवल प्लेटफॉर्म समर्थन
सरल API एकीकरण
इनके लिए उपयुक्त
SMS-आधारित प्रमाणीकरण बना रहे विकासकर्मी
स्वचालित एसएमएस प्रसंस्करण की आवश्यकता वाले ऐप्स
टेलीफोनी एक्सेस की आवश्यकता वाले मोबाइल ऐप्स
Android-केंद्रित Flutter परियोजनाएँ
वास्तविक समय संदेश की आवश्यकता वाले अनुप्रयोग
विचार योग्य बातें
Android प्लेटफॉर्म तक सीमित
SMS और कॉल्स के लिए रनटाइम परमिशन की आवश्यकता है
आगमन संदेश सुनने में बैटरी प्रभाव हो सकता है
उपकरण-विशिष्ट फोन सेवाओं पर निर्भर करता है
iOS के साथ असंगत
पृष्ठभूमि निष्पादन के लिए अतिरिक्त सेटिंग की आवश्यकता हो सकती है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Telephony
We create this fork because the original package is not maintained anymore. We will try to keep this package up to date with the latest Flutter version.
:exclamation: This plugin currently only works on Android Platform
Contribute or meet a problem
Please create pull-request/issue in the original package, i will check and fix it as soon as possible.
Happy to contribute this project together :heart:
From VietNam (with Paracel & Spratly Islands) contributor
Contact me for [instantly support](mailto:dangtrongthanh1998@gmail.com)
A Flutter plugin to use telephony features such as
Send SMS Messages
Query SMS Messages
Listen for incoming SMS
Retrieve various network parameters
Start phone calls
This plugin tries to replicate some of the functionality provided by Android's Telephony class.
Check the Features section to see the list of implemented and missing features.
Although this plugin will check and ask for permissions at runtime, it is advisable to manually ask for permissions before calling any other functions.
The plugin will only request those permission that are listed in the AndroidManifest.xml.
SMS can either be sent directly or via the default SMS app.
Send SMS directly from your app:
telephony.sendSms(
to: "1234567890",
message: "May the force be with you!"
);
If you want to listen to the status of the message being sent, provide SmsSendStatusListener to the sendSms function.
finalSmsSendStatusListener listener = (SendStatus status) {
// Handle the status
};
telephony.sendSms(
to: "1234567890",
message: "May the force be with you!",
statusListener: listener
);
If the body of the message is longer than the standard SMS length limit of 160 characters, you can send a multipart SMS by setting the isMultipart flag.
Send SMS via the default SMS app:
telephony.sendSmsByDefaultApp(to: "1234567890", message: "May the force be with you!");
As of the 1.12 release of Flutter, plugins are automatically registered. This will allow you to use plugins as you normally do even in the background execution context.
Fetch various metrics such as network type, sim state, etc.
// Check if a device is capable of sending SMSbool canSendSms = await telephony.isSmsCapable;
// Get sim stateSimState simState = await telephony.simState;
If you want to call the telephony methods in background, you can do in the following ways.
1. Using only Telephony.instance
If you want to continue using Telephony.instance in the background, you will need to make sure that once the app comes back to the front, it again calls Telephony.instance.
@pragma('vm:entry-point')
backgroundMessageHandler(SmsMessage message) async {
// Handle background messageTelephony.instance.sendSms(to: "123456789", message: "Message from background")
}
voidmain() {
runApp(MyApp());
}
class_MyAppStateextendsState<MyApp> {
String _message;
// This will not work as the instance will be replaced by// the one in background.final telephony = Telephony.instance;
@overridevoidinitState() {
super.initState();
// You should make sure call to instance is made every time // app comes to foregroundfinal inbox = Telephony.instance.getInboxSms()
}
2. Use backgroundInstance
If you cannot make sure that the call to instance would be made every time app comes to foreground, or if you would prefer to maintain a separate background instance,
you can use Telephony.backgroundInstance in the background execution context.