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. File created by app on sdcard can always be accessed by other apps

File created by application on sdcard can always be accessed by other
applications, is that the fact ? For example, use camera capture
pictures which will be saved to sdcard, and my application can access
it.

Tried more, I found File.createNewFile(new File(file_path)) create a
file and set its access permission accroding to different file_path,

e.g. if file_path is "/sdcard/DCIM/Camera/photo.jpg", photo.jpg is
created on sdcard, and is set read&write by all applications.
----rw-rw- system   system      16692 2009-08-21 16:25 photo.jpg

 if file_path is "/data/data/com.philip.camera/files/photo.jpg",
photo.jpg will be the private file of the application
com.philip.camera.
-rw------- app_41   app_41          0 2009-08-21 17:03 photo.jpg

it's interested that where android put the control of checking the
path, I think it couldn't be in File.createNewFile, it's better for
the standard library class to be unchanged, so could someone tell me
where to satisfy my curiosity :)

if above description has some errors , please let me know, thanks!

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

2. Software Packaging Problem: How to create an Android installer (apk) ?

HI all,

In Windows, we write "installer script", and user an "installer
compiler" to generate an installer,
let's say .inf for .msi/.cab and .nsi for NSIS.

But when it comes to Android, is there a similiar method?

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

3. can anyone use adb after crc37 update (with g1)

4. How to update the UI from a timer

5. Couldn't open fd for content://settings/system/ringtone

6. Getting the file name of the SD Card.

7. How can i force a picture to be downloaded on SD card ?