0

I'm using the following code to get the activity of a 3th party application and to put it in my activity:

LocalActivityManager mgr = getLocalActivityManager();

Intent i = new Intent(this, SomeActivity.class);

Window w = mgr.startActivity("unique_per_activity_string", i);
View wd = w != null ? w.getDecorView() : null;

if(wd != null) {
    mSomeContainer.addView(wd);
}

Copyright Synic: android: using ActivityGroup to embed activities

However, due Security Restrictions, I'm receiving the following error:

java.lang.SecurityException: Requesting code from com.google.android.youtube (with uid 10065) to be run in process com.xxx.xxx (with uid 10144). (It is possible to show your own activity with your own SharedUID from your own application.)

Now i'm wondering if there is any way I can avoid this. By using rooted devices(?), bug in Android OS, or anything else. If I can get it to work by rooting my device, how would i achieve it? (not the rooting ofc)

Community
  • 1
  • 1
Verhelst
  • 1,492
  • 2
  • 22
  • 46

1 Answers1

1

I'm using the following code to get the activity of a 3th party application and to put it in my activity

That is not supported, sorry.

Now i'm wondering if there is any way I can avoid this.

You are welcome to grab the source code to Android, modify it to suit, put your altered OS into your own modded ROM, and install that ROM mod on whatever devices you are able to.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • I see, thanks for your comment, but isn't there a way to do this by rooting your device? I thought i read that somewhere. – Verhelst Oct 06 '12 at 16:50
  • @XverhelstX: Not that I am aware of. Rooting does not magically break down Android's intrinsic security -- it simply allows certain Linux filesystem operations to be performed that previously could not. – CommonsWare Oct 06 '12 at 16:52