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

पैकेज विवरणv0.1.7

bluetooth_enable_fork

ऐप के भीतर ब्लूटूथ चालू करने के लिए Flutter प्लगइन

AndroidiOS
30-दिन डाउनलोड
967
लाइक
20
Pub अंक
140

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

flutter pub add bluetooth_enable_fork

पैकेज अवलोकन

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

एक फ्लटर प्लगइन जो एंड्रॉयड और आईओएस पर एप्लिकेशन के भीतर सीधे ब्लूटूथ को सक्षम करता है। यह ब्लूटूथ स्थिति की जांच और सक्रियण के लिए एक सरल इंटरफ़ेस प्रदान करता है, जो आवश्यकता के समय उपयोगकर्ताओं को ब्लूटूथ सक्षम करने में मदद करता है। मूल bluetooth_enable पैकेज का एक फॉर्क के रूप में डिज़ाइन किया गया है, जो संगतता बनाए रखता है जबकि संभावित सुधार या त्रुटि निवारण प्रदान करता है। ब्लूटूथ कनेक्टिविटी पर निर्भर ऐप्स के लिए आदर्श, जैसे बीकॉन, आईओटी डिवाइस या एनएफसी-आधारित सेवाएं।

उपयोग

  • आईओटी एप्लिकेशन में ब्लूटूथ सक्षम करें
  • ब्लूटूथ चालू करने के लिए उपयोगकर्ता को मार्गदर्शन करें
  • बीकॉन डिटेक्शन के साथ एकीकरण
  • NFC और निकटता विशेषताओं का समर्थन करता है
  • एप्लिकेशन में ब्लूटूथ परमिशन का प्रबंधन

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

  • क्रॉस-प्लेटफॉर्म समर्थन (Android और iOS)
  • ब्लूटूथ की जाँच और सक्षम करने के लिए सरल API
  • उपयोगकर्ता-मित्रतापूर्ण अनुमति प्रबंधन
  • संभावित बग फिक्स के साथ फॉर्क
  • हल्का और एकीकरण में आसान

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

  • ब्लूटूथ-निर्भर एप्लिकेशन बनाने वाले डेवलपर्स
  • उपयोगकर्ता-निर्देशित ब्लूटूथ सेटअप की आवश्यकता वाले ऐप्स
  • आईओटी और बीकॉन-आधारित समाधान
  • विश्वसनीय ब्लूटूथ स्थिति प्रबंधन की आवश्यकता वाले मोबाइल एप्लिकेशन
  • मूल bluetooth_enable पैकेज का उपयोग करने वाले प्रोजेक्ट

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

  • ब्लूटूथ सक्षम करने के लिए उपयोगकर्ता की बातचीत की आवश्यकता होती है
  • बेसिक ब्लूटूथ स्थिति नियंत्रण तक सीमित
  • कुछ प्लेटफॉर्म पर अतिरिक्त अनुमतियाँ की आवश्यकता हो सकती है
  • नीचे के OS ब्लूटूथ कार्यान्वयन पर निर्भर करता है
  • बैकग्राउंड ब्लूटूथ संचालन के लिए उपयुक्त नहीं

मूल README

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

Introduction

BluetoothEnable is a Bluetooth plugin for Flutter, to programtically request turning on Bluetooth within applications.

This plugin was created with the intention to allow developers to customise their own application workflow on when permissions are requested.

Usage

Enable Bluetooth
import 'package:bluetooth_enable_fork/bluetooth_enable.dart';

// Request to turn on Bluetooth within an app
BluetoothEnable.enableBluetooth.then((result) {
  if (result == "true") {
    // Bluetooth has been enabled
  }
  else if (result == "false") {
    // Bluetooth has not been enabled
  }
});
Enable Bluetooth with Custom Alert

This method calls an alert from Dart level. Depending on the user's selection, Bluetooth will either be manually turned on without an additional dialog request or nothing happens.

Parameter Description
context The material context of your current content
dialogTitle The title of the dialog is displayed in a large font at the top
displayDialogContent Enable or disable showing dialog content
dialogContent The content of the dialog that is displayed in the center
cancelBtnText The cancel button text of the dialog (left button)
acceptBtnText The accept button text of the dialog (right button)
dialogRadius The border radius of dialog
barrierDismissible Enable or Disable whether dialog is dismissible on external click
import  'package:bluetooth_enable_fork/bluetooth_enable.dart';

Future<void> customEnableBT(BuildContext context) async {
  String dialogTitle = "Hey! Please give me permission to use Bluetooth!";
  bool displayDialogContent = true;
  String dialogContent = "This app requires Bluetooth to connect to device.";
  //or
  // bool displayDialogContent = false;
  // String dialogContent = "";
  String cancelBtnText = "Nope";
  String acceptBtnText = "Sure";
  double dialogRadius = 10.0;
  bool barrierDismissible = true; //

  BluetoothEnable.customBluetoothRequest(context, dialogTitle, displayDialogContent, dialogContent, cancelBtnText, acceptBtnText, dialogRadius, barrierDismissible).then((result) {
    if (result == "true") {
      //Bluetooth has been enabled
    }
  });
}
iOS support

If Bluetooth has not been activated, a popup window will appear on enableBluetooth call asking user to activate Bluetooth in the application settings; the method will immediately return false (but will return true on next call if user enabled Bluetooth in the meantime).

श्रेणियाँ

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

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

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