Exchange a unique string between smartphones (android & ios) in proximity constantly in background - flutter

I want to write an app that when installed makes the smartphone broadcast a unique string to other smartphones using the app. So the app shall broadcast and check for broadcasts constantly in the background while not draining to much energy. I'd like to implement the app in Flutter. So if you could suggest a plugin or a native android/ios api that is suited for this usecase I would greatly appreciate it.

Related

how can i make my flutter application detects other phones using ble?

I'm using an app that uses Bluetooth low energy to scan and detect devices however it does not detects other phones
is there a specific way on flutter to make it detect other mobile phones
You can only detect BLE devices that are advertising their services. A mobile phone often does not do that on its own. There are two solutions:
Use an already available app on the other device to advertise some service. One of the possible apps I personally use is nRF Connect, another one would be BLE Peripheral.
This might not be sufficient depending on your project and goal this might not be sufficient. If you need some specific service or characteristic that can't be generated by pre-existing apps you have to develop your own app for advertising. This would be possible with flutter_ble_peripheral (limited functionality on iOS)

How can I get real-time heart rate data in a progressive web app for phones?

I'm building a progressive web application (target is smart phones for now). The app needs to be able to access heart rate and heart rate variability, ideally in real-time. While it seems totally asinine, I'm open to using REST calls to some remote server if that is the only way. I'm also fine with restricting the app to only work with certain hardware if necessary. In this case, the ideal hardware would be some sort of earbud that uses optics to scan for heart rate, but at this point, I'm open...
The best that I have thought up is to find a heart rate monitor that converts the direct signal into audio and use the microphone web API. That seems like a lot more work than ideal, so I'm hoping someone has a better idea. Any ideas are welcome. Please, no one downvote anyone if it doesn't solve all my constraints. I've been working on this for a bit and I'm not sure that there is a clean and perfect solution yet. Thanks in advance!
If the sensor can speak Bluetooth, the Web Bluetooth API can perhaps help: https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API
https://developers.google.com/web/updates/2015/07/interact-with-ble-devices-on-the-web
How about use a Web Bluetooth that lets you control any Bluetooth Low Energy device like heart rate monitors. It will read the Service Location Characteristics (which tells your where the sensor is placed - which body part) and subscribe to notifications from the Heart Rate Characteristics, meaning you will get an event whenever the device performs a new measurement. Then use a service worker that will define the behavior of the app to mimic native app capabilities like offline support and notifications.
It's like a Physical Web that you can send a link to your website from a Bluetooth beacon to a user's device and with PWA, that link can be to your web app that looks, feels and functions like a native app. Then with Web Bluetooth, you can then speack to the device. Visit this blog post for more details.

How to run a service/daemon in Android TV Oreo at all times?

I want to build an application for the Android TV platform. Part of this app is a service/daemon, which must start when the device boots, and must always run when the Android TV is powered on, even in stand-by.
Why do I want this service/daemon to run at all times? Part of my project is an application for portable devices (such as a smartphones and/or tablets), which will send commands via TCP to the Android TV app. Based on the kind of TCP message, the app will perform an action (power device on/off, push my app to the foreground etc.).
I have tried different code examples, but Android TV Oreo just kills this service after a while. I think these code examples were made before the Android Oreo restrictions.
An application like Kodi for the Android TV, has a web service that is always running in the background. Even on Oreo. but I can't figure it out how they have done that. Does anyone have some tips for me?
Edit: Yatse Remote Starter does what I want for Kodi, what I want to do with my app. It starts on boot, runs even in stand-by. https://play.google.com/store/apps/details?id=tv.yatse.android.remotestarter&hl=en. Still I would like to know how, so I can do it myself as well. Thanks in advance!
Many android apps and services are running simultaneously. To lower the chance of problems which cause poor user experience, Android 8.0 apps has two ways to limit what an app can do:
Background Service Limitations: While an app is idle, there are limits
to its use of background services. This does not apply to foreground
services, which are more noticeable to the user.
Broadcast Limitations: With limited exceptions, apps cannot use their
manifest to register for implicit broadcasts. They can still register
for these broadcasts at runtime, and they can use the manifest to
register for explicit broadcasts targeted specifically at their app.
Therefore, you need to create a ForegroundService in order to continue processing of your app. You can check this SO post regarding this issue.

Using Beacon as a locating device in retail

how to detect beacon signal and do we need to make any app to manage it or any predefined app or site is available?
I want to know how Beacon works and which Beacon is suitable for retail.
You need a mobile phone with Bluetooth 4.0 to detect beacons. They emit a BLE signal which is a little different from the normal Bluetooth signal. There are many generic apps in the play store and maybe in the app store to detect them.
But if you are looking for real functionality related to that, then you'll be needing the retail store-specific mobile app so that it can show you relevant updates in the app.

Application that receives DVB-H broadcast signal

DVB-H is a fairly new broadcasting medium. One purpose it is used for is to broadcast TV channels to TV phones and mobile decoders.
The software supplied by the service provider for windows does the job, but the display is small. I want to explore the possibilities of creating my own software that receives the signal and displays it to the screen. Also perhaps create an application to do the same on Blackberry and Android phones.
Anyone with any leads as to where I can get more info on coding with for DVB-H Broadcasts?
If you are working with Linux, you can probably best use Linux API (see this) under the LinuxTV project.
Alternatively, in J2ME based platforms you can follow JSR272 to access the DVB-H receiver. See this and this for more reference.
Unfortunately DVB-H based devices are specialized, so you need to specify which devices you want to support.