Found 1966 Articles for Apps/Applications

How to pass large data between activities in Android?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

818 Views

This example demonstrate about How to pass large data between activities in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.                 Step 3 − Add the following code to src/User.javapackage com.example.myapplication; import java.io.Serializable; public class User implements Serializable {    private String city;    private String name;    private String age;    User(String name, String age, String city) {       super();       ... Read More

How to pass multiple data from one activity to another in Android?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

3K+ Views

This example demonstrate about How to pass multiple data from one activity to another in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.             Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    EditText etName, etAge;    @Override    protected void onCreate(Bundle savedInstanceState) {       ... Read More

How to send data to previous activity in Android?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to send data to previous activity in AndroidStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.app.Activity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; public class MainActivity extends AppCompatActivity {    private final static int MY_REQUEST_CODE = 1;    TextView textView;   ... Read More

How to use shared preference in Android between activities?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

196 Views

This example demonstrate about How to use shared preference in Android between activities.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main);     ... Read More

How to pass data from one activity to another in Android using shared preferences?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to pass data from one activity to another in Android using shared preferencesStep 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);   ... Read More

How to send data from one activity to another in Android without intent?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to send data from one activity to another in Android without intent.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    private static String value;    public static String getValue() {       return value; ... Read More

How to send data from one activity to another in Android using bundle?

Nitya Raut
Updated on 30-Jul-2019 22:30:25

2K+ Views

This example demonstrate about How to send data from one activity to another in Android using bundle.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main); ... Read More

How to send data from one activity to another in Android using intent?

Vrundesha Joshi
Updated on 30-Jul-2019 22:30:25

559 Views

This example demonstrate about How to send data from one activity to another in Android using intent.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.EditText; public class MainActivity extends AppCompatActivity {    @Override    protected void onCreate(Bundle savedInstanceState) {       super.onCreate(savedInstanceState);       setContentView(R.layout.activity_main); ... Read More

How to pass values from one activity to another in Android?

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

4K+ Views

For this lesson we are only concerned with passing data between activities without making them persistent so we’ll look at the two simplest ways to achieve that which are by using Static methods and IntentsUsing Static methodsThis example demonstrate about Passing data between activities in Android using Static methods.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import ... Read More

Passing data between activities in Android

Jennifer Nicholas
Updated on 30-Jul-2019 22:30:25

641 Views

For this lesson we are only concerned with passing data between activities without making them persistent so we’ll look at the two simplest ways to achieve that which are by using Static methods and IntentsUsing Static methodsThis example demonstrate about Passing data between activities in Android using Static methods.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − Add the following code to res/layout/activity_main.xml.         Step 3 − Add the following code to src/MainActivity.javapackage com.example.myapplication; import android.content.Intent; import android.os.Bundle; import ... Read More

Advertisements