Questions tagged [asynccallback]

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

A callback is a piece of executable code that is passed as an argument to other code, which is expected to call back (execute) the argument at some convenient time. An asynchronous or deferred callback is invoked after a function returns, or at least on another thread’s stack.

More Info

457 questions
0
votes
1 answer

How to write your own Get / Request function with serial port data?

I have a class that talks to a serial port and I want to mimic a Get function. The problem is, the serial port feeds in raw data which may or may not come. It also has to be processed and parsed. For example, if I want to get a Person object, the…
Tong
  • 697
  • 1
  • 8
  • 16
0
votes
0 answers

Implement Async or Fix with Callbacks

I am working on making my first NodeJS based Alexa skill and I ran into some asynchronous errors where the first run returns undefined and the second run outputs the call made in the first run. I looked into it and saw that properly fixing callbacks…
0
votes
0 answers

Bot's custom intent recognizer callback issue (Error: Callback was already called)

I implemented following custom recognizer for my bot. I followed this example where recognize method accepts context object as 1 param and callback as 2nd param. I am seeing an error which says 'Error: Callback was already called' I am sure its…
0
votes
4 answers

Using a callback parameter to get the value in the Anonymous Function

I came across the following code for a callback function. I understand the code, but I can't wrap my head around it. It just seems so counterintuitive. function greet(name,callback1){ callback1(name) } greet("John Cena", function…
pi2018
  • 347
  • 2
  • 11
0
votes
3 answers

How the parameters of callback function work in javascript nodejs

When we call an asynchronous function if we can pass a callback function with parameters. I am unable to understand that do I need to memorize the order of the parameter in the call back function. e.g in express app.get('/',function(req,res)) How…
ShIvam Rawat
  • 51
  • 1
  • 8
0
votes
1 answer

What am i doing wrong with my async call?

I have this bit of code: public static void main(String[] args) throws UnirestException { ArrayList listStock = getAllAvailableStocks("https://api.iextrading.com/1.0/ref-data/symbols"); //doing more actions after the one…
totothegreat
  • 1,633
  • 4
  • 27
  • 59
0
votes
1 answer

How does a Mongoose callback function know what the second parameter is the db.query result?

How does the anonymous callback function know that 'item' (or really the second argument in the following callback function after Mongoose queries since they can be called anything) in the below example is/are supposed to be the result(s) from the…
JohnAllen
  • 7,317
  • 9
  • 41
  • 65
0
votes
1 answer

Android Volley callback after multiple request completes

I have made a splash screen where im syncing data from server to sqlite. I have to make few requests (lets say 5 request for 5 tables), and then the splash screen goes off and main activity starts. Please share some ideas as Im clueless how to…
Rakesh
  • 31
  • 4
0
votes
1 answer

Kotlin - Avoid nested callbacks when fetching multiple JSON files with ION

I have some code that 1] fetches a JSON file and 2] depending on the content of that JSON file, fetches another JSON file. It uses the ion library. The code roughly looks like this (Sidenote - this code is on the onCreate method of my activity and e…
Foobar
  • 7,458
  • 16
  • 81
  • 161
0
votes
0 answers

Eclipse AsyncCallback failed

I'm new at this place, please excuse me if this question is a random question :) So my problem is I Installed: Eclipse Oxygen Google Cloud Platform / App AppEngine MySqlConnector is in place Evertime when I start my programm with right click ->…
0
votes
1 answer

Node JS Mongoose Async Callbacks

I've got this piece of code that I seem to be getting in a bit of a muddle with. What it does is create users. Now, if a user has a company, then that company should be created along with the user and linked accordingly. If the company already…
NiceYellowEgg
  • 552
  • 1
  • 5
  • 13
0
votes
0 answers

AngularJS .then() function is not returning data after getting successful response

I am working on AngularJS 1.6.9 JSONP . My api endpoint gives projectInstance.jsonpCallback function as a response. Inside factory method i had created same callback function and i got the response. But after getting successful response its directly…
0
votes
0 answers

Can't get the original MailMessage from SendMailAsync callback

I am using SmtpClient in ASP.NET C# for sending emails asynchronously. I need the original MailMessage in SendCompleted callback in order to log the subject to a database. But e.UserState is null. public class SendMessage { public async Task…
H. Asgari
  • 1
  • 1
  • 3
0
votes
0 answers

How to register/make a Callback function to inform all Fragments an action has been taken?

I have a class singleton to make a auth on web service, in each fragment I need load data from web, so I need know if service has logged or not, in MainActivity I call the login function, but the fragments load together, so the webservice not loggin…
Augusto
  • 3,825
  • 9
  • 45
  • 93
0
votes
0 answers

How to make a Callback function for webservice in Java?

I'm using a Odoo service to get my data of web. In main class I have a method to read a data: public void OdooRead() { OdooService.getCustomers(odoo, "myCallbackFunction"); } So, I did create a other class to make this service: public class…
Augusto
  • 3,825
  • 9
  • 45
  • 93