Oh yes, too stupid a question, i forgot that BootUpREceiver is my own class, thought it was a system class.
Thanks a lot. On Jun 23, 3:57 am, Mark Murphy <mmur...@commonsware.com> wrote: > On Tue, Jun 22, 2010 at 3:55 PM, Jeruliu <jeru....@gmail.com> wrote: > > Hi, I can managed to autostart my activiy when reboot. > > > But however I realized that what should i autostart is not the activiy > > with UI but a one time function call in background. > > > I used to define the receiver in manifest xml to autostart the > > activity, this is working good. > > <receiver android:enabled="true" android:name=".BootUpReceiver" > > android:permission="android.permission.RECEIVE_BOOT_COMPLETED"> > > <intent-filter> > > <action android:name="android.intent.action.BOOT_COMPLETED" /> > > <category android:name="android.intent.category.DEFAULT" /> > > </intent-filter> > > </receiver> > > > Say my application has the main acticity class A as entry point and > > another class B with just a funtion called fireSomeAction. > > > Now after android reboot, i want to call the fireSomeAction function > > in class B for only once, how can i do that? > > Move fireSomeAction() into BootUpReceiver and call it from there. > > -- > Mark Murphy (a Commons > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > Android Training...At Your Office:http://commonsware.com/training -- 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