cliff2310
cliff2310

Reputation: 590

How can I send data to a new activity?

I need to start a new activity, after the user clicks on a list item. The new activity needs to know what the user wants. It needs to get two pieces of data. First is a class object and the other is a String[][]. Can I somehow insert this data in the Intent or the Content? If so how or what other method may I use?

OK there is the bundle extras, but I still can't put what I want in there without a lot of extra processing.

Upvotes: 0

Views: 85

Answers (1)

cliff2310
cliff2310

Reputation: 590

After a lot of digging, I think the best answer is a Singleton. A web search will give you the particulars about it. it basically is a class with a single instance. Once you put that data in it, you can access it with
Class Lib = Class.getInstance();
The methods of the class can give you the data.
Cliff

Upvotes: 1

Related Questions