我有一个项目库,其中有一些逻辑需要打开基于此库的应用程序的活动
我无法将应用程序添加为依赖项,因此我如何能够打开活动,请任何人建议
BaseApplication.java
public class BaseApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
BaseApplication.mInstance = this;
// Register global exception handler.
UncoughtException crashHandler = UncoughtException.getInstance();
crashHandler.init(getApplicationContext());
}
}
UncoughtException.java
public class UncoughtException implements UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread thread, Throwable ex) {
ex.printStackTrace();
intent = new Intent(mContext, UncoughtExceptionActivity.class);
mContext.startActivity(intent);
}
}
UncoughtExceptionActivity.java
public class UncoughtExceptionActivity extends Activity {
mReopenButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
ntent intent = new Intent(UncoughtExceptionActivity.this , SplashActivity.class);
UncoughtExceptionActivity.this.startActivity(intent);
}
}
}
在基本模块中找不到SplashActivity,它位于另一个模块中,我想从当前模块中打开它