public setClassName ( android arg0, java arg1 ) : global::android.content.Intent | ||
arg0 | android | |
arg1 | java | |
return | global::android.content.Intent |
public override Intent getLaunchIntentForPackage (string packageName) { if (!loaded_packages.ContainsKey (packageName)) return null; XobotPackageInfo info = loaded_packages [packageName]; if (info.Info.applicationInfo == null) throw new RuntimeException ("Cannot get ApplicationInfo from package."); if (info.Info.activities.Length < 1) throw new RuntimeException ("Package does not contain any Activity."); ActivityInfo ai = info.Info.activities [0]; ai.applicationInfo.uid = android.os.Process.SYSTEM_UID; Intent intent = new Intent (Intent.ACTION_MAIN); intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK); intent.setPackage (packageName); intent.setClassName (info.Info.packageName, ai.name); return intent; }