-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discovery of Android devices from Windows - without Google Files or Activity Intent #154
Comments
You need to advertise a BLE service with these parameters:
If you're using win32 APIs, this looks like a good starting point (it's unreasonably messy though). For UWP/WinRT, use this. (sorry, I'm too lazy to set up Visual Studio on my VM to provide you with a minimal working code example for this specific case) |
Thank you, @grishka! Can you please tell me if I am missing something here? Thank you! ` public sealed class BLEAdvertisementService
|
You need to append 10 random bytes to the service data. |
Excuse my naivety here. Can you please explain what the service data should be? Is it any random 10 bytes? Or should I append 10 random bytes to the service data that you have already given - |
Yes, to the one I already given |
Thank you, @grishka! Can you please tell me if I can run this BLE service as a separate process (independent of my actual UWP app) for now? I have a few build issues with my UWP app as of now. I want to quickly establish if the whole approach works for me. And in case you have a publicly available Windows equivalent of this project of yours, it would be a great inspiration to me! |
You can. It doesn't matter which process you run it in, that doesn't change the broadcasts that go out. I was able to make them with "nRF Connect" Android app, for example. That app is also how I determined the format. |
Hello @grishka, Despite broadcasting the said signal, my Android device is still not visible without using an older version of the Google Files app and tapping "receive". Here is my broadcast code:
Edit: @grishka, if I set the serviceUuid, then I see an exception "Value does not fall within the expected range" when the publisher starts. I tried to understand the significance of Service Uuid and the Service Data, but I am just getting started. Thanks a lot! |
Hello @grishka, hope you are doing great! I spent some more time debugging my code and gained a deeper understanding. Updated my previous question. Please consider responding when feasible. |
Hello @grishka, hope you are doing great! Looking forward to your inputs in fixing this. |
Why would you want to do that while the official quick share for windows solution exists? |
By the way, you can use this app to see what you're actually sending out |
Hello @grishka,
Kudos on the amazing solution for content sharing between MacOS and Android!
I am attempting to build a similar solution for Windows, but I need a little help in sending the signal from Windows to make the nearby Android devices visible. I don't want to use the Google Files app or trigger the actvity-intent (com.google.android.gms.RECEIVE_NEARBY).
Can you help me understand how I can send this signal? Any sample code on how the message can be constructed would be very helpful!
Thank you!
The text was updated successfully, but these errors were encountered: