Thanks but I'm good now. I added a BOOT_COMPLETED intent to the appwidget's intent filter and check for that event in onRecieve. All is good!
>>>>> "ND" == Nguyen Dat <nguyenda...@gmail.com> writes: ND> Dear Jake ND> ★I have 2 point concern so could you please give me some information: ND> 1. SDK version you used for widget ND> 2. Please share xml manafiest file for your widget ND> ★I successful receive Broadcat messsage BOOT_COMPLETED from system, so ND> currently i had 3 solution: Declare BroadcastReceiver in manifest file, ND> register BroadcastReceiver in implement of widget and try other trigger to ND> known timing to wake-up your implement. Could you please try implement above ND> and tell me result. ND> * ND> *Here is detail implement for earch solution: ND> *❶. Solution 1: Register BroadcastReceiver in Manifest:* ND> *●XML definition:* ND> <application ND> ................... ND> <receiver ND> android:name=".YourWidget" ND> android:label="WidgetName"> ND> <intent-filter> ND> <-- Declare list Intent you want to receive --> ND> <action ND> android:name="android.intent.action.BOOT_COMPLETED" /> ND> </intent-filter> ND> <meta-data ND> android:name="android.appwidget.provider" ND> android:resource="@xml/your_layout_of_widget"> ND> </meta-data> ND> </receiver> ND> ................. ND> </application> ND> <uses-permission ND> android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> ND> ................. ND> *● *Ensure you had declare permission to receive BOOT_COMPLETED message: ND> (Ref.3) ND> RECEIVE_BOOT_COMPLETED ND> *●Disadvantage:* ND> Adroid docs said: some Broadcast receiver must register explicit in source ND> code: ND> Example: TIME_TICK, SCREEN_ON (Ref.2) ND> *●*I had try and successful receiver message from system on Android SDK ND> *2.3, ND> And not sure this solution can work well on other SDK version. ND> *❷. Solution 2: Register BroadcastReceiver in implement of widget:* (Ref.1) ND> *●*Please refer my answer at this thread: ND> http://groups.google.com/group/android-developers/browse_thread/thread/790da1a655f4a227/0b8d6aad1dc2d371?hl=en&lnk=gst&q=Broadcast+Receiver+From+Widget#0b8d6aad1dc2d371 ND> As you can see from the link above, i had successful register ND> BroadcastReceiver (ACTION_TIME_TICK), I use SDK 2.3. ND> *●*Advantage: ND> This solution is solver problem of Solution 1, explicit register ND> BroadcastReceiver ND> *●*Disadvantage: ND> Refer my note in provider link above ND> *❸. Solution3: Try other BroadcastReceiver to wake-up your implement like:* ND> ACTION_SCREEN_ON, ACTION_USER_PRESENT ND> *●Flow to receive message in boot process is:* ND> Boot completed -> [ACTION_BOOT_COMPLETED] -> Go to Keyguard screen -> ND> [ACTION_SCREEN_ON] -> Go to Home screen -> [ACTION_USER_PRESENT] ND> *●*So we still have at least 2 trigger which indicate timing need to update ND> your widget (I not sure except 3 message i list above, may be lack some ND> message, If you know have better BroadcastReceiver message plese let me ND> known ND> ★Above is 3 solution i think can solver your problem. I had successful with ND> solution *❶* and* **❷* with Android SDK 2.3 ND> Please try and give your feedback. If have any concern feel free to let me ND> known. ND> ★References: ND> (1) ND> http://groups.google.com/group/android-developers/browse_thread/thread/790da1a655f4a227/0b8d6aad1dc2d371?hl=en&lnk=gst&q=Broadcast+Receiver+From+Widget#0b8d6aad1dc2d371 ND> (2) ND> http://developer.android.com/reference/android/content/Intent.html#ACTION_TIME_TICK ND> (3) ND> http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED ND> Regards, ND> DatNQ ND> On Fri, Feb 25, 2011 at 4:57 AM, Kostya Vasilyev <kmans...@gmail.com> wrote: >> 25.02.2011 0:42, Jake Colman пишет: >> >> Hmmm. In Eclipse I am always doing Run/Run from the menu. I'd guess >>> that is what you are telling me NOT to do. So what do I do instead? >>> >> >> The first time (to install the app) do that. >> >> Then shut down the emulator. >> >> The second time, bring up the SDK/AVD manager by clicking its toolbar icon >> ("Android hiding in a box with an arrow pointing down", top left of the >> screen, in the menu bar), or from the Start menu, select your emulator, >> click "Start". >> >> >> -- >> Kostya Vasilyev -- http://kmansoft.wordpress.com >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> ND> -- ND> You received this message because you are subscribed to the Google ND> Groups "Android Developers" group. ND> To post to this group, send email to android-developers@googlegroups.com ND> To unsubscribe from this group, send email to ND> android-developers+unsubscr...@googlegroups.com ND> For more options, visit this group at ND> http://groups.google.com/group/android-developers?hl=en -- Jake Colman -- Android Tinkerer -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en