Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Pass reference between two activities

Pass reference between two activities

Put your problem here if it does not fit any of the other categories.

Pass reference between two activities

Postby john_attend » Fri May 28, 2010 9:54 am

Hi everybody! :-)

I am facing a matter coding my Android application which I have not been able to find its "proper" solution.

I would like to transfer an object to another Activity which has been launched by an Intent. I know that I can use the Bundle to do it using putString etc.

To transfer a custom object, I could use putSerializable or putParcelable...
But the problem is that those methods create a copy of the objects, and what I would like is to get THE object (so passing by reference).

Is there any other way (than create a static class with a reference to the object) to do that ?

Thanks in advance ;-)
john_attend
Freshman
Freshman
 
Posts: 4
Joined: Fri May 28, 2010 9:43 am

Top

Re: Pass reference between two activities

Postby the_alien » Fri May 28, 2010 12:57 pm

Afaik you can't put in a reference. Itents can be used to call activities in other processes. In order to do so they have to serialize the objects.
Last edited by the_alien on Fri May 28, 2010 3:28 pm, edited 1 time in total.
the_alien
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed May 19, 2010 11:53 am

Re: Pass reference between two activities

Postby anarche » Fri May 28, 2010 2:00 pm

As above afaik you cannot do this.

It was also seem to be a security hole if you could, since you could write an app that - in the background - opens the google browser and inserts a malware object..
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Pass reference between two activities

Postby john_attend » Tue Jun 01, 2010 2:16 pm

That's what I thought, unfortunately... :-\
Thank you ! :)
john_attend
Freshman
Freshman
 
Posts: 4
Joined: Fri May 28, 2010 9:43 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 20 guests