Click here to Skip to main content
15,890,897 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

As a new android developer. I would like to know if there's an equivalent to iOS dispatch_async in android.
I would like to implement a background task/process to read a [bin] file and send it using BLE which is pretty much done in obj-C.
If there's no equivalent to dispatch_async in android what would be the best/simplest way to imitate this functionality?
I'm using Android Studio.

Thanks in advance.

What I have tried:

how it's been done in obj-C:
Objective-C
dispatch_async(dispatch_get_global_queue(0, 0), ^{
        //load your data here.
        dispatch_async(dispatch_get_main_queue(), ^{
            [_progressPercent setText:@"Preparing ..."];
        });
    });

Java
/**in android? */
Posted
Updated 27-Mar-18 3:53am

1 solution

"I would like to implement a background task/process to..."

See here.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900