Passing Additional Information Using Intents

You can also include additional data in an Intent.The Extras property of an Intent is stored in a Bundle object.The Intent class also has a number of helper methods for getting and setting name/value pairs for many common datatypes.

For example, the following Intent includes two extra pieces of information—a string value and a boolean:

Intent intent = new Intent(this, MyActivity.class);

intent.putExtra("SomeStringData","Foo");

intent.putExtra("SomeBooleanData",false);

Easy Software Profits

Easy Software Profits

Here's How Anyone Can Start, Build and Run their Own Successful Software Empire Without Knowing the First Thing About Programming, Scripting Or Any 'Coder' Stuff. There is no doubt about it software sells. Software has a high percieved value and it solves problems for people.  A claim that can't always be made for PDF books, Video products and the like.

Get My Free Ebook


Post a comment