File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
android/src/main/java/it/innove Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -188,16 +188,17 @@ public void enableBluetooth(Callback callback) {
188188 return ;
189189 }
190190 if (!getBluetoothAdapter ().isEnabled ()) {
191- enableBluetoothCallback = callback ;
192191 Intent intentEnable = new Intent (BluetoothAdapter .ACTION_REQUEST_ENABLE );
193192 if (getCurrentActivity () == null )
194193 callback .invoke ("Current activity not available" );
195194 else
196195 {
196+ enableBluetoothCallback = callback ;
197197 try {
198198 getCurrentActivity ().startActivityForResult (intentEnable , ENABLE_REQUEST );
199199 }catch (Exception e ){
200- callback .invoke ("Current activity not available" );
200+ enableBluetoothCallback = null ;
201+ callback .invoke ("Error starting enable bluetooth activity" );
201202 }
202203
203204 }
You can’t perform that action at this time.
0 commit comments