Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created August 10, 2012 23:55
Show Gist options
  • Select an option

  • Save tshirtman/3319086 to your computer and use it in GitHub Desktop.

Select an option

Save tshirtman/3319086 to your computer and use it in GitHub Desktop.
# -------------------------------------------------------------------
# Bluetooth
class Bluetooth(object):
j_env = SDL_ANDROID_GetJNIEnv()
j_class = env.FindClass("org/renpy/android/BluetoothConnection")
cdef __init__(self):
constructor = j_env->GetMethod(j_env, j_class, "<init>", "(C)V")
self._jself = j_env->NewObject(j_env, j_class, constructor)
cdef setUUID(self, uuid):
j_method = j_env->GetMethod(j_env, j_class, "setUUID", "(Ljava/lang/String;)V")
j_env->CallVoidMethod(
j_env, j_class, self._jself, j_method,
#XXX need to convert
j_env->NewStringUTF(uuid))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment