1 package expo.modules.interfaces.taskManager; 2 3 import android.os.Bundle; 4 5 import java.util.Map; 6 7 public interface TaskInterface { getName()8 String getName(); getAppScopeKey()9 String getAppScopeKey(); getAppUrl()10 String getAppUrl(); getConsumer()11 TaskConsumerInterface getConsumer(); getOptions()12 Map<String, Object> getOptions(); getOptionsBundle()13 Bundle getOptionsBundle(); 14 15 // Executes the task with given data and error. execute(Bundle data, Error error)16 void execute(Bundle data, Error error); 17 18 // Same as above but also provides a callback that is invoked 19 // when the JavaScript app has finished executing the task. execute(Bundle data, Error error, TaskExecutionCallback callback)20 void execute(Bundle data, Error error, TaskExecutionCallback callback); 21 22 // Sets options for the task. setOptions(Map<String, Object> options)23 void setOptions(Map<String, Object> options); 24 } 25