Inter-Activity memory restriction and API documents

by Jack Jia » Mon, 07 Sep 2009 00:04:23 GMT


Sponsored Links
 Hi Mark,

I can give my app as an example. The app uses the camera API to catch a
bitmap and tries to pass the bitmap to the cropping activity. It worked on
the emulator but not on the real device because the inter-activity
limitation on memory. I can persist the data and pass it to the cropping
activity and pass the result back in the same way, but that will be very
slow. In the end I have to write my own cropping in the same activity. You
can see the cropping activity is not very useful (also, it is not documented
as well) because of the limitation.

If the two activities have the same signature or one of them (such as the
cropping) is a shared tool and provides only service (not data) then there
is no security concern. By "single process framework", I mean I can do
everything in my process and at the same time to use libraries and tools etc
from the SDK.

I really like Android but I hope it can improve on this.

Jack






--~--~---------~--~----~------------~-------~--~----~



Inter-Activity memory restriction and API documents

by Dianne Hackborn » Mon, 07 Sep 2009 02:22:36 GMT


 



This won't work because if you process has to get killed at some point while
in the background, there is no way for the system to restore this data to
it.

-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Inter-Activity memory restriction and API documents

by Jack Jia » Mon, 07 Sep 2009 12:20:37 GMT


 Thank you for the idea of using static data member or service. But in my
app, I want to use an activity built in Android which I cannot change, the
only way seems to be using an intent with either data or uri. Also,
sometimes, it seems too much work to create service when I just want to
share a bitmap. Since there are so many ways to use the intent with so many
flags, maybe there is a way to make it work. I haven't tried all the
different flags. I would really like to just instantiate a cropping class
and call a method with my bitmap that would ausome.

Thanks,
Jack






--~--~---------~--~----~------------~-------~--~----~