-
Notifications
You must be signed in to change notification settings - Fork 238
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
The GetRandomAndriodVersion() creates endless loop #40
Comments
I test this method in a loop, but it's ok for me: for (int i = 0; i < 50; i++)
{
var device = AndroidDeviceGenerator.GetRandomAndroidDevice();
Debug.WriteLine($"{device.HardwareManufacturer} - {device.HardwareModel}\t\t\t\t|\t{device.AndroidVersion.VersionNumber}\t|\t{device.AndroidVersion.APILevel}");
} Output:
|
i tested the code its beginning to end with other methods together. This is a web app. Page reload every 3 seconds and get user media list. And i got this result. Please watch the video. |
i fixed bug like this: in AndroidVersion.cs change like that:
in AndroidDevice.cs change like that: |
Please send a pull request for your fix |
Sorry but it dont know how can i do it :( you must do this changes and update project. |
Added bfd5253 . |
Find a bug while loading session. Without changing AndroidVersion to AndroidVersionx! |
i tried this. But not worked correctly. Because it is always overwrite to old list. So method is becoming to endless loop.
and
and
it is working perfectly. Note: if you change only You must change this line because LastAndriodVersion is always default value = null. |
Please try this one: return LastAndriodVersion = androidVersion; to LastAndriodVersion = androidVersion;
return androidVersion; then test it. |
OK, I will changed to AndroidVer but you need to login again, wait for v1.1.0.5 |
Ok. Thank you. |
Added 3cdcb2f . |
@ramtinak why i don't know but this problem continue again :( when using static class it is always overwrite itself. so i did something like that. Create a new class for AndroidVersion in |
GetRandomAndriodVersion() method when call to it 5-10 time, it returns the same API level. So infinite loop occurs. (Then AndroidVersions list all the becoming same.)
The text was updated successfully, but these errors were encountered: