當前位置: 首頁>>代碼示例>>Java>>正文


Java VirtualCore.get方法代碼示例

本文整理匯總了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);
        }
    }
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:23,代碼來源:GmsSupport.java

示例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");
        }
    });
}
 
開發者ID:coding-dream,項目名稱:TPlayer,代碼行數:41,代碼來源:VApplication.java

示例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);
}
 
開發者ID:codehz,項目名稱:container,代碼行數:8,代碼來源:VClientImpl.java

示例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;
}
 
開發者ID:codehz,項目名稱:container,代碼行數:9,代碼來源:ExternalProviderHook.java

示例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));
	}
}
 
開發者ID:codehz,項目名稱:container,代碼行數:14,代碼來源:DaemonService.java

示例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");
        }
    });
}
 
開發者ID:7763sea,項目名稱:VirtualHook,代碼行數:43,代碼來源:VApp.java


注:本文中的com.lody.virtual.client.core.VirtualCore.get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。