Example usage for com.facebook.react.bridge Arguments makeNativeArray

List of usage examples for com.facebook.react.bridge Arguments makeNativeArray

Introduction

In this page you can find the example usage for com.facebook.react.bridge Arguments makeNativeArray.

Prototype

public static <T> WritableNativeArray makeNativeArray(final Object objects) 

Source Link

Document

This overload is like the above, but uses reflection to operate on any primitive or object type.

Usage

From source file:org.jitsi.meet.sdk.invite.InviteController.java

License:Apache License

public Future<List<Map<String, Object>>> invite(final List<Map<String, Object>> invitees) {
    final boolean inviteBegan = invite(UUID.randomUUID().toString(), /* reactContext */ null,
            Arguments.makeNativeArray(invitees));
    FutureTask futureTask = new FutureTask(new Callable() {
        @Override//  w  w  w. j a  va  2 s  . c  o  m
        public List<Map<String, Object>> call() {
            if (inviteBegan) {
                // TODO Complete the returned Future when the invite
                // settles.
                return Collections.emptyList();
            } else {
                // The invite failed to even begin so report that all
                // invitees failed.
                return invitees;
            }
        }
    });

    // If the invite failed to even begin, complete the returned Future
    // already and the Future implementation will report that all invitees
    // failed.
    if (!inviteBegan) {
        futureTask.run();
    }

    return futureTask;
}