How-to start service automatically on system startup and on installation

by Ralf » Mon, 13 Apr 2009 13:08:20 GMT


Sponsored Links
 All you need is to create a BroadcastReceiver that is bound to the
BOOT_COMPLETED action.

Tout ce que tu as a faire c'est de creer un BroadcastReceiver qui
recoit l'action BOOT_COMPLETED (avec la permission qui va bien).

Exemple:

<manifest xmlns:android=" http://schemas.android.com/apk/res/android" ;
package="com.alfray.timeriffic" ...>
  <application ...>
    <receiver android:name=".MyBroadcastReceiver">
      <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
      </intent-filter>
    </receiver>
  </application>

<!-- Important -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
</manifest>

R/





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



Other Threads

1. A problem about application die unexpected.

I've met this problem serveral times.
When my application is running, some times it die unexpected. The
logcat print the message below:
(the application name is remove)

09-23 16:00:42.407: INFO/DEBUG(539): *** *** *** *** *** *** *** ***
*** *** *** *** *** *** *** ***
09-23 16:00:42.407: INFO/DEBUG(539): Build fingerprint: 'generic/sdk/
generic/:1.5/CUPCAKE/147336:eng/test-keys'
09-23 16:00:42.407: INFO/DEBUG(539): pid: 1471, tid: 1534  >>>
com.xx.xx <<<
09-23 16:00:42.407: INFO/DEBUG(539): signal 11 (SIGSEGV), fault addr
000000fe
09-23 16:00:42.407: INFO/DEBUG(539):  r0 ff9d9d9d  r1 43804000  r2
42320000  r3 45ba86a0
09-23 16:00:42.407: INFO/DEBUG(539):  r4 ff9d9d9d  r5 43804000  r6
becf511c  r7 45ba86e8
09-23 16:00:42.407: INFO/DEBUG(539):  r8 44da4008  r9 ffffff80  10
000074e7  fp 00000200
09-23 16:00:42.407: INFO/DEBUG(539):  ip ffffff81  sp 45ba8698  lr
ac043dfc  pc 000000fe  cpsr 90000030
09-23 16:00:42.467: INFO/DEBUG(539):          #00  pc 000000fe
09-23 16:00:42.548: INFO/DEBUG(539):          #01  pc 00043df8  /
system/lib/libsgl.so
09-23 16:00:42.557: INFO/DEBUG(539):          #02  pc 0003e018  /
system/lib/libsgl.so
09-23 16:00:42.557: INFO/DEBUG(539):          #03  pc 0004ea00  /
system/lib/libsgl.so
09-23 16:00:42.557: INFO/DEBUG(539):          #04  pc 00047e4c  /
system/lib/libsgl.so
09-23 16:00:42.568: INFO/DEBUG(539):          #05  pc 00075d64  /
system/lib/libsgl.so
09-23 16:00:42.568: INFO/DEBUG(539):          #06  pc 000767d4  /
system/lib/libsgl.so
09-23 16:00:42.568: INFO/DEBUG(539):          #07  pc 0005b3e8  /
system/lib/libsgl.so
09-23 16:00:42.578: INFO/DEBUG(539):          #08  pc 00054b80  /
system/lib/libsgl.so
09-23 16:00:42.578: INFO/DEBUG(539):          #09  pc 00052204  /
system/lib/libsgl.so
09-23 16:00:42.588: INFO/DEBUG(539):          #10  pc 0003d008  /
system/lib/libandroid_runtime.so
09-23 16:00:42.588: INFO/DEBUG(539):          #11  pc 0000e3b4  /
system/lib/libdvm.so
09-23 16:00:42.588: INFO/DEBUG(539): stack:
09-23 16:00:42.598: INFO/DEBUG(539):     45ba8658  00000000
09-23 16:00:42.598: INFO/DEBUG(539):     45ba865c  0000000b
09-23 16:00:42.611: INFO/DEBUG(539):     45ba8660  45ba86d4
09-23 16:00:42.611: INFO/DEBUG(539):     45ba8664  00000001
09-23 16:00:42.617: INFO/DEBUG(539):     45ba8668  00000010
09-23 16:00:42.632: INFO/DEBUG(539):     45ba866c  00000010
09-23 16:00:42.632: INFO/DEBUG(539):     45ba8670  00000010
09-23 16:00:42.632: INFO/DEBUG(539):     45ba8674  00000010
09-23 16:00:42.632: INFO/DEBUG(539):     45ba8678  44da4008
09-23 16:00:42.638: INFO/DEBUG(539):     45ba867c  00000080
09-23 16:00:42.638: INFO/DEBUG(539):     45ba8680  00000020
09-23 16:00:42.638: INFO/DEBUG(539):     45ba8684  45ba87ec
09-23 16:00:42.648: INFO/DEBUG(539):     45ba8688  00000006
09-23 16:00:42.648: INFO/DEBUG(539):     45ba868c  00000006
09-23 16:00:42.648: INFO/DEBUG(539):     45ba8690  df002777
09-23 16:00:42.648: INFO/DEBUG(539):     45ba8694  e3a070ad
09-23 16:00:42.648: INFO/DEBUG(539): #01 45ba8698  00000037
09-23 16:00:42.648: INFO/DEBUG(539):     45ba869c  00000000
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86a0  44da4008
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86a4  003039f0  [heap]
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86a8  45ba8b54
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86ac  00000080
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86b0  ffffffb7
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86b4  00000037
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86b8  00000100
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86bc  44da4008
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86c0  ffffff80
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86c4  becf511c  [stack]
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86c8  00000200
09-23 16:00:42.648: INFO/DEBUG(539):     45ba86cc  ac03e01c  /system/
lib/libsgl.so
09-23 16:00:43.577: INFO/ActivityManager(568): Process com.uc.browser
(pid 1471) has died.
09-23 16:00:43.599: INFO/WindowManager(568): WIN DEATH: Window
{43766f50 com.xx.xxr/com.xx.xx.Activityxx paused=false}
09-23 16:00:43.707: WARN/InputManagerService(568): Got RemoteException
sending setActive(false) notification to pid 1471 uid 10018

so, what happended? Is there any possible operation will cause this
problem?

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

2. Eclair feature list

Hi,

Donut has been official released, but eclair is still ongoing. I am
trying to get some official information about eclair, but has no
result. The following is what I got from internet, can anyone give me
more accurate information about eclair?

+Google Maps 4.0
+Chrome Sync
+Google Earth
+MultiTouch
+3D Enhancement
+Flash 10
+New Android Market

Many thanks!!!

CJ
--~--~---------~--~----~------------~-------~--~----~

3. Possible to send object via intent extras?

4. dblite file?

5. magic kalau jadi modem...?

6. Intent between 2 APK (different projects)?

7. need to build custom calendar