Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of NFC using Windows Proximity APIs in Rust
// Example of NFC using Windows Proximity APIs
// Tested using Sony RC-S380 (make sure you enable NFP in the driver).
use winrt::*; // import various helper types
use winrt::windows::foundation;
use winrt::windows::networking::proximity;
use std::{thread, time};
const URL: &str = "";
fn main() {
let device = proximity::ProximityDevice::get_default().unwrap()
.expect("No default proximity device found");
let url = foundation::Uri::create_uri(&FastHString::new(URL)).unwrap();
loop {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment