Comments (14)
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:
LGE - Nexus 4 | 5.0 | 21
asus - Nexus 7 | 7.0 | 24
Huawei - Nexus 6P | 9.0 | 27
Sony - SO-02G | 4.2 | 17
LGE - Nexus 5X | 9.0 | 27
samsung - SM-T705 | 8.1 | 27
Sony - E6653 | 7.0 | 24
samsung - SM-N915W8 | 8.0 | 26
samsung - SM-G935T | 4.4 | 19
Sony - E6653 | 7.0 | 24
samsung - SM-G935T | 4.4 | 19
LGE - Nexus 4 | 5.0 | 21
samsung - SM-N915W8 | 8.0 | 26
LGE - Nexus 5 | 7.1 | 25
asus - Nexus 7 | 7.0 | 24
LGE - LG-LS970 | 9.0 | 27
asus - Nexus 7 | 4.0.3 | 15
samsung - SM-N900P | 4.2 | 17
LGE - LG-LS970 | 9.0 | 27
samsung - SM-N900P | 4.2 | 17
LGE - LG-LS970 | 9.0 | 27
asus - Nexus 7 | 4.0.3 | 15
samsung - SM-N915W8 | 8.0 | 26
LGE - Nexus 5X | 9.0 | 27
LGE - LG-D500 | 4.1 | 16
HTC - HTC 10 | 4.3 | 18
asus - Nexus 7 | 7.0 | 24
Sony - E6653 | 7.0 | 24
HUAWEI - hi6250 | 4.3 | 18
asus - Nexus 7 | 4.0.3 | 15
samsung - SM-T705 | 8.1 | 27
LGE - LG-LS970 | 9.0 | 27
samsung - SM-N900P | 4.2 | 17
LGE - Nexus 5X | 9.0 | 27
HUAWEI - hi6250 | 4.3 | 18
LGE - LG-D500 | 4.1 | 16
LGE - LG-LS970 | 9.0 | 27
samsung - SM-T310 | 7.0 | 24
Huawei - Nexus 6P | 9.0 | 27
HTC - HTC 10 | 4.3 | 18
LGE - Nexus 4 | 5.0 | 21
LGE - LG-LS970 | 9.0 | 27
Sony - SO-02G | 4.2 | 17
samsung - samsungexynos7420 | 8.0 | 26
samsung - SM-G900F | 4.2 | 17
LGE - Nexus 4 | 5.0 | 21
samsung - SM-G900F | 4.2 | 17
LGE - LG-D500 | 4.1 | 16
LGE - Nexus 5 | 7.1 | 25
LGE - Nexus 5X | 9.0 | 27
from instagramapisharp.
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.
https://www.youtube.com/watch?v=Vz5UzZlZLGA
from instagramapisharp.
i fixed bug like this:
in AndroidVersion.cs change like that:
private static AndroidVersion LastAndriodVersion;
to
private static AndroidVersion LastAndriodVersion = AndroidVersions[AndroidVersions.Count - 1];
return LastAndriodVersion = androidVersion;
to
return androidVersion;
in AndroidDevice.cs change like that:
public AndroidVersion AndroidVersion { get; set; } = AndroidVersion.GetRandomAndriodVersion();
to
public AndroidVersion AndroidVersionx { get; set; } = AndroidVersion.GetRandomAndriodVersion();
(this name replaced everywhere used)
from instagramapisharp.
Please send a pull request for your fix
from instagramapisharp.
Sorry but it dont know how can i do it :( you must do this changes and update project.
from instagramapisharp.
Added bfd5253 .
wait for v1.1.0.3
from instagramapisharp.
Find a bug while loading session.
Please don't use new version.
Can you do one thing? Only change this part of old commit:
return LastAndriodVersion = androidVersion
to
return androidVersion
Without changing AndroidVersion to AndroidVersionx!
And try it. Let me know.
from instagramapisharp.
i tried this. But not worked correctly. Because it is always overwrite to old list. So method is becoming to endless loop.
When change;
public AndroidVersion AndroidVersion { get; set; } = AndroidVersion.GetRandomAndriodVersion();
to
public AndroidVersion AndroidVer { get; set; } = AndroidVersion.GetRandomAndriodVersion();
and
return LastAndriodVersion = androidVersion;
to
return androidVersion;
and
private static AndroidVersion LastAndriodVersion;
to
private static AndroidVersion LastAndriodVersion = AndroidVersions[AndroidVersions.Count - 1];
it is working perfectly.
Note: if you change only
return LastAndriodVersion = androidVersion;
to
return androidVersion;
You must change this line
private static AndroidVersion LastAndriodVersion;
to
private static AndroidVersion LastAndriodVersion = AndroidVersions[AndroidVersions.Count - 1];
because LastAndriodVersion is always default value = null.
And if you change only this line, always is happening endless loop
from instagramapisharp.
Please try this one:
Change:
return LastAndriodVersion = androidVersion;
to
LastAndriodVersion = androidVersion;
return androidVersion;
then test it.
from instagramapisharp.
No. it is same. Overwrite to list!
from instagramapisharp.
OK, I will changed to AndroidVer but you need to login again,
If you didn't new login, every time you load your old account session, android device will change.
Because it saved as AndroidVersion not AndroidVer.
wait for v1.1.0.5
from instagramapisharp.
Ok. Thank you.
from instagramapisharp.
Added 3cdcb2f .
from instagramapisharp.
@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 Classess > Android > DeviceInfo > AndroidVersionClass.cs
and change something in AndroidVersion.cs
& AndroidDevice.cs
. i hope this is help for that. i tested it is working.
from instagramapisharp.
Related Issues (20)
- Banned account got LimitError status on logging
- Challenge Required Error when trying to login HOT 5
- Instagram HOT 5
- It does not receive the media share HOT 1
- How to list only unread direct messages (DM) #59 HOT 1
- UploadStoryPhotoAsync for stories doesn't seem to work properly
- Upload video is not working and giving me 500 error "internal server error" HOT 1
- Direct template message
- How to mark DM messages as read HOT 1
- How to mark DM messages as read HOT 2
- Fix issue with auto_expand_chaining
- Video views and Sponsor Tags HOT 1
- check if a direct message has seen by user HOT 3
- Bug : [GetFullUserInfoAsync] does not work HOT 1
- Login instagram on chrome using session ? HOT 1
- "int too big to convert" on uploading media HOT 11
- Disabling accounts who are not aggressive likers, commenters HOT 1
- Search and find related posts
- LocationProcessor.GetLocationStoriesAsync return error every time
- handle is missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from instagramapisharp.