I'm trying to load the main activity of another app into my own view hierarchy, similar to what can be done with "Fragments".

I've tried:

```
Context foreignContext = createPackageContext("com.android.calculator2", Context.CONTEXT_IGNORE_SECURITY | Context.CONTEXT_INCLUDE_CODE);
Class<?> foreignClass = foreignContext.getClassLoader().loadClass("com.android.calculator2.Calculator");
Intent intent = new Intent(this, foreignClass);

View view = getLocalActivityManager()
          .startActivity("ReferenceName", intent
          .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
          .getDecorView();
          this.setContentView(view);

```

This fails with a `ClassNotFoundException` as it tries to find `com.my.app/com.android.calculator2.Calculator` (I assume the `Local` in `getLocalActivityManager` adds the prefix?)

Is there any way to achieve this? I don't need to interact with the foreign activity or its code, just display it within my own activity, so simply launching it with an intent wouldn't work. I thought this wasn't possible due to security considerations, but if I can (theoretically) access the foreign app's code, it should be possible to somehow run its `onCreate` method? 

Thanks!