Advertisements

Aatul Palandurkar

Posts Tagged ‘Android Application Development Training

Objective :

  • Passing data between activities in Android
  • Passing multiple data between activities in Android
  • Passing array between activities in Android
  • Passing ArrayList between activities in Android
  • Passing ArrayList to another activity in Android
  • Sending data via Intent in Android
  • Sending multiple data via Intent in Android
  • Sending array between activities in Android
  • Sending ArrayList between activities in Android
  • Sending ArrayList to another activity in Android
  • Sending data via Intent and Bundle in Android
  • Sending multiple data via Intent and Bundle in Android
  • Passing array between activities in Android using Intent and Bundle
  • How to pass array to another activity in Android?
  • How to pass array between activities in Android?
  • How to pass data to another activity in Android?
  • How to pass data to activity in Android?
  • How to pass data to between activities in Android?
  • How to pass ArrayList to another activity in Android?
  • How to pass ArrayList between activities in Android?

 

Code for passing data between activities in Android :

ActivityOne.java


String value = "Hello!";
Intent in = new Intent(this,ActivityTwo.class);
in = putExtra("Key", value);
startActivity(in);

ActivityTwo.java


Bundle bundle = getIntent().getExtras();
String valueReceived = bundle .getString("Key");

 

Code for passing multiple data or values between activities in Android :

Method 1 : Using Intent to pass data and Bundle to extract data between activities in Android

ActivityOne.java


String value1 = "Hello!";
String value2 = "Hi!";
Intent in = new Intent(this,ActivityTwo.class); 
in = putExtra("Key1", value1); startActivity(in); 
in = putExtra("Key2", value2); startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");

 

Method 2 : Using Bundle to pass and to extract data between activities in Android

ActivityOne.java


String value1 = "Hello!";
String value2 = "Hi!";
Intent in = new Intent(this,ActivityTwo.class); 
Bundle bundle = new Bundle();
bundle.putString("Key1", value1);
bundle.putString("Key2", value2);
in = putExtras(bundle); 
startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");

 

Code for passing array between activities in Android :

ActivityOne.java

String[] array = new String[]{"Item1", "Item2", "item3", "Item4", "item5"};
Intent in = new Intent(this,ActivityTwo.class); 
Bundle bundle = new Bundle();
bundle.putStringArray("MyArray", array);
in = putExtras(bundle); 
startActivity(in); 

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
String arrayReceived[] = bundle.getStringArray("MyArray");

 

Code for passing ArrayList between activities in Android :

ActivityOne.java

ArrayList<String> array = new ArrayList<String>();
array.add("Hello");
array.add("Hi");
array.add("Bye");
Intent intent = new Intent(this, ActivityTwo.class);
intent.putExtra("array_list", array);
startActivity(intent);

ActivityTwo.java

Bundle bundle = getIntent().getExtras();
ArrayList<String> array = (ArrayList<String>) bundle.getStringArrayList("array_list");

		
Advertisements
Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Conducted 2 days Android Workshop at Dr. Ambedkar College of Engineering & Research from 2 Mar 2013 to 3 March 2013, daily 9 am to 5 pm. The workshop was organized in association with the ADCC Academy, Nagpur under the Entrepreneurial Development Program (EDP).

Conducted 3 days Android Workshop at Rajiv Gandhi College of Engineering & Research (formerly known as NYSS College), Nagpur from 25 Feb 2013 to 27 Feb 2013. The workshop was organized in association with the ADCC Academy, Nagpur under the Entrepreneurial Development Program (EDP).

The students who participated in this workshop had a great fun & learned a lot as per their feedback after the workshop, now the college have organized the Android Application Development Contest on 6th March 2013 and I am going to be the Judge for the event, lets see how students can develop Android Applications and what innovations they can come up with?

FLAMES

FLAMES

I have developed the well known game FLAMES (Friend – Love – Affection – Marriage – Enemy – Sibling) on Android & J2ME Platforms, have a look at the Android version of the FLAMES, very soon it will be available with Google Play to download for free of cost.

FLAMES allows you to check out the relationship between two people just by entering their names & single click on “?” button.

Download FLAMES from Google Play for free now.

If you like FLAMES, like Facebook Page of FLAMES.

Checkout Video to know how FLAMES works :

Download & have great fun while checking relations on the go.

Delivered Seminar on Android at Lt. Vasantdada Polytechnic, Nagpur between 11 AM to 1 PM on 8th Sept. 2012. It was a great experience to deliver seminar in my own college.


Advertisements

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 8,305 other followers

Tweets

%d bloggers like this: