- Jun 6, 2020
- 11,517
- 4,383
Android 4+ doesn't allow applications to make network calls on the main thread. There is a good reason for this restriction as such calls cause the UI to freeze and after 5 second Android will show the "Application not responding" dialog.
Proper libraries take care of handling network calls with background threads. If you encounter a library that doesn't do it then you have two options:
1. Use the Threading library to start a background thread and make the calls from this thread.
2. Disable this check.
The code posted here disables this check (it only calls public APIs and is safe to use):
B4X:
Proper libraries take care of handling network calls with background threads. If you encounter a library that doesn't do it then you have two options:
1. Use the Threading library to start a background thread and make the calls from this thread.
2. Disable this check.
The code posted here disables this check (it only calls public APIs and is safe to use):
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید
برای دیدن لینک ها باید ثبت نام کنید