I am developing an Android application and I am trying to show some information using Toast . I used Toast in other projects, and everything works, but in this application, when Toast appears, it does not, and Logcat displays the following message: Suppressing toast from package com.xxxxxxx by user request.
I am creating a toast with the following code:
Context context = xxxxxxx.this; CharSequence text = "Hello toast!"; int duration = Toast.LENGTH_SHORT; Toast toast = Toast.makeText(context, text, duration); toast.show();
I tried to set the context using getApplicationContext() and getBaseContext() too, but it does not work.
Does anyone know how to solve this problem?
Many thanks.
xpaterna
source share