Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

kotlin android intent pass data

//Send value from HomeActivity

val intent = Intent(this@HomeActivity,ProfileActivity::class.java)
intent.putExtra("Username","John Doe")
startActivity(intent)

//Get values in ProfileActivity

val profileName=intent.getStringExtra("Username")
Comment

PREVIOUS NEXT
Code Example
Java :: localdate to timestamp in java 
Java :: android elevation not working 
Java :: why java is popular 
Java :: how to set landscape in android studio 
Java :: error: package androidx.multidex does not exist 
Java :: how to get the dimensions of a 2d array in java 
Java :: How to generate all subsets of a given set in Java? 
Java :: add value with n variable with Arraylist in java 
Java :: containskey java complexity 
Java :: how to add java_home in mac 
Java :: list java initialize 
Java :: convert hashset to array 
Java :: org.mockito.exceptions.misusing.WrongTypeOfReturnValue 
Java :: java instant to localdatetime 
Java :: get value textfield java 
Java :: How to create a disjoint-set data structure, in Java? 
Java :: how to sort a list of integers in java 
Java :: get time stamp java 
Java :: how to the text of an element in selenium java 
Java :: Private properties in JavaScript ES6 classes 
Java :: difference between java and javax 
Java :: char equals java 
Java :: Display double in decimal places java 
Java :: java cheat sheet 
Java :: java filedialog 
Java :: java factorial loop 
Java :: setbounds in java 
Java :: java string to double 
Java :: open file java 
Java :: get random string from array list 
ADD CONTENT
Topic
Content
Source link
Name
4+8 =