Starting new activity from a non activity class in a constructor
<p>I know it's been alot of questions like this, but I didn't find the answer.</p>

<pre><code>public class Model3D extends ARObject implements Serializable{

    public Model3D(Context context)
    {
        super("model", "", 80.0, new double[]{0,0});
        mContext = context;
    }

    public Model3D(Model model,String patternName)
    {
        super("model", patternName, 80.0, new double[]{0,0});
        Intent myIntent = new Intent(mContext, toast.class);
        mContext.startActivity(myIntent);
    }
}

public class toast extends Activity
{
    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        Toast.makeText(getApplicationContext(), "Let's do some search action", Toast.LENGTH_SHORT).show();
    }
}
</code></pre>

<p>everytime i do this my program stops working.
Actually i want to call intent in the constructor because i want to show a toast message and if i use toast message in constructor it gives error.</p>

<p>plz help
thank you</p>
