In that case, you could build a hub Activity that can start each of
your four Activities via startActivityForResult, then have the
Activities call setResult, passing back an identifier that the hub
Activity inspects in onActivityResult and uses to determine the next
Activity to start.
That way,
Looks like an easier way to do this might be to set android:nohistory
to true in the manifest. (http://developer.android.com/guide/topics/
manifest/activity-element.html#nohist)
On May 18, 9:10 am, blcooley blcoo...@gmail.com wrote:
In that case, you could build a hub Activity that can start
Thank you. This is very useful advise that I already verified in my
test app as working. Small problem is it seems the hub activity
flickers a bit when launching next activity from onActivityResult (it
does not flicker the first time when startActivityForResult is called
from the hub's onCreate).
nohistory does not work. The app runs out of memory.
On May 18, 12:33 pm, blcooley blcoo...@gmail.com wrote:
Looks like an easier way to do this might be to set android:nohistory
to true in the manifest. (http://developer.android.com/guide/topics/
manifest/activity-element.html#nohist)
On
On Tue, May 18, 2010 at 12:04 PM, ls02 agal...@audible.com wrote:
nohistory does not work. The app runs out of memory.
Have you looked at the singleTask flag?
-
TreKing - Chicago transit tracking
What about setting your activity's launchMode to 'singleTask' (or
'singleTop') and implementing onNewIntent()? This would cause your
current instance of your activity to be re-used.
On May 18, 1:04 pm, ls02 agal...@audible.com wrote:
nohistory does not work. The app runs out of memory.
On May
Yes, this is really what I need. Though I see that periodically my
singleTask activity contsractor and onCreate are called which means
that activity instance is probably periodically destroyed though the
activity's finalize is not called. But I tested my sample app and it
runs without running out
You could also be more proactive with releasing unneeded objects. Rather
than doing it in finalize (if that is how you do it), do object cleanup in
onPause.
18.05.2010 23:12 пользователь ls02 agal...@audible.com написал:
Yes, this is really what I need. Though I see that periodically my
I am not releasing objects in finalize. I just log all standard
methods to observe when they are called. My understanding that
singleTask activity is a singleton object that should not be destroyed
and one single instance should be reused. This does not happen.
Sometimes the activity's constructor
On May 17, 5:20 pm, ls02 agal...@audible.com wrote:
We found there are very nasty memory and resource leaks in activities
and views that we don't know how to handle. I have test app that
basically starts activity A, that immediately starts activity B and B
starts A and so forth in infinite
My understanding there is no way to start another activity reusing
existing activity instance. Both startActivity and
startActivityForResult create a new activity instance.
The sample app I describes shows very common scenario to my opinion.
An app can have several activities that can start one
There is nothing special in my sample app. It is bare born simple app
that consits of may be 50 lines of code and two classes. If you wish,
I can send you source code, you can see for yourself. Again, there is
no static or non-static members in any of the classes.
On May 17, 6:26 pm, Romain Guy
If you need information from B to be fed back to A, then start B by
calling startActivityForResult. Then, when B exits, call setResult,
and A will be on top of the Activity stack and its onActivityResult
will fire.
If you don't need information from B, then you can start B using
startActivity. A
The activity stack in my real app is not hard coded. A can start B, or
C which can start D and D can start A or B or C depending on user
selection or other flow. And this happens rather frequently. Each of
them in reality should exist in only one instance and the activity
should be shown or
14 matches
Mail list logo