ketai bluetooth help: bt = new KetaiBluetooth(this); causes force close
in
Contributed Library Questions
•
6 months ago
Processing version 2.06b
My phone (xperia mini pro) is running android 2.3.7 and i tried it with ketai v9 (gingerbread 2.3.7)
The BluetoothCursors example didn't work so I tried to strip it down to the bare minimum for bluetooth to find out what was wrong (the code is shown below):
The program launches successfully on the phone without the line "bt = new KetaiBluetooth(this);"
But when I uncomment that line, it launches but force closes.
I also tried ketai v9 (mainline) for my galazy s3 running android 4.1.2 and its the same issue. Could anyone help with this please. Much appreciated.
Thanks.
- import android.content.Intent;
- import android.os.Bundle;
- import ketai.net.bluetooth.*;
- import ketai.net.*;
- import oscP5.*;
- KetaiBluetooth bt;
- String msg = "inactive";
- void setup()
- {
- orientation(PORTRAIT);
- font = createFont("Courier", 15);
- textFont(font);
- }
- void draw()
- {
- background(0);
- fill(255);
- text(msg, 10, height/2);
- }
- void onCreate(Bundle savedInstanceState)
- {
- super.onCreate(savedInstanceState);
- // bt = new KetaiBluetooth(this); // ***********THIS IS THE PROBLEM!!!****
- // msg="created bt object";
- }
- void onActivityResult(int requestCode, int resultCode, Intent data)
- {
- bt.onActivityResult(requestCode, resultCode, data);
- }
1