I am doing tests with an android device programming, but something happens when an exception occurs with this device, the exception detail or nothing is not shown in the logcat, but if I connect another device and run the same application in the logcat if everything is shown the details of the exceptions. Who could give me a hand?
The phone is: Huawey Gplay Mini Android:4.4.2
The exception code is:
final Intent siguiente = new Intent(this,Sonido.class);
AlertDialog.Builder dialogo = new AlertDialog.Builder(this);
dialogo.setTitle("Atencion!!!");
dialogo.setMessage("1. Ponte los Dos Auriculares. \n2. Escucha y Lee todo atentamente.");
dialogo.setPositiveButton("Visto", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
startActivity(siguiente);
}
});
dialogo.create();
dialogo.show();
** (The Sound class is NOT an Activity) It should be noted that I am generating the exception on purpose precisely to realize that its details are not being generated in the logcat.**
After searching in Android development forums with problems with the same devices as you, I have found this, luckily I have just a test Huawei (And it had errors when verifying the GPS in hybrid applications ONLY IN THIS MODEL, so we comes the next solution good for both :D)
Mark on your device
A menu will appear that is hidden by default
You will see a menu with several options:
Go to Settings -> Log Setting -> and the following options appear
If this menu does not appear, it will most likely appear
Project Menu -> Background Settings -> Log setting :
Activate Mobile log and GPS log (if you use GPS in your app) after making these changes restart the phone.
STEP 1
STEP 2
PASO 3
Existe actualmente una respuesta similar, referente a los dispositivos HUAWEI:
Android 6.0 no muestra errores logcat Huawei en dispositivo Huawei
La especificación de este dispositivo y otros de la marca HUAWEI, define escribir el código: ##2846579## para abrir un menú que por default esta escondido.
http://helpdesk.houdinisoft.com/products/huaweim865-ascend-264
Así que abriendo ese menú vamos a
Project Menu
>Background Setting
>Log setting
definimos mostrar el log con log switch y el nivel con log level setting.Con esto ya puedo visualizar los mensajes en el LogCat.
If the above does not correct it, within the Android Monitor you should check if the device connects correctly, it should not have the text [OFFLINE], it may be that the connection cable fails and even the driver may have problems (a simple restart can correct temporarily the problem).