[android-developers] Re: Schedule notification instead of permanently check

2011-03-15 Thread roberto
Have a look to the SchedulerManager in the BuzzBox SDK here: http://hub.buzzbox.com/android-sdk/ It's a free library that simplifies using the Alarm Manager. On Jan 19, 12:07 am, Danny S. danny.schi...@googlemail.com wrote: Hi, I have a service that is running in background. It needs to

[android-developers] Re: Schedule notification instead of permanently check

2011-02-02 Thread Danny S.
Today I read this on googles documentation: Broadcast Receivers listening for boot completed The system delivers the ACTION_BOOT_COMPLETED broadcast before the external storage is mounted to the device. If your application is installed on the external storage, it can never receive this broadcast.

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-02-02 Thread Kostya Vasilyev
Danny, According to this: http://developer.android.com/reference/android/content/Intent.html#ACTION_EXTERNAL_APPLICATIONS_AVAILABLE The extra data EXTRA_CHANGED_PACKAGE_LIST contains a list of packages whose availability changed. The extra data EXTRA_CHANGED_UID_LIST contains a list of uids

[android-developers] Re: Schedule notification instead of permanently check

2011-02-02 Thread Danny S.
Hey Kostaya, wow, thanks. It seems I'll be forced don't support external storage. There is really a conflict between the statements... I don't know such missunderstandings by Google ^^ Thanks a lot for this Kostaya! You helped me so many times with solutions and important information ;-) -Danny

[android-developers] Re: Schedule notification instead of permanently check

2011-02-02 Thread Danny S.
Hi, for information: I changed the android:installingLocation in the AndroidManifest.xml to internalOnly and now the broadcast received successfully. Installing the app on external storage was the reason like expected after I read the docs. -Danny S. On Feb 2, 1:06 pm, Danny S.

[android-developers] Re: Schedule notification instead of permanently check

2011-02-01 Thread Danny S.
OMG, today I determined, that my BootReceiver is not called again :'( But I changed nothing in relation with this :( it looks like an issue to me. I don't do anything in the onReceive yet, only log out something. This morning it worked very well then I started to implement code to start my

[android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Danny S.
Hi, I tried to implement a receiver that will be called when the device booted: receiver android:name=.AlertReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED /

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Marcin Orlowski
receiver android:name=.BootCompletedBroadcastReceiver intent-filter action android:name=android.intent.action.BOOT_COMPLETED / /intent-filter /receiver public class BootCompletedBroadcastReceiver extends BroadcastReceiver { @Override public

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Kostya Vasilyev
Danny, You don't need a category in the filter to receive BOOT_COMPLETED, just action. In fact, that's probably the cause of your code not receiving it. Also I don't see the other action in the manifest, for receiving your own alarms. -- Kostya 27.01.2011 16:00, Danny S. пишет: Hi, I

[android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Danny S.
Hey Kostya, you were right. I dont need to hold the intents in java, I can cancel it this way: mAlarmManager.cancel(PendingIntent.getBroadcast(this, intentId, myBroadcastIntent, 0)); Thanks a lot for this!!! ;-) -Danny S. On 20 Jan., 10:33, Kostya Vasilyev kmans...@gmail.com wrote: Danny,

[android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Danny S.
Hi Kostya, I removed the category, but have still the same issue: boot completed is never recognized. You said you dont see the other action. I create the Broadcast- Intent and put it into PendingIntent.getBroadcast(), without a action in AndroidManifest: ... alertReceiverIntent = new

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Kostya Vasilyev
Danny, Your app's manifest for the broadcast action, as well as the permission, look fine. When you start the emulator, make sure you don't have Wipe user data enabled, as that will erase the application, so it won't be available at boot. Other than that, maybe you're just not seeing the

[android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Danny S.
Kostya, yeah, I am with you and think my AndroidManifest looks correct. I figured out too, that all data get lost when Wipe user data is enabled. I started the emulator always without Wipe user data but it does not work. Maybe it is an emulator problem... I can try to figure out on my real device

[android-developers] Re: Schedule notification instead of permanently check

2011-01-27 Thread Danny S.
Hi together, using a second receiver worked for me: ... receiver android:name=.AlertReceiver / !-- only for device is booted detection: -- receiver android:name=.BootedReceiver intent-filter

[android-developers] Re: Schedule notification instead of permanently check

2011-01-20 Thread Danny S.
Good Morning! Wow, you helped me to get it work. I create a PendingIntent with a unique id and store the intent mapped to their IDs in a HashMap. I collect all intents with the known id and can the cancel them using the AlarmManager. I dont know if it is recommended and efficient to store those

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-01-20 Thread Kostya Vasilyev
Danny, Android already keeps a global registry of pending intents, so keeping a parallel hash map should not be necessary. To cancel an alarm, you don't need a reference to the original Java object, you can just construct a pending intent the same way as you did when setting the alarm

[android-developers] Re: Schedule notification instead of permanently check

2011-01-19 Thread Danny S.
Hello Kostya, WOW, thank you very much, I'll have a look and reply with results and questions if I have ;-) -Danny S. On Jan 19, 9:09 am, Kostya Vasilyev kmans...@gmail.com wrote: 19.01.2011 10:07, Danny S. пишет: Hi, I have a service that is running in background. It needs to send

[android-developers] Re: Schedule notification instead of permanently check

2011-01-19 Thread Danny S.
Hi, the AlarmManager is exactly what I need. It works fine, but I don't figured out yet how to set more than 1 alarm on a AlarmManager. I am using a BroadcastReceiver to receive that is called if the scheduling time is reached. First I forgot to add the receiver- Tag in the AndroidManifest.xml

Re: [android-developers] Re: Schedule notification instead of permanently check

2011-01-19 Thread Kostya Vasilyev
Danny, The issue with multiple alarms comes up quite often, this is one of several responses: http://groups.google.com/group/android-developers/browse_thread/thread/57d0d40c542db6cc -- Kostya 19.01.2011 19:09, Danny S. пишет: Hi, the AlarmManager is exactly what I need. It works fine, but