Framework support for detecting starting and stopping of activities

by Dianne Hackborn » Thu, 14 May 2009 05:53:52 GMT


Sponsored Links
 I believe the class is UsageStatsService.  "adb shell dumpsys usagestats"
will dump its current data.








-- 
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.

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



Framework support for detecting starting and stopping of activities

by Dianne Hackborn » Thu, 21 May 2009 06:03:20 GMT


  don't think we want an API for this for applications.

On Wed, May 20, 2009 at 11:28 AM, clemsongrad <dpotl...@gmail.com> wrote:



--
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


Other Threads

1. OOM after ImageView.setImage() make the phone irresponsive - how to protect?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

My app, among other things, downloads and displays images from the
Internet. Some might be too large and trigge an OOM when
ImageView.setImage() is called.

Of course, this normally makes the application to crash. I've put
catch (OutOfMemoryError e) around the method invocation. I know that
catching errors is unusual, but in JSE applications it proved to work
pretty good, especially when the problem was due to image manipulation
that consumed all the memory. The Android app seemed to survive for a
while, but then it blocked the computer. All buttons are irresponsive,
even though the phone seems still alive (e.g. it's playing the audio
notification that new email has been spotted). I tried holding the
power button, it triggered the shut down menu, but touching a menu
option didn't do anything. Only after a while, the phone became
responsive again.

Now, it's reasonable that one can't display everything on a
smartphone; I'm sure there's some inefficient memory management I'm
doing (perhaps keeping too many images in memory); ok, I have to
improve my code. Given that I'll do, how can I add some safety
facility to avoid the most severe consequences? Making an irresponsive
application it's a 100% sure way to make people to uninstall my app
and give bad reviews.

I'm thinking of a two-pronged safety approach: 1) whether it's
possible to understand in advance whether an image is too large to be
rendered by itself; 2) whether it's possible to recover from an OOM in
any case.

Thanks.

- -- 
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
fabrizio.giud...@tidalwave.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkySa8cACgkQeDweFqgUGxd0WACgqxeDnLvof8nnry2YN6spYXy6
Ga8An0CujetPySu44VsNJsAyL+BIpz1S
=cQIf
-----END PGP SIGNATURE-----

-- 

2. speed dial

Do you know if android has speed dial, and if it does is it possible
for an aplication to change the speed dial numbers?
Well honestly i look for it and could not find anything, i just though
I should ask to make sure!

thanks

-- 
Aghi Holl
http://androidwear.com
Gear your Droid!

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

3. ioctl shell command in system bin

4. Adding a contact

5. Help with service and lifecycle

6. Touchscreen Events

7. Discover UPnP devices from my android device