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 ?

10x!

--



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)
 http://commonsware.com  |  http://twitter.com/commonsguy 

Android 2.0 Programming Books:  http://commonsware.com/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:

 http://developer.android.com/reference/android/content/Intent.html #ACTION_SHUTDOWN

< http://developer.android.com/reference/android/content/Intent.html #ACTION_SHUTDOWN>But
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 = in.read();
                        StringBuilder build = new StringBuilder();
                        while (c != -1) {
                                build.append((char) c);
                                c = in.read();
                        }
                        toreturn = build.toString();
                } catch (MalformedURLException e) {
                        e.printStackTrace();
                } catch (IOException e) {
                        e.printStackTrace();
                }
                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://git.omapzoom.org/repo/android/platform/omapmanifest.git
#repo sync
# export ANDROID_JAVA_HOME=$JAVA_HOME
# cd ~/mydroid
#cp vendor/ti/ldp1/buildspec.mk.default buildspec.mk
# make -j2
build/core/main.mk:458: *** No TARGET_CPU_ABI defined by board config: Stop

any idea?

best regards,
Aldyth M

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

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