Query for when my service will be run in Android? -


i have service fires off every 5 minutes or so... how query android see when service scheduled go off programatically?

    <!-- send census service -->     <service android:name="services.scheduled.sendcensusscheduledservice"              android:icon="@drawable/ic_launcher"              android:label="syncserverdatascheduledservice" />     <receiver android:name="services.receivers.sendcensusscheduledservicereceiver" >         <intent-filter>             <action android:name="receiptbucketclient.android.action.broadcast"/>             <action android:name="android.intent.action.boot_completed" />         </intent-filter>     </receiver>     <receiver android:name="services.receivers.startsendcensusscheduledservicereceiver" /> 

check pendingintent:

pendingintent intent = pendingintent.getbroadcast(context, 0,          new intent("receiptbucketclient.android.action.broadcast"),          pendingintent.flag_no_create;  if (intent != null) {    // have service scheduled. cancel it!    intent.cancel(); } 

remember only original application owning pendingintent can cancel it.


Popular posts from this blog

c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -