Huawei Mate 8 do not show Toast messages from services

A

AC Question

My Huawei Mate 8 got upgraded to Android 7 (nougat).

Since then, a Toast message from service no longer shows.

I have a service which updates desktop widget and then sends a Toast message.
This service worked normally on several devices, and on several versions of Android (namely, on Android 5 and 6). Since my phone got upgraded to Android 7, the service still manages to update the desktop widget, but the Toast message does not appear at all.
The code which was so far used to send the Toast message is:
Handler handler = new Handler(
Looper.getMainLooper());
handler.post(new Runnable() {
@override
public void run() {
Toast.makeText(context,
messageText,
Toast.LENGTH_LONG).show();
};
});

I once more state that the code above works perfectly on multiple devices, and on multiple versions of Android (5 and 6). It does not, however, work on freshly upgraded Android 7 (it worked on my Huawei Mate 8 device while it had Android 6 on it).
Here is the Logcat dump when I call the Toast.show() from the service (which does not appear):

02-14 18:18:41.729: D/HwRTBlurUtils(31009): check blur style for HwToast-Toast, themeResId : 0x01030128, context : com.myapp.package.MyStatusService@e0f2013, Nhwext : 5, get Blur : enable with :100, [0, 0, 0, 0], [54, 54], 1.0f

I get this same entry in the Logcat when I call the Toast.show() from regular application. The only difference is that the Toast message is then shown when the Toast.show() is called from the application.

Thaks in advance,
Milan
 

Forum statistics

Threads
943,164
Messages
6,917,585
Members
3,158,853
Latest member
2fedes