On Sat, Aug 14, 2010 at 3:41 PM, Sebastián Treu <[email protected]>wrote:

> If you want just play dirty, maybe there's a way to catch the "home" button
> press (I don't know if possible) event.
>

It's not.

On Sat, Aug 14, 2010 at 4:04 PM, viktor <[email protected]> wrote:

> It is need investigate your thing that activity which in background can be
> killed. Activity1---Activity2--Activity3. I think that Activity1 never will
> be killed.
>
If we have low memory, another application process will be killed but
> not active application.
>

You think wrong. Android will kill your inactive Activities if it has to.
When you press back from a foreground Activity, the one that was below it
will be re-created.

On Sat, Aug 14, 2010 at 3:47 PM, viktor <[email protected]> wrote:

> At the First that is rule from customers.
>

Tell them it isn't possible.


> At the second my method call many other processes, it call if main activity
> is started and ..... (I want implement it when app is returns to the
> foreground). If I call it when new activity  or previous appear, I thing
> Application will be crashed.
>

What processes? You think doing this will crash the app? Then you should fix
the issue that might crash your app, not try to work around it with some
hack.


> Is it possible to do that by getting current device activity state?
>

No.

On Sat, Aug 14, 2010 at 4:31 PM, Sebastián Treu <[email protected]>
 wrote:

> When saving the state you save a
> homeKeyWasPressed value. You have KeyEvent.KEYCODE_HOME that I
> supposed is the home key:
>
> http://d.android.com/reference/android/view/KeyEvent.html#KEYCODE_HOME
>
> Then, you manage your homeKeyWasPressed state, and you save it and
> restore it with the methods mentioned above.
>

No, apps do not get the Home key event.

On Sat, Aug 14, 2010 at 4:13 PM, viktor <[email protected]> wrote:

> Application doest crashes (http requests always getting data, it is not
> good), I don't want always call it when activity is Resuming
>

Why not? What are you doing in this "update" method that is so dependent on
how you get back to your Activity?

Again, IT SHOULD NOT MATTER how you're getting to your application, home or
otherwise. And you're thinking about either coming from Home or coming from
your Activity, but what about coming from another App's Activity? That's a
possibility as well.

I think you're trying to work around an issue with this when you should be
trying to solve your underlying problem. Until you clearly explain WHY
you're doing this and WHAT you're doing in this update method, we won't be
able to help you.

-------------------------------------------------------------------------------------------------
TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to