Tuesday, April 8, 2014

Codigo para BroadCast receiver Android


What is a Broadcast Receiver ?



A Broadcast Receiver is a kind of receptor events Android operating system.

Typically, a Broadcast Receiver is used to display notifications of events that occur in our mobile phone:

such as the discovery of a wifi network

battery depletion

the status of the phone ....

What events can I catch ?

some of them:

Event android.provider.Telephony.SMS_RECEIVED Event message received.

Event android.intent.action.PHONE_STATE received calls.

Event android.intent.action.AIRPLANE_MODE flight mode.

Event android.intent.action.BATTERY_LOW low battery.

Event android.intent.action.BOOT_COMPLETED start the operating system.

Event android.intent.action.SCREEN_OFF screen lock.

Event android.intent.action.SCREEN_ON unlock screen .

Event android.bluetooth.intent.action.DISCOVERY_STARTED

Event Start Event Scan Bluetooth enabled Bluetooth.android.bluetooth.intent.action.ENABLED .

Monday, April 7, 2014

Que es un servicio android?

Es una app que corre de forma automática, sin intervención del usuario. Estos pueden ser servidos web, servicios de comunicaciones, antivirus por mencionar algunos.
En android un servicio no es independiente, corren en el mismo proceso que la aplicación que los consume.

What is a Service?

What is a Service?

Most confusion about the Service class actually revolves around what it is not:
  • A Service is not a separate process. The Service object itself does not imply it is running in its own process; unless otherwise specified, it runs in the same process as the application it is part of.
  • A Service is not a thread. It is not a means itself to do work off of the main thread (to avoid Application Not Responding errors).