pszklarska / beacon_broadcast Goto Github PK
View Code? Open in Web Editor NEWA Flutter plugin for turning your device into a beacon.
Home Page: https://pub.dartlang.org/packages/beacon_broadcast/
License: MIT License
A Flutter plugin for turning your device into a beacon.
Home Page: https://pub.dartlang.org/packages/beacon_broadcast/
License: MIT License
Is it possible to set the device name from this package?
I really like the projects you do and the way you coding!
Have nice day :)
Very good fit for https://github.com/Solido/awesome-flutter and bluetooth section if you want to PR I'll merge. Thx !
First of all, thank you for publishing such a wonderful package. Our project has been greatly helped by this package.
By the way, starting from April 2024, SDKs used by applications that are published to the Apple App Store need to specify a privacy manifest and digital signature.
I don't think this package requires any additions, but I'd like you, the developer, to confirm.
Apple reached out with the following:
I lead the Creative Pro Partnership Management team in Apple Worldwide Developer Relations. We manage the relationship with developers who create developer tools, photography, music, 2D/3D design, 3D and gaming pipeline, and production-focused apps and hardware.
As you may know, in June, Apple announced new features to help users understand developers’ privacy and data collection and sharing practices. These new features include privacy manifests and signatures, which we encourage all third-party SDKs to adopt to provide transparency to users and help secure the software supply chain. Third-party SDKs that impact user privacy will be expected to include a privacy manifest and signature, and starting in Spring 2024, new and updated apps that include these third-party SDKs will need to include their manifest and signature to submit to the App Store.
Here are some additional resources that may be helpful:
You can read documentation about creating a privacy manifest file.
Our User Privacy and Data Use page has details about requirements for developers.
You can watch videos about adopting privacy manifests and signatures for your SDK.
Flutter is tracking this in flutter/flutter#131940
I'm not good at English, so please excuse me if there are any inappropriate sentences.
Hi,
When I try to build for iOS, this error occurs:
beacon_broadcast
does not specify a Swift version and none of the targets (Runner
) integrating it have theSWIFT_VERSION
attribute set. Please contact the author or set theSWIFT_VERSION
attribute in at least one of the targets that integrate this pod
Why is this happening? Thanks!
Thank you very much for your beacon_broadcast, it helped me a lot. Can you develop a beacon_receiver plugin? Thank you.
Heyo,
I have to advertise as Eddystone UID. Is this possible using this library?
(Please excuse the noob question. I just starting reading into this beacon topic yesterday)
Regards,
Lars
Hello,
I want to thank you for making this library. I am having an issue broadcasting my Android phone as an Eddystone beacon using the code below:
BeaconBroadcast beaconBroadcast = BeaconBroadcast();
beaconBroadcast
.setUUID('39ED98FF-2900-441A-802F-9C398FC199D2')
.setMajorId(1)
.setMinorId(100)
.setLayout(
BeaconBroadcast.EDDYSTONE_UID_LAYOUT) //Android-only, optional
.start();
I am getting the following error:
PlatformException (PlatformException(error, Beacon has 3 identifiers but format requires 2, null))
Any help regarding this would be much appreciated.
Thank you :)
I used this lib to broadcast and used other libs to scan beacons.
I tested on real devices:
I used another android app (install from PlayStore) to broadcast and my app can see that device. That means there is something wrong on the broadcast from my app.
BeaconBroadcast beaconBroadcast = BeaconBroadcast();
if (Platform.isIOS) {
beaconBroadcast
.setUUID('XXXX-...')
.setMajorId(2)
.setMinorId(102)
.start();
}else{
beaconBroadcast
.setUUID('XXXX-...')
.setMajorId(5)
.setMinorId(105)
.start();
}
BeaconBroadcast()
.setUUID('0000feaa-0000-1000-8000-00805f9b34fb')
.setMajorId(1)
.setMinorId(100)
.setTransmissionPower(-59) //optional
.setAdvertiseMode(AdvertiseMode.lowPower) //Android-only, optional
.setLayout(BeaconBroadcast.ALTBEACON_LAYOUT)
.setManufacturerId(0x00E0) //Android-only, optional
.start();
When i try to broadcast eddystone url by setting layout EDDYSTONE_URL_LAYOUT app produces error
PlatformException (PlatformException(error, Beacon has 3 identifiers but format requires 2, null))
While I have tried by unsetting MinorId then library throws exception of casting null to int not allowed.
Any solution/suggestion will be appreciated. Thanks.
I tried running the sample program posted on pub.dev, however, when I ran it and started the beacon, it immediately crashed. I have only seen this kind of behavior when a permission needs to be granted; is there something I need to add to my Info.plist? If so, please add it to the documentation. I am running it on an iPhone 8.
Hi 👋
First of all thank you for the effort taken into this library!
I have an use-case in wanted to try it out immediately, sadly I have errors in a clean flutter project, running on my iOS device. I think it has to do with the project setup it's using objective-c instead of swift.
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `.symlinks/flutter/ios`
-> Fetching podspec for `beacon_broadcast` from `.symlinks/plugins/beacon_broadcast/ios`
Resolving dependencies of `Podfile`
Comparing resolved specification to the sandbox manifest
A Flutter
A beacon_broadcast
Downloading dependencies
-> Installing Flutter (1.0.0)
-> Installing beacon_broadcast (0.0.1)
- Running pre install hooks
[!] Unable to determine Swift version for the following pods:
- `beacon_broadcast` does not specify a Swift version and none of the targets (`Runner`) integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod.
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:115:in `verify_swift_pods_swift_version'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer/xcode/target_validator.rb:37:in `validate!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:459:in `validate_targets'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:138:in `install!'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/Cellar/cocoapods/1.6.1/libexec/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `load'
/usr/local/Cellar/cocoapods/1.6.1/libexec/bin/pod:22:in `<main>'
Error output from CocoaPods:
↳
[!] `<PBXGroup UUID=`97C146E51CF9000F007C117D`>` attempted to initialize an object with an unknown UUID. `CF3B75C9A7D2FA2A4C99F110` for attribute: `children`. This can be the result of a merge and the unknown UUID is being discarded.
[!] Automatically assigning platform `ios` with version `8.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.
Finished with error: Error running pod install
Is the beacon also advertised if the app is in the background?
The plugin beacon_broadcast
uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration
how to set custom layout and data fields
Please my friend,help me!I need main.dart document because I need buid apk.Please help me.
Hi, I would like to know that is it possible to connect from another device to the device that is advertising with this library?
Greetings,
First of all, thank you for providing this library for the general public. Once the app has launched, I'm getting an error in the Xcode console that says: "[CoreBluetooth] XPC connection invalid"
Below is what I'm using hardware/software wise:
I also made sure to add the NSBluetoothAlwaysUsageDescription and NSBluetoothPeripheralUsageDescription permissions to the info.plist file.
!Please understand that I am not good at English so I am using a translator.
IOS = O Android = X
IOS works fine, but not Android
If you look at the logs on Android, it says that it is normally transmitting BLE signals, but it does not transmit actual BLE signals.
-Test Device = Galaxy S7, Galaxy Note9
Running with the sample file provided by the BLE library developer Github results in the same phenomenon
I was wondering what the range of the beacon would be if I used this library. What variables would affect the range of the broadcast?
Any solution to this error, it won't let me install the application in android 12
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1325317315.tmp/base.apk (at Binary XML file line #90): org.altbeacon.beacon.startup.StartupBroadcastReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
Thank you for the development of the library.
Hello,
Broadcast is not working in the example app. Compiles fine, but when I click Start button, beacon is not transmited. No errors in runtime logs.
iOS: 16.5
flutter: 3.0.5
beacon_broadcast: 0.3.1
Ok so I configure my environment with no problems whatsoever, there's a bug when I'm trying to configure the Major before starting the broadcast in iOS Platform.
beaconBroadcast
.setUUID(uuid)
.setIdentifier('com.example.com')
.setMinorId(0)
//.setMajorId(100)
.setTransmissionPower(-59)
.start();
So when I uncommented the line with the function major the app never get running I can't get any feedback from the app.
Edit:
if (Platform.isIOS){
beaconBroadcast
.setUUID('$uuid')
.setMajorId(0)
.setMinorId(0)
.setIdentifier('$uuid')
.setTransmissionPower(-59)
.start();
debugPrint('iOS');
}
just close it after updates and review the code I didn't notice more issues I have a hard time back then but now is fully working. this is the code I have right now.
On Android, Beacon is broadcasting different values multiple times without any user input. On iOS device, it is working fine, as expected.
I have also added the logs while any event is broadcasted. On any user input, the logs are printed, but after that when the frequent events are broadcasted, no logs are printed.
Hello!
I am trying to scan for ble beacons implemented using beacon_broadcast flutter package. I am using a flutter app that implements flutter_blue package, as my beacon scanner. But the scan result does not show any UUID. However when I use Beacon Simulator app available on playstore for scanning, it shows the uuid of my beacon.Below is the troubleshooting method posted on flutter_blue page. So is this a issue I need to check in beacon_broadcast package or flutter_blue package? And if the change is needed in beacon_broadcast package where should it be?
"Troubleshooting--
Scanning for service UUID's doesn't return any results
Make sure the device is advertising which service UUID's it supports. This is found in the advertisement packet as UUID 16 bit complete list or UUID 128 bit complete list."
Running the sample app on iOS resulted in a crash, I added setIdentifier
and there is no more crash.
The logs for the crash :
flutter: Supported
Could not cast value of type 'NSNull' (0x1da937500) to 'NSString' (0x1da934ca0).
* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001b7f04b98 libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`__pthread_kill:
-> 0x1b7f04b98 <+8>: b.lo 0x1b7f04bb8 ; <+40>
0x1b7f04b9c <+12>: pacibsp
0x1b7f04ba0 <+16>: stp x29, x30, [sp, #-0x10]!
0x1b7f04ba4 <+20>: mov x29, sp
Target 0: (Runner) stopped.
Hello and thank you for making this library.
I currently have an issue where is an error occurs, the error is not passed onto Dart (i.e. can't catch it using try
, catchError
, etc), but appears on the console:
Performing hot reload...
Syncing files to device blah-blah...
Reloaded 1 of 512 libraries in 809ms.
D/BeaconParser( 7318): Parsing beacon layout: blah-blah-blah
D/BluetoothAdapter( 7318): isLeEnabled(): ON
D/BluetoothAdapter( 7318): isLeEnabled(): ON
E/BeaconTransmitter( 7318): Advertisement start failed, code: 2
Just passing the error code as a return variable (instead of Future<void>
, then await
/then
) would be fine for my use case, but it if you have the time to do it, please change the code so programs can catch the error.
Here is a Stack Overflow question about the same issue.
Thank you in advance.
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.