You can not get this event in service.
You must have Activity Class to recieve this event .


On Mar 9, 11:37 am, Dilip Dilip <[email protected]> wrote:
> Hi ,
>   I wanted notification in my service ( sorry for wrong question ). its a
> java file , it runs in background .. i want rotate notification here.
> someone please explain me how to do it.
>
> Thanks and Regards,
>   Dileep.
>
> On Mon, Mar 8, 2010 at 9:40 AM, Farha Ansari <[email protected]>wrote:
>
> > Hi, you can add these lines in AndroidManifest.xml,
>
> > <activity android:name=".YourActivityName"
> >             android:configChanges="orientation">
>
> > and then in your activity, override this method:-
>
> > @Override
> > public void onConfigurationChanged(Configuration newConfig)
> > {
> >                if (getResources().getConfiguration().orientation ==
> > Configuration.ORIENTATION_LANDSCAPE)
> >        {
> >                                       //do your task
> >        }
> >        else if (getResources().getConfiguration().orientation ==
> > Configuration.ORIENTATION_PORTRAIT)
> >        {
> >                                      //do your task
> >        }
> >        super.onConfigurationChanged(newConfig);
> > }
>
> > This worked perfectly for me, hope it does for u too...
>
> > On Mar 7, 8:32 am, Dilip Dilip <[email protected]> wrote:
> > > Dear All,
> > >   I am a new bee to android. I wanted to know how to recieve a rotation
> > > event ( change in orientation, vertical to horizontal ) in my Activity or
> > my
> > > service.
> > > Please anyone answer me.
>
> > > Thanks and Regards,
> > >   Dileep
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]<android-developers%[email protected]>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to