Kaushik
Kaushik

Reputation: 1

How to start activity from non-activity class,if first activity is simple java class?

I want to start activity from 1st java class that extends BroadcastReceicer class.so i can`t extends activity class to start activity of another java class by using startactivity method in 1st class. Give me proper guidance what should i do now?

Upvotes: 0

Views: 629

Answers (1)

nandeesh
nandeesh

Reputation: 24820

use context in the Onrecieve function of the broadcastreciever,

context.startActivity(...);

Upvotes: 1

Related Questions