Android toast suppression in a package

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.

+7
source share
1 answer

Go to the App-Info screen of your application (long click on the application and drag it to the top on Android 4.0) and make sure the "Show notification" checkbox is selected. Otherwise, your toasts will be crushed.

+22
source

All Articles