本文整理汇总了Java中com.lody.virtual.client.core.VirtualCore.get方法的典型用法代码示例。如果您正苦于以下问题:Java VirtualCore.get方法的具体用法?Java VirtualCore.get怎么用?Java VirtualCore.get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.lody.virtual.client.core.VirtualCore
的用法示例。
在下文中一共展示了VirtualCore.get方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: installPackages
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
private static void installPackages(List<String> list, int userId) {
VirtualCore core = VirtualCore.get();
for (String packageName : list) {
if (core.isAppInstalledAsUser(userId, packageName)) {
continue;
}
ApplicationInfo info = null;
try {
info = VirtualCore.get().getUnHookPackageManager().getApplicationInfo(packageName, 0);
} catch (PackageManager.NameNotFoundException e) {
// Ignore
}
if (info == null || info.sourceDir == null) {
continue;
}
if (userId == 0) {
core.installPackage(info.sourceDir, InstallStrategy.DEPEND_SYSTEM_IF_EXIST);
} else {
core.installPackageAsUser(userId, packageName);
}
}
}
示例2: onCreate
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
final VirtualCore virtualCore = VirtualCore.get();
virtualCore.initialize(new VirtualCore.VirtualInitializer() {
@Override
public void onMainProcess() {
// TODO 主进程初始化
}
@Override
public void onVirtualProcess() {
// activity生命周期监听
virtualCore.setComponentDelegate(new MyComponentDelegate());
// 信息伪造 fake phone imei,macAddress,BluetoothAddress
virtualCore.setPhoneInfoDelegate(new MyPhoneInfoDelegate());
// 任务历史显示,activity启动的intent处理(不显示任务)
virtualCore.setTaskDescriptionDelegate(new MyTaskDescriptionDelegate());
}
@Override
public void onServerProcess() {
// 监听全部插件的安装和卸载
virtualCore.registerObserver(new MyPackageObserver(VApplication.this));
// 通过intent 安装/卸载 的监听器
virtualCore.setAppRequestListener(new MyAppRequestListener(VApplication.this));
// 允许内部app调用外部的app名单issue223
// 这里指的是如: VirtualApp中安装了一个应用支持微信登录,方法1: 需要在环境中也安装微信才能调起,方法2: addVisibleOutsidePackage 直接调起外部的微信来登录
virtualCore.addVisibleOutsidePackage("com.tencent.mobileqq");
virtualCore.addVisibleOutsidePackage("com.tencent.mobileqqi");
virtualCore.addVisibleOutsidePackage("com.tencent.minihd.qq");
virtualCore.addVisibleOutsidePackage("com.tencent.qqlite");
virtualCore.addVisibleOutsidePackage("com.facebook.katana");
virtualCore.addVisibleOutsidePackage("com.whatsapp");
virtualCore.addVisibleOutsidePackage("com.tencent.mm");
virtualCore.addVisibleOutsidePackage("com.immomo.momo");
}
});
}
示例3: uncaughtException
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
@Override
public void uncaughtException(Thread t, Throwable e) {
VLog.e("uncaught", e);
if (VirtualCore.get().uncheckedExceptionDelegate != null)
VirtualCore.get().uncheckedExceptionDelegate.onThreadGroupUncaughtException(t, e);
System.exit(0);
}
示例4: ProxyCursor
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
ProxyCursor(Cursor src) {
if (!mapInited) {
if (VirtualCore.get().ioRedirectDelegate != null)
mapList = VirtualCore.get().ioRedirectDelegate.getContentReversedRedirect();
mapInited = true;
}
this.src = src;
}
示例5: onCreate
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
@Override
public void onCreate() {
super.onCreate();
ForegroundNotificationDelegate foregroundNotificationDelegate = VirtualCore.get().foregroundNotificationDelegate;
if (foregroundNotificationDelegate == null) {
startService(new Intent(this, InnerService.class));
startForeground(NOTIFY_ID, new Notification());
} else if (foregroundNotificationDelegate.isEnabled()) {
startForeground(NOTIFY_ID, foregroundNotificationDelegate.getNotification());
if (foregroundNotificationDelegate.isTryToHide())
startService(new Intent(this, InnerService.class));
}
}
示例6: onCreate
import com.lody.virtual.client.core.VirtualCore; //导入方法依赖的package包/类
@Override
public void onCreate() {
gApp = this;
super.onCreate();
VirtualCore virtualCore = VirtualCore.get();
virtualCore.initialize(new VirtualCore.VirtualInitializer() {
@Override
public void onMainProcess() {
Once.initialise(VApp.this);
new FlurryAgent.Builder()
.withLogEnabled(true)
.withListener(() -> {
// nothing
})
.build(VApp.this, "48RJJP7ZCZZBB6KMMWW5");
}
@Override
public void onVirtualProcess() {
//listener components
virtualCore.setComponentDelegate(new MyComponentDelegate());
//fake phone imei,macAddress,BluetoothAddress
virtualCore.setPhoneInfoDelegate(new MyPhoneInfoDelegate());
//fake task description's icon and title
virtualCore.setTaskDescriptionDelegate(new MyTaskDescriptionDelegate());
}
@Override
public void onServerProcess() {
virtualCore.setAppRequestListener(new MyAppRequestListener(VApp.this));
virtualCore.addVisibleOutsidePackage("com.tencent.mobileqq");
virtualCore.addVisibleOutsidePackage("com.tencent.mobileqqi");
virtualCore.addVisibleOutsidePackage("com.tencent.minihd.qq");
virtualCore.addVisibleOutsidePackage("com.tencent.qqlite");
virtualCore.addVisibleOutsidePackage("com.facebook.katana");
virtualCore.addVisibleOutsidePackage("com.whatsapp");
virtualCore.addVisibleOutsidePackage("com.tencent.mm");
virtualCore.addVisibleOutsidePackage("com.immomo.momo");
}
});
}