Anyone knows whay Flutter_beacon Randomly stops working or may suggest another plugin - flutter

I'm using flutter_beacon plugin, It was working awesome on android. Ranging the close devices and getting the information that the beacon was broadcasting. But now, It suddenly stops reading the information, as the beacon would have disappeared. Any suggestions how to fix this??
The library im using is this one:
https://pub.dev/packages/flutter_beacon

There are lots of reasons an Android device might fail to detect beacons. The flutter_beacon plug-in you mention is built in top of the Android Beacon Library, which is the most widely used beacon library for Android.
You may want to try out that library’s reference app for Android (or the BeaconScope app for Android which is also built upon that same library.) If you find that these native apps have a similar problem on your device, then the problem may be device-specific.
The Android Beacon Library has a troubleshooting page that may be useful to you. Many of the same checks will be applicable to using the flutter_beacon plug-in.

Related

How to exchange data and files between two devices by NFC using Flutter?

I am a flutter developer, I want to make an application to exchange messages and files by using NFC technique
I used nfc_in_flutter plugin for reading and writing NFC tags but I don't know how to send and receive data and files between devices by using NFC in flutter.
Could any one help me, please?
Generally you don't try and send data between 2 devices using NFC, there is a standard for it, but most devices don't support it (it has never been supported on iOS and Android has dropped support for it as it was unreliable)
Use Bluetooth or Wifi Direct instead.
Update:
If you have to use NFC then the nfc_in_flutter plugin is no use, you are going to have to call native code for each platform yourself / write your own plugin.
And for 2 iOS devices, then forget it, just not possible because of what the OS supports.
When one device is an Android there is a complicated method that some people have had some success with but it still has it's issue.
The Android device does Host Card Emulation (HCE) and pretends to be a really Type 4 NFC tag, then other devices can read/write to it as if it were a real Tag which both iOS and Android Support. BUT on older Android devices then the deprecated Android Beam might get in the way and you would need to use enableReaderMode to do the read/write on Android.
You will need to put in a lot of error handle in the read/write App as NFC comms is very slow and very prone to loosing the connection, so it would have to handle loosing the connection and restarting where it last successful read from/written to.
All these problems make this extremely difficult to achieve a workable solution and was the main reason Google removed Android Beam for Android to Android sharing (which does use a NFC peer to peer protocol)

Flutter Basics (write once, run anywhere?)

Hi stack overflow community,
I'm a novice programmer in high school and have never written an app for mobile devices before so please bear with me. If I was to write an app using Flutter, will I only be required to write the code once and then be able to distribute different versions of it (iOS, macOS, Windows, Linux, Android, etc)? Or will I need to make small changes for each version such as using XCode to create the iOS version and Android Studio for the Android version? I know this is such a basic question but I've spent a couple of hours looking this stuff up and I'm still confused. Any help would be nice.
Thanks,
Daniel
In a product development environment, after writing the cross-platform code with Flutter, there are some need-to-do tasks related to Native environment.
In the case of Android, there are several cases when you'll need to touch the Native level such as config Firestore settings, Social authentication (Login with Facebook for example), changing the launch icons/ splash screen of the app or publishing to app store, etc
For iOS, the same case apply as well. So I suggest you start with small steps to develop the app first, then when running into something that seems impossible with just Flutter code, there are tutorials and SO to guide you through. It might seem overwhelmed at first, but we are all on a journey, so no need to rush it ;)
You should make small changes too. For eg when adding launcher icons and splash screen you have to edit the respective native folders. When distributing for ios you need to manually customize its Runner from xcode. There are many library that support either android only or ios only. In that case if you need that feature you have to make changes in native code like java ans swift.
if you're creating your own native plugins, you will have unique code to write. But if you're just using things out of pub, almost nothing will require change (unless you are publishing to the store).

Compatibility of Flutter with Car Play and Android Auto

I developed an app on Flutter and I'm looking at a way to link it with Car Play and Android Auto. For my understanding Flutter is not compatible yet. Anyone know if it will be in the future (if yes, when we should expect this)? Is there any turnaround I can look into?
Flutter Apps are now compatible with Apple CarPlay!
flutter_carplay aims to make it safe to use apps made with Flutter in the car by integrating with CarPlay. CarPlay takes the things you want to do while driving and puts them on the car’s built-in display. Currently, it supports only iOS 14.0+.
Feel free to like, star, comment, share, and contribute to support more!
In pub.dev: https://pub.dev/packages/flutter_carplay
GitHub: https://github.com/oguzhnatly/flutter_carplay
Flutter has yet to have Car Play and Android Auto support as of this writing. As previously mentioned in the comments, it's best to keep track for its updates in this GitHub thread.
I got audio app working on carplay easily enough. Based on
https://pub.dev/packages/flutter_radio_player/example
And then using my apple developer account, setting entitlements to allow carplay, basically. I cam add details if requested. Also, I used a mac/xcode to check things worked etc.
Android auto I can't yet get working.. funny that!

Ionic BLE Connection Issues

I'm using the Ionic Native BLE plugin to scan and connect to bluetooth devices. I'm able to get the plugin to list available devices, but I'm unable to get it to show already paired devices. This is the plugin I'm using:
https://ionicframework.com/docs/native/ble/
After searching through the documentation and finding examples, I've come to the conclusion that using this plugin to list already paired devices is just not possible. Is this the correct conclusion?
If so, do you know of any other plugins I could use to facilitate the looking up of paired bluetooth devices? I'm using Ionic 3.
We have been working on a simple BLE button and had the same issues. The only way we found out how to do this was to disconnect the button on app close (which the latest BLE version seems to do). We save the device ID (localStorage) when a user connects a device and then when the app starts up again the user has to wake up the device and the app starts scanning on startup. If the saved device id is the the id as your locally saved id it connects automatically.
If you, or anyone, wants to try other plugin, you can also try this: https://ionicframework.com/docs/v3/native/bluetoothle/
I first started using the same plugin that you use. After I encountered some difficult issues due to the strange operations of some bluetooth devices, I tried the second plugin and I found it to be better. That was three years ago and I can't say how the other plugin has improved in the present. One thing I like with the bluetoothle plugin is that it has many methods available and that gives more control to the bluetooth operations. You can look at these methods in its repo:
https://github.com/randdusing/cordova-plugin-bluetoothle

Custom Android Emulators

I currently have an Android app on the Android Market. One of it's main purposes involves detecting incoming calls. Unfortunately, some phone models don't seem to be detecting this correctly. The version of Android isn't the problem (other phones with 2.1 and 2.2 work fine), so I'm wondering if the phones have something unique about them.
Because the main phone I've had problems with is the Epic 4g, I was hoping to get an emulator running simulating the phone. Is it possible to do this? I don't know anyone that personally has that model of phone, so this seems like my only option to debug the issue.
Thanks!
I've found this for Motorola Phones
which has helped me.
Generally, the emulator is based on QEMU, so it can be configured deeply. But thats not very useful as it is hard to get the actual hardware specs of any specific device as long it's developing company don't like to talk and share their secrets and flaws.
This said, it would be quite easy for an phone company insider to set up an exact emulator but very hacker style to set up for ourselves, needing days of investigation on the actual phone to check out its hardware details.