Android Question ToastMessageShow does not work

awama

Active Member
Licensed User
Longtime User
ToastMessageShow has recently stopped working in 2 apps.

I am using B4A 10.0.
I'm using xCustomListView Class v1.72

TostMessageShow works without xClv

What could be the problem?
 

awama

Active Member
Licensed User
Longtime User
In this example App "ToastMesssageShow" does not work. Why?
 

Attachments

  • clv_toastmessage_problem.zip
    20 KB · Views: 207
Upvote 0

awama

Active Member
Licensed User
Longtime User
I replaced code module with library but "ToastMessageShow" still does not work.
A set breakpoint causes the app to hang with the message "Program paused ..." and hangs permanently...
 
Upvote 0

Geezer

Active Member
Licensed User
Longtime User
Double check that your app allows notifications. Toasts will not show if they are disabled
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Until recently it still worked...
I have no idea what you are trying to do with this app and its objective, but I made the following changes I can see all the ToastMesssageShow , which show the index when I click the label that has fontawesome text:
1. I removed the Class module for the customlistview and replaced with the xCustomListView lib 1.72.
2. I deleted the layout called: offclv2 and recreated it with a new clv1 and clv2. When I run the app, I can see the toast message every time I click the label. If you still have issues, try to change your colors, although I do not think it is necessary. I tried with light theme and dark theme and both work. I tested with short and long message durations. I hope this helps.
 
Upvote 0

awama

Active Member
Licensed User
Longtime User
I have no idea what you are trying to do with this app and its objective, but I made the following changes I can see all the ToastMesssageShow , which show the index when I click the label that has fontawesome text:
1. I removed the Class module for the customlistview and replaced with the xCustomListView lib 1.72.
2. I deleted the layout called: offclv2 and recreated it with a new clv1 and clv2. When I run the app, I can see the toast message every time I click the label. If you still have issues, try to change your colors, although I do not think it is necessary. I tried with light theme and dark theme and both work. I tested with short and long message durations. I hope this helps.


I will imitate your solution and let you know if it works for me.
 
Upvote 0

awama

Active Member
Licensed User
Longtime User
Unfortunately, installing B4A 10.2 did not bring any improvement. The ToastMessageShow no longer works with 2 apps. I don't dare to recompile other apps for a test, because I fear a loss of functionality. I'm considering a complete deinstallation and reinstallation ... if I have the time ...
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
The ToastMessageShow no longer works with 2 apps.
We are here to please. I have created a project with the couple of changes I mentioned in post #8. The toastmessage is working for me when I click any of the label. I have attached the project . If you want to check it out, please unzip it and run it. That is all you have to do. If not, good luck with whatever decision you make.
 

Attachments

  • Projectawama091620.zip
    14.9 KB · Views: 144
Upvote 0

awama

Active Member
Licensed User
Longtime User
Hello Mahares. Thanks for your help.Your project works for me with xCustomListView lib AND class module. It seems to be related to the old ".bal" file (and maybe b4a10.x). I am trying to find out the reason.
 
Upvote 0

awama

Active Member
Licensed User
Longtime User
Hello Erel.
I was trying to find out why Mahare's solution worked for me.
But I couldn't find a reason why Mahares corrected project works and my project doesn't.
Only when I downloaded Mahares project again and tried it, "ToastMessageShow" did not work either.
Now I have found out the reason!
If I change the package name (from b4a.example to an other name) then it works.
If I uninstall the app before and then reinstall it, it works.
The same effect with every app I recompile with b4a 10.x.

How can that be?!
 
Upvote 0

Pendrush

Well-Known Member
Licensed User
Longtime User
If you turn off application messages (for that particular package name/application) in device settings, toasts messages will be hidden.

Edit:
You can change package name to check if this is the cause of your problems.
 
Upvote 0

awama

Active Member
Licensed User
Longtime User
If you turn off application messages (for that particular package name/application) in device settings, toasts messages will be hidden.

Edit:
You can change package name to check if this is the cause of your problems.

Yes, changing the package name will solve the problem, or uninstall and reinstall the app. But that means a lot of work and loss of data...
 
Upvote 0

awama

Active Member
Licensed User
Longtime User
Check your device settings as I wrote in my previous post.
Super.Thanks. That was the problem. Good that you wrote it in bold, so I thought it was important.
But why is this messaging feature only disabled in b4a 10.x and later (maybe also in 9.80 and later)
for existing apps that are recompiled, but it is enabled immediately when you install the app first?
 
Upvote 0
Top