Do you have a reference to the activity's context in your thread? If
so, I think you could do something like this:

Intent _intent = new Intent(yourContext, yourActivity.class);
yourContext.startActivity(_intent);

provided that yourActivity was declared in your manifest.

On Feb 18, 1:39 pm, Abhi <abhishek.r.sha...@gmail.com> wrote:
> Hi,
>
> I want to either use WiFiManager to toggle wifi from inside a thread
> or call another activity to do this, whichever is possible. I tried
> using the wifimanager class inside the thread but it didn't work.
> Could anyone tell me how to call an activity using Intents from inside
> a thread?
>
> Thanks,
>
> Abhi

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

Reply via email to