CoVer_App/app/src/main/java/com/example/cover_a01/bluetooth/BluetoothFragment.java
/**
     * same as generateNewID but with a custom value from a textfield CAN ONLY BE HEX VALUE 0-9,a-f
     */
same as generateNewID but with a custom value from a textfield CAN ONLY BE HEX VALUE 0-9,a-f
same as generateNewID but with a custom value from a textfield CAN ONLY BE HEX VALUE 0 - 9 a - f
public void generateNewID_custom(){
        if(preferences.getBoolean("trackingOn",true)) {
            button_generateNewID_custom.setBackgroundColor(getResources().getColor(R.color.blue_NICE));
            button_generateNewID_custom.setText("GENERATE FROM CUSTOM HEX");
            String uid = customID.getText().toString();
            startServiceBroadcast(uid);
            myIdView.setText(uid);
            coVerDatabase.secretKeyDao().insert(new SecretKey(uid));
        }else{
            button_generateNewID_custom.setBackgroundColor(getResources().getColor(R.color.red_NICE));
            button_generateNewID_custom.setText("tracking disabled");
        }
    }
public void generateNewID_custom ( ) { if ( preferences . getBoolean ( "trackingOn" , true ) ) { button_generateNewID_custom . setBackgroundColor ( getResources ( ) . getColor ( R . color . blue_NICE ) ) ; button_generateNewID_custom . setText ( "GENERATE FROM CUSTOM HEX" ) ; String uid = customID . getText ( ) . toString ( ) ; startServiceBroadcast ( uid ) ; myIdView . setText ( uid ) ; coVerDatabase . secretKeyDao ( ) . insert ( new SecretKey ( uid ) ) ; } else { button_generateNewID_custom . setBackgroundColor ( getResources ( ) . getColor ( R . color . red_NICE ) ) ; button_generateNewID_custom . setText ( "tracking disabled" ) ; } }
same as generateNewID but with a custom value from a textfield CAN ONLY BE HEX VALUE 0-9,a-f
same as generateNewID but with a custom value from a textfield CAN ONLY BE HEX VALUE 0 - 9 a - f
//only generate a new key when tracking is enabled