Suppose that there are two activities in an application named FirstActivity and SecondActivity. You want to send website name from ActivityOne to ActivityTwo. What code you will write? Suppose that website name is “CareerRide.com”
A) Intent intent=new Intent (this, SecondActivity.class);
intent.putExtra("name", “CareerRide.com”);
startActivity(intent);
B) Intent intent=new Intent (this, SecondActivity.class);
intent.putExtra( “CareerRide.com”);
startActivity(intent);
C) Intent intent=new Intent ();
intent.putExtra("name", “CareerRide.com”);
startActivity(intent);
D) None of the above.
Answer: A
Learn More :
Android
- What is fundamental building blocks / components of Android ?
- In Android, the___ method of ___ class to return the full path to external storage.
- How do you declare 4 components (Activity, Service, BroadcastReceiver, ContentProvider) of android in mainfestfile?
- What is not a service?
- If the user leaves a task for long time
- What is a Fragment?
- __________ are the interactive components in your app's user interface.
- What is broadcast receiver?
- What are the inputs to the onReceive() method of a broadcast receiver?
- What class do you have to inherit from to be a broadcast receiver?
- What method is used to send a broadcast event?
- What year was the first Google I/O held?
- Who made the first Nexus tablet?
- What is the name of Google's efforts to make Android run at 60FPS?
- What was the first version to be updated with multitouch gestures like pinch zoom?
- Where did Andy Rubin work before founding Android Inc?
- What movie inspired the design of Honeycomb?
- What company built the first Nexus device?
- What chat protocols did Android 1.0 support?
- What was Android's first packed-in music store?
- What was the first Android version to have turn-by-turn GPS navigation?
- What was the first Android version to ship with Google Now?
- What's the acronym for Android's future (post-Dalvik) runtime?
- Who developed the Android 2.1 gallery?
- What version of Android is codenamed "Jelly Bean"?