Skip to content

Instantly share code, notes, and snippets.

View emrebayrm's full-sized avatar
🎯
Focusing

Emre Bayram emrebayrm

🎯
Focusing
View GitHub Profile

Here's an example of a simple Bluetooth Android application in Java. This example demonstrates how to discover nearby Bluetooth devices and establish a connection with one of them.

import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothSocket;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@emrebayrm
emrebayrm / result.h
Created October 6, 2025 15:09
Rust like Result object and the helpers.
#pragma once
#include <optional>
#include <string>
#include <variant>
/// Ok object with value
template <typename T>
struct Ok
{