Start a service on device start up.

by poohtbear » Sat, 30 Jan 2010 22:08:50 GMT

Sponsored Links
 Is there an API, or a registry i can do i nthe manifest to make sure
my service is being run at the device start up and being shut down
before the device shuts off ?



Start a service on device start up.

by Mark Murphy » Sat, 30 Jan 2010 22:35:30 GMT


Yes on the former -- listen for the BOOT_COMPLETED broadcast Intent.

No on the latter, as far as I know.

Mark Murphy (a Commons Guy)  | 

Android 2.0 Programming Books: 


Sponsored Links

Start a service on device start up.

by Dianne Hackborn » Sun, 31 Jan 2010 04:51:35 GMT

 This is sent when the system is cleanly shutting down: #ACTION_SHUTDOWN

you should never rely on receiving this intent -- it is not at all unusual
for the device to go off without any chance of this being sent (such as the
user pulling their battery, which is not uncommon).


Other Threads

1. Read a HTML file with Java methods

Hello developers,

I'm french, so I'm sorry for my english.
I would like to develope an application whose extracts some numbers
from a web site

In JAVA, I read the HTML file with this method :
public static String get(String adresse) {
                String toreturn = null;
                try {
                        URL url = new URL(adresse);
                        URLConnection uc = url.openConnection();
                        InputStream in = uc.getInputStream();
                        int c =;
                        StringBuilder build = new StringBuilder();
                        while (c != -1) {
                                build.append((char) c);
                                c =;
                        toreturn = build.toString();
                } catch (MalformedURLException e) {
                } catch (IOException e) {
                return toreturn;

But it doesn't work in ANDROID.
the method return nothing.

thanks for your help.


2. Build Android LDP Failed

Hi all,

i try to build android for omap ldp zoom1(labrador)

i'm using command like that ,

#repo init -u git://
#repo sync
# cd ~/mydroid
#cp vendor/ti/ldp1/
# make -j2
build/core/ *** No TARGET_CPU_ABI defined by board config: Stop

any idea?

best regards,
Aldyth M


3. Starting an Activity (with the dialog theme) from the onCreate() of another Activity results in a black screen.

4. android-x86 port for MID: how to enable Locale & Text setting

5. Signing apps

6. How to scroll Gallery all the way to the left?

7. Can a native application use java methods in TelephonyManager using getSystemService()