पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv1.1.3

bluetoothadapter

एक फ्लटर प्लगइन जो **केवल एंड्रॉइड के लिए** ब्लूटूथ एडाप्टर की सुविधाओं को उजागर करता है।

30-दिन डाउनलोड
63
लाइक
22
Pub अंक
40

पैकेज इंस्टॉल करें

flutter pub add bluetoothadapter

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

The bluetoothadapter package is a Flutter plugin that provides access to Bluetooth adapter functionalities on Android devices. It enables developers to check Bluetooth status, enable or disable Bluetooth, and retrieve adapter information. Designed specifically for Android, it offers a straightforward API to interact with the device's Bluetooth hardware, making it ideal for apps requiring low-level Bluetooth control. The plugin does not support iOS, limiting its use to Android-only applications. It integrates seamlessly with Flutter projects via pub.dev.

उपयोग

  • प्रोग्रामैतिक रूप से ब्लूटूथ को सक्षम/अक्षम करना
  • ब्लूटूथ एडाप्टर स्थिति की जाँच करें
  • केवल एंड्रॉइड ऐप्स में ब्लूटूथ फीचर्स को एकीकृत करना
  • आईओटी उपकरण कनेक्टिविटी समाधान विकसित करना
  • ब्लूटूथ-आधारित निकटता डिटेक्शन प्रणालियों का निर्माण

मुख्य विशेषताएँ

  • Android-केवल संगतता
  • ब्लूटूथ एडाप्टर नियंत्रण के लिए सरल API
  • ब्लूटूथ को सक्षम और अक्षम करने का समर्थन करता है
  • एडाप्टर सूचना और स्थिति प्रदान करता है
  • हल्का और एकीकरण में आसान

इनके लिए उपयुक्त

  • एंड्रॉइड-केंद्रित मोबाइल ऐप विकासकर्ता
  • आईओटी एप्लिकेशन निर्माता
  • ब्लूटूथ-सक्षम उपकरण एकीकरणकर्ता
  • सीधे ब्लूटूथ प्रबंधन की आवश्यकता वाले ऐप्स
  • iOS समर्थन वाले प्रोजेक्ट्स नहीं

विचार योग्य बातें

  • iOS प्लेटफॉर्म के साथ असंगत
  • Android ब्लूटूथ एडेप्टर सुविधाओं तक सीमित
  • एंड्रॉइड-विशिष्ट अनुमतियाँ की आवश्यकता है
  • उन्नत ब्लूटूथ ली ऑपरेशन का समर्थन नहीं
  • उपकरण निर्माता के कार्यान्वयन पर निर्भर

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

bluetoothadapter

A Flutter plugin to expose the features of Bluetooth Adapter for Android only.

Objective

The primary purpose of this project was to communicate between flutter and Rasburry Pie using Bluetooth.

Main Features

  • Setting up a UUID from user end.
  • Checking Bluetooth connection status and giving alerts if its off or not right.
  • Getting list of paired devices.
  • Get a particular paired device info.
  • Start Bluetooth server.
  • Start Bluetooth client.
  • Start Bluetooth client.
  • Send message to a connected device.
  • Stream for listening to received messages.
  • Stream for listening to connection status (CONNECTED, CONNECTING, CONNECTION FAILED, LISTENING, DISCONNECTED).
Getting Started

For a full example please check /example folder. Here are only the most important parts of the code to illustrate how to use the library.

//Initiatinng the bluetooth adapter
Bluetoothadapter flutterbluetoothadapter = Bluetoothadapter();

//Listening to the connection status listener
String _connectionStatus = "NONE";
StreamSubscription _btConnectionStatusListener =flutterbluetoothadapter.connectionStatus().listen((dynamic status) {
  setState(() {
    _connectionStatus = status.toString();
  });
});

//Listening to the recieved messages
String _recievedMessage;
StreamSubscription _btReceivedMessageListener = flutterbluetoothadapter.receiveMessages().listen((dynamic newMessage) {
  setState(() {
    _recievedMessage = newMessage.toString();
  });
});
Getting paired devices
List<BtDevice> devices = await flutterbluetoothadapter.getDevices();
Getting paired device
await flutterbluetoothadapter.getDevice(deviceAddress);
Starting BT server
await flutterbluetoothadapter.startServer();
Starting BT client
flutterbluetoothadapter.startClient(devices.indexOf(element), true);
Sending message
flutterbluetoothadapter.sendMessage(messageString);
Check BT connection
await flutterbluetoothadapter.checkBluetooth(); //returns bool
Set UUID
flutterbluetoothadapter.initBlutoothConnection(uuid);

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।