{"action":"opened","issue":{"url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/124","repository_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android","labels_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/124/labels{/name}","comments_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/124/comments","events_url":"https://api.github.com/repos/BoltsFramework/Bolts-Android/issues/124/events","html_url":"https://github.com/BoltsFramework/Bolts-Android/issues/124","id":173816842,"number":124,"title":"[Nativescript] Plugin Development Help Please","user":{"login":"roblav96","id":1457327,"avatar_url":"https://avatars.githubusercontent.com/u/1457327?v=3","gravatar_id":"","url":"https://api.github.com/users/roblav96","html_url":"https://github.com/roblav96","followers_url":"https://api.github.com/users/roblav96/followers","following_url":"https://api.github.com/users/roblav96/following{/other_user}","gists_url":"https://api.github.com/users/roblav96/gists{/gist_id}","starred_url":"https://api.github.com/users/roblav96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roblav96/subscriptions","organizations_url":"https://api.github.com/users/roblav96/orgs","repos_url":"https://api.github.com/users/roblav96/repos","events_url":"https://api.github.com/users/roblav96/events{/privacy}","received_events_url":"https://api.github.com/users/roblav96/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-29T16:37:57Z","updated_at":"2016-08-29T16:37:57Z","closed_at":null,"body":"Hello! I just started getting into native app development using [NativeScript](https://www.nativescript.org/) and I'm attempting to develop a plugin for this repository.\r\n\r\nHere are the TypeScript declarations file generated for Bolts-Android:\r\n(Sorry, I would make a gist but there's no TypeScript syntax support 😭 )\r\n```TypeScript\r\n/// <reference path=\"./java.io.PrintStream.d.ts\" />\r\n/// <reference path=\"./java.io.PrintWriter.d.ts\" />\r\n/// <reference path=\"./java.lang.String.d.ts\" />\r\n/// <reference path=\"./java.lang.Throwable.d.ts\" />\r\n/// <reference path=\"./java.util.List.d.ts\" />\r\ndeclare module bolts {\r\n\texport class AggregateException exports java.lang.Exception {\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: string);\r\n\t\tpublic constructor(param0: string, param1: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Throwable);\r\n\t\tpublic constructor(param0: string, param1: native.Array<java.lang.Throwable>);\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: string);\r\n\t\tpublic constructor(param0: string, param1: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Throwable);\r\n\t\tpublic constructor(param0: string, param1: java.util.List);\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: string);\r\n\t\tpublic constructor(param0: string, param1: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.util.List);\r\n\t\tpublic getInnerThrowables(): java.util.List;\r\n\t\tpublic printStackTrace(): void;\r\n\t\tpublic printStackTrace(param0: java.io.PrintWriter): void;\r\n\t\tpublic printStackTrace(param0: java.io.PrintStream): void;\r\n\t\tpublic printStackTrace(): void;\r\n\t\tpublic printStackTrace(param0: java.io.PrintStream): void;\r\n\t\tpublic printStackTrace(param0: java.io.PrintWriter): void;\r\n\t\tpublic getErrors(): java.util.List;\r\n\t\tpublic getCauses(): native.Array<java.lang.Throwable>;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./java.lang.Runnable.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.Executor.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.ExecutorService.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.ThreadFactory.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.ThreadPoolExecutor.d.ts\" />\r\ndeclare module bolts {\r\n\texport class AndroidExecutors exports java.lang.Object {\r\n\t\tpublic static newCachedThreadPool(): java.util.concurrent.ExecutorService;\r\n\t\tpublic static newCachedThreadPool(param0: java.util.concurrent.ThreadFactory): java.util.concurrent.ExecutorService;\r\n\t\tpublic static allowCoreThreadTimeout(param0: java.util.concurrent.ThreadPoolExecutor, param1: boolean): void;\r\n\t\tpublic static uiThread(): java.util.concurrent.Executor;\r\n\t}\r\n\texport module AndroidExecutors {\r\n\t\texport class UIThreadExecutor exports java.lang.Object {\r\n\t\t\tpublic execute(param0: java.lang.Runnable): void;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./java.lang.Runnable.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.ExecutorService.d.ts\" />\r\ndeclare module bolts {\r\n\texport class BoltsExecutors exports java.lang.Object {\r\n\t\tpublic static background(): java.util.concurrent.ExecutorService;\r\n\t}\r\n\texport module BoltsExecutors {\r\n\t\texport class ImmediateExecutor exports java.lang.Object {\r\n\t\t\tpublic execute(param0: java.lang.Runnable): void;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.CancellationTokenRegistration.d.ts\" />\r\n/// <reference path=\"./java.lang.Runnable.d.ts\" />\r\ndeclare module bolts {\r\n\texport class CancellationToken exports java.lang.Object {\r\n\t\tpublic isCancellationRequested(): boolean;\r\n\t\tpublic register(param0: java.lang.Runnable): bolts.CancellationTokenRegistration;\r\n\t\tpublic throwIfCancellationRequested(): void;\r\n\t\tpublic toString(): string;\r\n\t}\r\n}\r\n\r\ndeclare module bolts {\r\n\texport class CancellationTokenRegistration exports java.lang.Object {\r\n\t\tpublic close(): void;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.CancellationToken.d.ts\" />\r\ndeclare module bolts {\r\n\texport class CancellationTokenSource exports java.lang.Object {\r\n\t\tpublic constructor();\r\n\t\tpublic isCancellationRequested(): boolean;\r\n\t\tpublic getToken(): bolts.CancellationToken;\r\n\t\tpublic cancel(): void;\r\n\t\tpublic cancelAfter(param0: number): void;\r\n\t\tpublic close(): void;\r\n\t\tpublic toString(): string;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./java.lang.Object.d.ts\" />\r\ndeclare module bolts {\r\n\texport class Capture exports java.lang.Object {\r\n\t\tpublic constructor();\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: java.lang.Object);\r\n\t\tpublic get(): java.lang.Object;\r\n\t\tpublic set(param0: java.lang.Object): void;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.Task.d.ts\" />\r\n/// <reference path=\"./java.lang.Object.d.ts\" />\r\ndeclare module bolts {\r\n\texport class Continuation exports java.lang.Object {\r\n\t\tpublic then(param0: bolts.Task): java.lang.Object;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./java.lang.Exception.d.ts\" />\r\n/// <reference path=\"./java.lang.String.d.ts\" />\r\n/// <reference path=\"./java.lang.Throwable.d.ts\" />\r\ndeclare module bolts {\r\n\texport class ExecutorException exports java.lang.RuntimeException {\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: string);\r\n\t\tpublic constructor(param0: string, param1: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Exception);\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.CancellationToken.d.ts\" />\r\n/// <reference path=\"./bolts.Continuation.d.ts\" />\r\n/// <reference path=\"./bolts.Task.d.ts\" />\r\n/// <reference path=\"./bolts.UnobservedTaskException.d.ts\" />\r\n/// <reference path=\"./java.lang.Exception.d.ts\" />\r\n/// <reference path=\"./java.lang.Object.d.ts\" />\r\n/// <reference path=\"./java.util.Collection.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.Callable.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.Executor.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.ExecutorService.d.ts\" />\r\n/// <reference path=\"./java.util.concurrent.TimeUnit.d.ts\" />\r\ndeclare module bolts {\r\n\texport class Task exports java.lang.Object {\r\n\t\tpublic static getUnobservedExceptionHandler(): bolts.Task.UnobservedExceptionHandler;\r\n\t\tpublic static setUnobservedExceptionHandler(param0: bolts.Task.UnobservedExceptionHandler): void;\r\n\t\tpublic static create(): bolts.Task.TaskCompletionSource;\r\n\t\tpublic isCompleted(): boolean;\r\n\t\tpublic isCancelled(): boolean;\r\n\t\tpublic isFaulted(): boolean;\r\n\t\tpublic getResult(): java.lang.Object;\r\n\t\tpublic getError(): java.lang.Exception;\r\n\t\tpublic waitForCompletion(): void;\r\n\t\tpublic waitForCompletion(param0: number, param1: java.util.concurrent.TimeUnit): boolean;\r\n\t\tpublic static forResult(param0: java.lang.Object): bolts.Task;\r\n\t\tpublic static forError(param0: java.lang.Exception): bolts.Task;\r\n\t\tpublic static cancelled(): bolts.Task;\r\n\t\tpublic static delay(param0: number): bolts.Task;\r\n\t\tpublic static delay(param0: number, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic cast(): bolts.Task;\r\n\t\tpublic makeVoid(): bolts.Task;\r\n\t\tpublic static callInBackground(param0: java.util.concurrent.Callable): bolts.Task;\r\n\t\tpublic static callInBackground(param0: java.util.concurrent.Callable, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic static call(param0: java.util.concurrent.Callable, param1: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic static call(param0: java.util.concurrent.Callable, param1: java.util.concurrent.Executor, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic static call(param0: java.util.concurrent.Callable): bolts.Task;\r\n\t\tpublic static call(param0: java.util.concurrent.Callable, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic static whenAnyResult(param0: java.util.Collection): bolts.Task;\r\n\t\tpublic static whenAny(param0: java.util.Collection): bolts.Task;\r\n\t\tpublic static whenAllResult(param0: java.util.Collection): bolts.Task;\r\n\t\tpublic static whenAll(param0: java.util.Collection): bolts.Task;\r\n\t\tpublic continueWhile(param0: java.util.concurrent.Callable, param1: bolts.Continuation): bolts.Task;\r\n\t\tpublic continueWhile(param0: java.util.concurrent.Callable, param1: bolts.Continuation, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic continueWhile(param0: java.util.concurrent.Callable, param1: bolts.Continuation, param2: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic continueWhile(param0: java.util.concurrent.Callable, param1: bolts.Continuation, param2: java.util.concurrent.Executor, param3: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic continueWith(param0: bolts.Continuation, param1: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic continueWith(param0: bolts.Continuation, param1: java.util.concurrent.Executor, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic continueWith(param0: bolts.Continuation): bolts.Task;\r\n\t\tpublic continueWith(param0: bolts.Continuation, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic continueWithTask(param0: bolts.Continuation, param1: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic continueWithTask(param0: bolts.Continuation, param1: java.util.concurrent.Executor, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic continueWithTask(param0: bolts.Continuation): bolts.Task;\r\n\t\tpublic continueWithTask(param0: bolts.Continuation, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic onSuccess(param0: bolts.Continuation, param1: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic onSuccess(param0: bolts.Continuation, param1: java.util.concurrent.Executor, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic onSuccess(param0: bolts.Continuation): bolts.Task;\r\n\t\tpublic onSuccess(param0: bolts.Continuation, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic onSuccessTask(param0: bolts.Continuation, param1: java.util.concurrent.Executor): bolts.Task;\r\n\t\tpublic onSuccessTask(param0: bolts.Continuation, param1: java.util.concurrent.Executor, param2: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic onSuccessTask(param0: bolts.Continuation): bolts.Task;\r\n\t\tpublic onSuccessTask(param0: bolts.Continuation, param1: bolts.CancellationToken): bolts.Task;\r\n\t\tpublic static BACKGROUND_EXECUTOR: java.util.concurrent.ExecutorService;\r\n\t\tpublic static UI_THREAD_EXECUTOR: java.util.concurrent.Executor;\r\n\t}\r\n\texport module Task {\r\n\t\texport class TaskCompletionSource exports bolts.TaskCompletionSource {\r\n\t\t}\r\n\t\texport class UnobservedExceptionHandler exports java.lang.Object {\r\n\t\t\tpublic unobservedException(param0: bolts.Task, param1: bolts.UnobservedTaskException): void;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.Task.d.ts\" />\r\n/// <reference path=\"./java.lang.Exception.d.ts\" />\r\n/// <reference path=\"./java.lang.Object.d.ts\" />\r\ndeclare module bolts {\r\n\texport class TaskCompletionSource exports java.lang.Object {\r\n\t\tpublic constructor();\r\n\t\tpublic getTask(): bolts.Task;\r\n\t\tpublic trySetCancelled(): boolean;\r\n\t\tpublic trySetResult(param0: java.lang.Object): boolean;\r\n\t\tpublic trySetError(param0: java.lang.Exception): boolean;\r\n\t\tpublic setCancelled(): void;\r\n\t\tpublic setResult(param0: java.lang.Object): void;\r\n\t\tpublic setError(param0: java.lang.Exception): void;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./bolts.Task.d.ts\" />\r\ndeclare module bolts {\r\n\texport class UnobservedErrorNotifier exports java.lang.Object {\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: bolts.Task);\r\n\t\tpublic finalize(): void;\r\n\t\tpublic setObserved(): void;\r\n\t}\r\n}\r\n\r\n/// <reference path=\"./java.lang.String.d.ts\" />\r\n/// <reference path=\"./java.lang.Throwable.d.ts\" />\r\ndeclare module bolts {\r\n\texport class UnobservedTaskException exports java.lang.RuntimeException {\r\n\t\tpublic constructor();\r\n\t\tpublic constructor(param0: string);\r\n\t\tpublic constructor(param0: string, param1: java.lang.Throwable);\r\n\t\tpublic constructor(param0: java.lang.Throwable);\r\n\t}\r\n}\r\n```\r\n\r\nI'm following the [README.md](https://github.com/BoltsFramework/Bolts-Android/blob/master/README.md) in an attempt to create a Task on a background thread. In the part on [creating-async-methods](https://github.com/BoltsFramework/Bolts-Android/blob/master/README.md#creating-async-methods), what class is the `new GetCallback()` method in?\r\n\r\nMy basic Task looks like this:\r\n```Typescript\r\ndoSomethingAsync() {\r\n\treturn bolts.Task.call(new bolts.Continuation(class {\r\n\t\tdone(t) {\r\n\t\t\tconsole.dump(t);\r\n\t\t\treturn t\r\n\t\t}\r\n\t}), bolts.Task.BACKGROUND_EXECUTOR)\r\n}\r\n```\r\nBut I get an error, `could not resolve method bolts.Task.call`.\r\n\r\n> Does anyone have an experience with TypeScript that can point me in the right direction?"}}
{"actor":{"display_login":"roblav96"}}