You are getting error because you are trying to call another activity with FileEvent
class context. I think it is not possible.
If you are calling insert()
method from another class, have to pass context of that class.
Try to pass Context of that class.
Your Method should be
public void insert(String path, Context context)
{
info = new adapter(context);
filename = path;
try
{
startActivity(new Intent(context,hello.class));
}
catch(Exception e)
{
Log.v("Caught in insert() of FileEvent : ",e.toString());
}
}
Hope it will help you.