Sorry
I am working with two options, one that works with char and other with String
The one that works with char, it works perfectly with what you told me, one more time thank you for your time, seriously thank you 
I want to apologise for not explaining myself correctly, i don't want you to think that i am an idiot, I am working with this project, the last subject of the university and my brain is exhausted.
Explaining the problem with the code that works this String:
I use the same app as you, I am going to post screenshots of the setting, because maybe there are something wrong there, but I didn't change anything.
And also what I send in the app.
I will also post a screenshot of what It's printed on my computer.
Explanation:
I also coment a lot of thing so it is easier to understand it
The maximun numbers send by bluetooth of charactes are going to be three ended with a "."
Example: 1000. this is how i wanted to be send by bluetooth, but i send a 10. to check it (you can see it in the screenshot below.
what does this code do?
two numbers are going to be send by bluetooth
First it is going to be sent one, is going to be checked if it is only numbers, and if this is correct is going to be transform from String->int, and finally it is going to be saved in an array called "Data_Base"
This two numbers are called: "Humedad" and "Lux"
As you can see in the screenshot from my computer ( the first one, the other one is from my phone) It reads my number correctly and then triggers when it shouldn't checking the second number (number that I didn't send), and then ask for this second number
I don't know if i provide all the information that is needed
I hope this works correctly on your ESP32, therefore I will ask my teacher for another one tomorrow Monday.
If not, I hope you could tell me how to make it work well.
One more time, thank you for your time.
#include "BluetoothSerial.h"
#if !defined(CONFIG_BT_ENABLED) || !defined(CONFIG_BLUEDROID_ENABLED)
#error Bluetooth is not enabled! Please run `make menuconfig` to and enable it
#endif
BluetoothSerial SerialBT;
int Data_Base[2]={0,0};
int valor=1; // if valor=1 it will ask for the first value, valor=2 it will ask for the second value
int entero=0;
int primera=0;
void setup() {
Serial.begin(9600);
SerialBT.begin("ESP32_Invernadero"); //Bluetooth device name
}
int COMPROBAR(String Lectura, int Cantidad){ // this function "COMPROBAR" works correctly :) I check it in other exmple
int correcto=0;
int total=Lectura.length();
Serial.println("Numero de caracteres: ");
Serial.println(total);
if(total==0)
return 0;
if(total>Cantidad)
return 0;
for (int i=0; i<total; i++){ //comoruebo que todo son nuermos
if(Lectura.charAt(i)=='0' ||
Lectura.charAt(i)=='1' ||
Lectura.charAt(i)=='2' ||
Lectura.charAt(i)=='3' ||
Lectura.charAt(i)=='4' ||
Lectura.charAt(i)=='5' ||
Lectura.charAt(i)=='6' ||
Lectura.charAt(i)=='7' ||
Lectura.charAt(i)=='8' ||
Lectura.charAt(i)=='9' ){
correcto++;
}
}// fin for
if(correcto == total){
Serial.println("CORRECT, YOU ONLY WROTE NUMBRES");
return 1;
}else{
Serial.println("INCORRECT");
return 0;
}
} // fin COMPROBAR(String Lectura, int Cantidad)
void loop() {
if(valor==1){ // valor=1 because I want this to be repeated until the data that I send is correct, when it is correct I will change valor=2
if(primera==0){ // because i am in a loop, i only want this to be printed ones until a message is send
primera=1;
Serial.println("Write humedad: "); // I ask for the first number
}
if (SerialBT.available()) {
String Lectura=SerialBT.readStringUntil('.'); // I need to finish the numbers with a . to be correct
if(Lectura == "\n" or Lectura == "\r" or Lectura == " "){ // i also check is this are two spaces
Serial.println("Cheking if I am here");
return;
}else{
primera=0; // so "Mete dato humedad: " can be printed the next time
Serial.println("Numero metido one: "); // to chek if I am here
Serial.println(Lectura);
entero=COMPROBAR(Lectura,3); // To know If all the characters are numbers, it will return a 1 if it is correct, I send the number read and the maximun number of characters
if (entero==1){ // the number read is correct
valor=2; // if the numeber is correct This code will ask for the next number
int myInt = Lectura.toInt(); // change string to int
Serial.println("YESS"); // print yesss to know i am here
Serial.println(myInt);
Data_Base[0]=myInt;
Serial.print(Data_Base[0]); // and i print both numbers of the array
Serial.print(" ");
Serial.println(Data_Base[1]);
}else{
valor=1; // if the number is not correct I want to do this until is correct , so it is going to be repeated
}
}
}//fin interrupcion bluetooth
}// fin valor 1
if(valor==2){ // when valor=2 it will ask for the other value
if(primera==0){
primera=1;
Serial.println("Write Lux: "); // I ask for the second number
}
if (SerialBT.available()) {
//primera=0;
String Lectura=SerialBT.readStringUntil('.');
if(Lectura == "\n" or Lectura == "\r" or Lectura == " "){
Serial.println("entre aqui dos");
return;
}else{
primera=0;
Serial.println("Numero metido 2: ");
Serial.println(Lectura);
entero=COMPROBAR(Lectura,3); // para saber que todos los caractares son numeros
if (entero==1){
valor=1; // it will ask for the first value
int myInt = Lectura.toInt(); // lo transformo a int
Serial.println("YESS");
Serial.println(myInt);
Data_Base[1]=myInt;
Serial.print(Data_Base[0]);
Serial.print(" ");
Serial.println(Data_Base[1]);
}else{
valor=2;
}
}
}//fin interrupcion bluetooth
}// fin valor 3
}