From fb87d5e42db344be6d64aae506a12d3256f4d83b Mon Sep 17 00:00:00 2001 From: jens Date: Wed, 17 Nov 2021 21:46:56 +0100 Subject: [PATCH] BT tethering --- .idea/deploymentTargetDropDown.xml | 4 ++-- app/src/main/java/com/jens/automation2/Actions.java | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.idea/deploymentTargetDropDown.xml b/.idea/deploymentTargetDropDown.xml index c23aaba..3ec016f 100644 --- a/.idea/deploymentTargetDropDown.xml +++ b/.idea/deploymentTargetDropDown.xml @@ -7,11 +7,11 @@ - + - + \ No newline at end of file diff --git a/app/src/main/java/com/jens/automation2/Actions.java b/app/src/main/java/com/jens/automation2/Actions.java index 69f199c..2437d70 100644 --- a/app/src/main/java/com/jens/automation2/Actions.java +++ b/app/src/main/java/com/jens/automation2/Actions.java @@ -390,6 +390,15 @@ public class Actions { Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1); } + catch(InvocationTargetException e) + { + /* + Exact error message: "Bluetooth binder is null" + This means this device doesn't have bluetooth. + */ + Miscellaneous.logEvent("e", "Bluetooth Tethering", "Device probably doesn't have bluetooth. " + Log.getStackTraceString(e), 1); + Toast.makeText(context, context.getResources().getString(R.string.deviceDoesNotHaveBluetooth), Toast.LENGTH_SHORT).show(); + } catch (Exception e) { Miscellaneous.logEvent("e", "Bluetooth Tethering", Log.getStackTraceString(e), 1);