Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

start activity for result deprecate

var resultLauncher = registerForActivityResult(StartActivityForResult()) { result ->
    if (result.resultCode == Activity.RESULT_OK) {
        // There are no request codes
        val data: Intent? = result.data
        doSomeOperations()
    }
}

fun openSomeActivityForResult() {
    val intent = Intent(this, SomeActivity::class.java)
    resultLauncher.launch(intent)
}
Comment

PREVIOUS NEXT
Code Example
Java :: java switch case 
Java :: fill two dimensional array column by column java 
Java :: java create empty arraylist 
Java :: export java_home linux 
Java :: empty set java 
Java :: Java Creating a Vector 
Java :: factors 
Java :: public static void main vs static public void main 
Java :: java get first day of the week 
Java :: How to convert long to string android studio - java 
Java :: java base64 
Java :: spigot dispatchcommand 
Java :: how to update java on windows 10 
Java :: sorting in java 
Java :: java long to double 
Java :: java files 
Java :: queue in java 
Java :: gradle could not determine java versionAdd Answer 
Java :: close keyboard android 
Java :: java repository sql find not in list 
Java :: map initialization java 
Java :: hollow pyramid star pattern in java 
Java :: how to use arrays java 
Java :: json array to list in java 
Java :: java datatypes 
Java :: java set value of arraylist 
Java :: arraylist to linkedlist java 
Java :: hash table implementation java 
Java :: java to the power of 
Java :: keytool error: java.lang.Exception: Key pair not generated, alias <demo already exists 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =