Herramientas de usuario

Herramientas del sitio


fw:android1

¡Esta es una revisión vieja del documento!


Android (new)

Beginning

Instalation

Tools

LogCat

It's the Android main logs viewer. To use it you only need to import the android.util.Log class and call it:

  • Log.i(ID, MSG), produces an INFO message.
  • Log.d(ID, MSG), produces a DEBUG message.
  • Log.e(ID, MSG), produces an ERROR message.
  • Log.v(ID, MSG), produces a VERBOSE message.

Communication with the emulator

Url for the device is localhost accessed with the port specified on the window title of the emulator.

To access from other emulator, this number will act as the phone number (p.ex. to send SMS).

If the number on the window title was 5554, then the command to connect by telnet to the emulator would be:

$ telnet 127.0.0.1 5554

I could emulate an SMS from 5556 number using the command:

sms send 5556 "hi!"

Other commands to configure the emulator could be:

  • network speed edge
  • network speed full
  • power status not-charging
  • geo fix 0.00 0.40

DDMS

It's accessed from Eclipse as another perspective. It has several sub-applications which could be useful…

  • Dumb view hierarchy to UI auotomator. It obtains the UI structure from the currently loaded program.
  • Heap view. Where you can monitor the used resources from an application.
    • Update heap button will let you view the current heap consumption.
    • In heap tab, cause gc button will let you view more details about created objects.
    • Start and stop method profiling buttons will show more detailed views about inner methods inside the code.

Notes

Other capabilities

Multilanguage applications

You only need to add another resource folder which name ends with the country code target. P.ex, for spanish it would be: values-es.

fw/android1.1390996675.txt.gz · Última modificación: 2020/05/09 09:24 (editor externo)