Skip to main content

All Questions

Tagged with
0 votes
2 answers
65 views

How can a Callable return a value from a predefined void callback?

I am using a data-related API interface which has a key void callback function that is automatically invoked to mark the end of some IO operations. I want to make the class Callable<String> and ...
limestreetlab's user avatar
-2 votes
0 answers
57 views

Can callback to an incompletely constructed Java object be well-defined?

If a constructor of a class T passes this to as an argument to some method foo, and foo immediately performs a callback to the T object (which has not yet finished executing its constructor), things ...
njlarsson's user avatar
  • 2,256
2 votes
1 answer
79 views

Java - Use null comparison or instanceof?

Below is a Java class constructor which accepts a callback for error handling. null should be an acceptable value, and if the passed value is null then skip error handling. I have two ways of checking ...
carrj-nm's user avatar
0 votes
1 answer
37 views

linked hashmap get the first inserted

I have this LinkedHashMap which keep the order of the K-V pairs on the insertion order. Map<Integer, String> map = new LinkedHashMap<>(); for (int i = 0; i < 1000000; i++) { if (i =...
C.Unbay's user avatar
  • 2,787
0 votes
0 answers
51 views

TelephonyCallback.CallStateListener with LiveData and ViewModel

I'm new to both android and java, now im trying to update a textview with the state of the call, but the view model doesn't get the value from the telephony callback class. Im using post value since ...
bruno's user avatar
  • 1
0 votes
1 answer
22 views

How to get variable from GWT Callback

I'm trying to get a state of a server variable using a callback. Obviously, the state is always false. How can I get the state from the server? Or another question, which options do I have to get ...
NorrtT's user avatar
  • 25
0 votes
0 answers
100 views

How can I use APISetu to get documents from DigiLocker

I am trying to integrate DigiLocker APISs into my program. I am confused about lots of things, I need stepwise details to use DigiLocker to perform the following tasks: First open DigiLocker page for ...
The_phoenix's user avatar
0 votes
1 answer
51 views

Java - receive a method that takes any number/type of parameters as method parameter

I'm implementing a Console Menu class in Java, roughly it looks like this: public class ConsoleMenu { private Scanner s = new Scanner(System.in); private ArrayList<String> menuItems = ...
YoavKlein's user avatar
  • 2,413
0 votes
1 answer
81 views

Calling functions from WebView to JS

In the java code(container) i have to get some values by calling some javascript functions, for this im using webView.evaluateJavascript, the problem is that i get the callback only when all the code ...
Gabriel Palmeri's user avatar
0 votes
1 answer
2k views

onBackPressed is deprecated - webView in android app

I have an app where the main activity (which extends ComponentActivity) is pretty much just a webView. I have overriden onBackPressed, shown below. @Override public void onBackPressed(){ if(this....
yeswhatdoyouwant's user avatar
1 vote
1 answer
93 views

Make a callback with JAVA RMI

I am currently implementing a kind of bag of tasks using Java RMI. The goal is for a "Client" to submit "Task" objects to a "Server," and on the other hand, I have "...
nicolasCDT's user avatar
0 votes
1 answer
43 views

What thread should callbacks occur on in Java?

I'm developing a Java library that runs a scheduled task in a ScheduledExecutorService. If the user specifies callback(s), then after that task, those callback(s) will be invoked. Right now I just ...
leros's user avatar
  • 538
4 votes
0 answers
31 views

Register a callback to handle JLI_Launch failing with "Could not find or load main class"

I am trying to make AppBundler more observable and have had great success except for one thing. JLI_Launch does not return to the caller so I can't tell if it fails to load the main class (or any ...
Jeff Holt's user avatar
  • 3,190
0 votes
0 answers
46 views

Can we send back data from App to Chrome in previous opened Tab?

I have made a payment app in Java Kotlin. My requirement is that a webpage can call my app for payment then after successful payment I can response back that webpage with transaction ID. From web page,...
Smiley Sharma's user avatar

15 30 50 per page
1
2 3 4 5
55