I am working on library project. My project contains all Java file but I am include one activity for web view. When I call from Java class to open web view then I want return result back to Java class. What should I do. I try startActivityForResult but this solution not work because onActivityResult not override in simple Java class. My code for startActivityForResult
Activity activity = (Activity) context;
Intent i = new Intent(activity, WebViewAunthen.class);
i.putExtra("smartRouteMap", (Serializable) SmartPayment.res);
activity.startActivityForResult(i, 1);`
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Toast.makeText(this, "onActivityResult called", Toast.LENGTH_LONG).show();
super.onActivityResult(requestCode, resultCode, data);
if (requestCode==1)
{
}