onActivityResult, startActivityForResult and SDK API 10 Errors

So, I am trying to learn Android mode thru Scott C's 4 part tutorial. here at http://arduinobasics.blogspot.com/2013/03/arduino-basics-bluetooth-android.html

The problem is when I try to simulate his Android/Processing Sketch 3: BluetoothChecker2 on my phone, I get several errors on the onActivityResult and startActivityForResult.

the function onActivityResult does not exist somehow so it might by a problem with the library and for the startActivityForResult I am having errors on @Override.

I am currently running sketch on Processing 3.0 and API 22 but Scott's settings on that time he made the tutorial was on Processing 2.0 Beta and API 10. The reason why i am running on API 22 is because I cannot seem to target the API 10 SDK even though I have already downloaded it using SDK Manager.


  • 10 is no longer supported. Try min API 15

  • Answer ✓

    @dlare=== a) as for the API hudson is right. b) as for the errors can you put the console? c) try the same code with p2XX: if it works (i think so) that means that the problem is that with P3 you are NOT in an activity but in a fragment created by the MainActivity from P3...

  • I switched from Scott C's tutorial to using KETAI but the problem with KETAI Bluetooth communication is that it sends bytes instead of strings

  • Answer ✓

    @Dlare=== difficult to help you as you change the question...Yet as for the last one why don't you create some conversion method bytestoString()?

  • I had the same issue and added getActivity() in front of startActivityForResult -->getActivity().startActivityForResult(enableBtIntent, REQUEST_ENABLE_BT);

Sign In or Register to comment.