Android Question Android 11 and Custom Toast

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
I've been using @Erel 's custom toast message code for Android version 8 tablets, but a customer's new Android 11 tablet is failing to return a view object on the toast create. In what research I've been able to do, it looks like there is a change in how you create a toast message in Android version 11.

What I know about the underlying Android system, and Java in general would fill a thimble, so I don't know if this is something that needs to or can be changed or if it is a peculiarity of their new tablet?

Has anyone used the code I linked on an Android 11 device with success?
 
Last edited:

mcqueccu

Well-Known Member
Licensed User
Longtime User
Upvote 1

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
As Erel said in the custom post thread #11


Recommend to switch to BCToast - https://www.b4x.com/android/forum/t...platform-custom-toast-message.111046/#content
I missed that post that far down, perhaps @Erel would be kind enough to edit post #1 for idiots such as myself ;)

I appreciate the BCToast suggestion, unfortunately the project in question is a custom one for a very particular customer and one of their requirements is no 3rd-party libraries, period.

I was hoping there's a way to modify the creation method to make it work. If not then, I'll give them the options of the original toast message or they can have dialog boxes.

Thanks @mcqueccu !
 
Upvote 0

Jeffrey Cameron

Well-Known Member
Licensed User
Longtime User
BCToast is not a 3rd-party library, it is an internal library !
Sorry, I saw two initials in the front of the name and I just assumed it was a user-contribution ;)

Also, the "unlike B4A built-in toast message feature, this toast message can only be displayed from an Activity." might be an issue as well as I'm not sure if there are any services that are using the custom toast, but I'll look into it.

Thanks @klaus
 
Upvote 0
Top