Android Workshop

Passing data between activities in Android

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

[sourcecode lang=”java”]

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

[/sourcecode]

ActivityTwo.java

[sourcecode lang=”java”]

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

[/sourcecode]

 

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

[sourcecode lang=”java”]

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

ActivityTwo.java

[sourcecode lang=”java”]
Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");
[/sourcecode]

 

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

ActivityOne.java

[sourcecode lang=”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);
[/sourcecode]

ActivityTwo.java

[sourcecode lang=”java”]
Bundle bundle = getIntent().getExtras();
String valueReceived1 = bundle .getString("Key1");
String valueReceived2 = bundle .getString("Key2");
[/sourcecode]

 

Code for passing array between activities in Android :

ActivityOne.java

[sourcecode lang=”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);
[/sourcecode]

ActivityTwo.java

[sourcecode lang=”java”]
Bundle bundle = getIntent().getExtras();
String arrayReceived[] = bundle.getStringArray("MyArray");
[/sourcecode]

 

Code for passing ArrayList between activities in Android :

ActivityOne.java

[sourcecode lang=”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);
[/sourcecode]

ActivityTwo.java

[sourcecode lang=”java”]
Bundle bundle = getIntent().getExtras();
ArrayList<String> array = (ArrayList<String>) bundle.getStringArrayList("array_list");
[/sourcecode]


Have fun with Intent.

5 Day Android Training and Internship Program

IMG-20141224-WA0011

Conducted 5 Days Training on Android, HTML5 and WordPress at Tulsiramji Gaikwad Patil College of Engineering & Technology, Nagpur from 22nd Dec. 2014 to 26th Dec. 2014

It was Training cum Internship program for students and there were more than 250 students who attended this program. We have conducted 3 parallel sessions and it was again a good experience with the students of TGPCET, Nagpur.

Android Workshop at MHSSCOE

[youtube=https://www.youtube.com/watch?v=DEOJnEYiGb4]

Conducted two days Android Workshop at M.H. Saboo Siddik College of Engineering, Byculla, Mumbai on 11th and 12th Aug 2014.

There were around 100 students who attended the workshop and get benefited out of it. Few staff member also attended the workshop.

The infrastructure of the college is very good and the seminar hall where we conducted workshop was also very good. The staff, coordinators and the student were also very good and keen to learn new technologies. I would love to visit the place again. I am very thankful to the coordinators who had assisted a lot during the training and for all the arrangements they have made for me.

Professional Android Training at SITRC

[youtube=https://www.youtube.com/watch?v=y7QVkAKByao]

Conducted 60 hours Professional Android Training at Sandip Institute of Technology and Research Center (SITRC), Nashik, Maharashtra – India.

I love to visit this college since the students of this college are very eager to learn new things. On the last day of the training students developed various android application such as;

1. Thank You (Gratitude app)
2. Encrypted SMS
3. PnC (Permutation and Combinations)
4. Guess Game (Anagram)
5. SQL Commands Tutorial App
6. Tic Tac Toe, etc.

And so many other apps were also ready.

The staff of the college is also very good specially HOD of Computer Department Mr. Amol Potgantwar and Mr. Nikhil Kulkarni who motivate students a lot.

The staff and students of this college has filed 30 patents last year and still counting.

Android and HTML5 Workshop and Internship Program

[youtube=http://youtu.be/UdJ5iZeXOgY]

Conducted Android and HTML5 Workshop at S. N. Patel Institute Of Technology & Research Centre, Bardoli, Dist. Surat (Gujrat-India). It was 6 days workshop wherein students learned Android and HTML5.

During training of 6 days covered Android and HTML5 and how easily one can develop Android apps and HTML5 games too using Canvas API.

Android & HTML5 Workshop

[youtube=https://www.youtube.com/watch?v=-NE6LY7g-Dw]

7 Days Android & HTML5 Workshop at Sandip Institute of Technology & Research Center, Nashik (SITRC) from 9th Jun. 2014 to 16th Jun. 2014.

It was an awesome experience and very good students who were keen to learn new technologies. The modern infrastructure standards are complimented with lush green lawns and trees around the campus which make the atmosphere in and around the institution a pleasant place to learn, gain and apply the knowledge. The highly efficient faculty boosts the morale of the students and makes them go a step beyond the ordinary and also harness campus placements.

The students of SITRC were so good and hard working that they developed and published an Android application for College on last day of workshop. To do so they came on Sunday too. The main thing is this workshop was organized in their summer vacations still the students showed huge interest and achieved the success.

The app is free to download and is available on Google Play Store : https://play.google.com/store/apps/details?id=com.aatul.sitrc

Download now to know more about the college and to see what students have developed just after the workshop.

Android Workshop

[youtube=https://www.youtube.com/watch?v=jrCwTpEEQc4]

Conducted 3 Days Android Workshop at Sardar Patel College, Chandrapur, Maharashtra (India) from 27th Jan. 2014 to 29th Jan. 2014.

It was good experience with the students of SP College, Chandrapur.

Architecture of Android

Objectives :

  • What is architecture of Android?
  • Explain android architecture.

This small tutorial is about architecture of Android which is essential to know if you are learning Android Application Development.

[slideshare id=17264723&doc=architectureofandroid-130316133212-phpapp02]