Skip to content

Instantly share code, notes, and snippets.

@mlalkaka
mlalkaka / ue-roll.sh
Last active October 30, 2022 11:31
Power on and off a UE Roll via Bluetooth using GATT and SPP
#!env sh
mac=C0:28:8D:00:2A:A8
function ue_on() {
handle=0x0003
value=b469218dd9e701
gatttool -b $mac --char-write-req --handle=$handle --value $value
}
@ErikHellman
ErikHellman / Activity showing surface switch
Created June 22, 2013 09:17
A simple demo of playing a video on one SurfaceView and switching to another during playback.
package com.example.mediaplayersurfaceswitch;
import android.app.Activity;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;