Can you please tell me whats the best practice to pass activity
or context
to other instance(;)
But...,
Create Object of The Helper class from your Activity and pass 'this' as the context, say
MyHelperclass helper=new MyHelperclass(this);
In the Helper class Get this Context via its constructor
Context context;
MyHelperClass(Context context){
this.context=context;
}
Now You can pass this context to the makeText() method of Toast class.