- Common ways to obtain IAppRequestListener
private void myMethod () {IAppRequestListener i =
VirtualCore.get().getAppRequestListener()
RemoteException e;VirtualRuntime.crash(e)
VirtualCore virtualCore;virtualCore.getService().getAppRequestListener()
- Smart code suggestions by Codota
}
private boolean handleInstallRequest(Intent intent) { IAppRequestListener listener = VirtualCore.get().getAppRequestListener(); if (listener != null) { Uri packageUri = intent.getData(); String sourcePath = FileUtils.getFileFromUri(getHostContext(), packageUri); try { listener.onRequestInstall(sourcePath); return true; } catch (RemoteException e) { e.printStackTrace(); } } return false; }
File sourceFile = new File(packageUri.getPath()); try { listener.onRequestInstall(sourceFile.getPath()); return true; } catch (RemoteException e) { listener.onRequestInstall(sharedFileCopy.getPath()); return true; } catch (RemoteException e) {
private boolean handleInstallRequest(Intent intent) { IAppRequestListener listener = VirtualCore.get().getAppRequestListener(); if (listener != null) { Uri packageUri = intent.getData(); String sourcePath = FileUtils.getFileFromUri(getHostContext(), packageUri); try { listener.onRequestInstall(sourcePath); return true; } catch (RemoteException e) { e.printStackTrace(); } } return false; }