Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android 9.0] ShowToast not working with AndHUD 1.4.0 #38

Closed
azuken opened this issue Jan 28, 2019 · 4 comments
Closed

[Android 9.0] ShowToast not working with AndHUD 1.4.0 #38

azuken opened this issue Jan 28, 2019 · 4 comments
Assignees

Comments

@azuken
Copy link

azuken commented Jan 28, 2019

Hi,

We have an issue with ShowToast function, which throw no error but stop async execution.

We just upgraded our project from Xamarin Forms 3.1 (3.1.0.583944) to 3.4 (latest release 3.4.0.1029999), we are also now targeting Android 9.0, and AndHUD to 1.4.0.
I've done some tests, and AndHUD update is the problem.
Rollback to 1.2.0 solves the problem.
Rollback to 8.1 Android target or Xamarin Forms 3.1 didn't change issue.

@Cheesebaron Cheesebaron self-assigned this Feb 4, 2019
@Cheesebaron
Copy link
Collaborator

Can you provide an example of the usage?

You are calling ShowToast in an async method? Which thread are you on at the time of the execution?

@azuken
Copy link
Author

azuken commented Feb 4, 2019

Here is my implementation :

In Droid project

public void ShowToast(string message, TimeSpan duration) { AndHUD.Shared.ShowToast(CrossCurrentActivity.Current.Activity, message, MaskType.None, duration, false); }

And my call :

private async Task Notify(string successMessage) { ShowToast(successMessage, TimeSpan.FromSeconds(2)) }

So yes I call the method in an async task, and I am in the UI Thread.

@Cheesebaron
Copy link
Collaborator

Nevermind, I found the bug. When using the non-centered version of Toast there is a NullReferenceException. Will fix that asap and release a new version. Thank you for reporting the issue.

@Cheesebaron
Copy link
Collaborator

https://www.nuget.org/packages/AndHUD/1.4.1 should be there soon. If you cannot wait you can grab the NuGet from our CI: https://ci.appveyor.com/project/Redth/andhud/builds/22109106/artifacts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants