Hi Archana

You can't do startActivityForResults in the service. I guess you want to do 
something after user has enabled the bluetooth from the setting.For this to 
achieve what you can do is write your code on OnResume checking the status 
of the bluettoth if it's not then navigate user to the setting screen 
asking him/her to enable it .

OnResume(){
        if( bluetooth is not enable ){
                       open bluetooth setting screen or directly enable it 
                               }else{

                              bluetooth is already enabled
                              do what u want
                               }
}


I don't know whether it will work but try this 
On Thursday, 11 October 2012 17:43:02 UTC+5:30, Archana wrote:
>
> Hi, I have defined a service.
>
> I need to call startActivityForResult(intent,REQUEST_CODE) from this.  I 
> saw 
>
> http://stackoverflow.com/questions/3448485/startactivityforresult-from-a-service
>
> But can someone explain me? Thanks!
>

-- 
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