I have written two apps:
One for uploading data to a server via FTP.Upload controlled by a timer. It works fine
Another one to retrieve data from a IoIo-Board. Works also fine.
Combining the codes of both to upload the measured data I'm getting the "android.os.NetworkOnMainThreadException" as soon the app reaches the statement: YOYO.WaitForConnect() which comes directly after YoYo.initialize(false)) in Activity_create(...).
How to avoid the exception?
One for uploading data to a server via FTP.Upload controlled by a timer. It works fine
Another one to retrieve data from a IoIo-Board. Works also fine.
Combining the codes of both to upload the measured data I'm getting the "android.os.NetworkOnMainThreadException" as soon the app reaches the statement: YOYO.WaitForConnect() which comes directly after YoYo.initialize(false)) in Activity_create(...).
How to avoid the exception?