Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
if (e.getSource() == logical) {
int confirm = showConfirmDialog(this, "Perform Logical Extraction of UserData only?");
if (confirm == 0) {
showMessageDialog(this, "Please ensure the device is plugged in"
+ "\nand USB Debugging is enabled");
InputStream stream = WinExtract.class.getResourceAsStream("CONTENT/Scripts/Test.bat");
if (stream == null) {
JOptionPane.showMessageDialog(null, "Resource not located.");
}
Scanner input = null;
try {
input = new Scanner(stream);
String str = stream.toString();
// String str = info.getText();
// Process child = Runtime.getRuntime().exec(str);
Process child = Runtime.getRuntime().exec(str);
InputStream lsOut = child.getInputStream();
InputStreamReader r = new InputStreamReader(lsOut);
BufferedReader in = new BufferedReader(r);
String line;
while ((line = in.readLine()) != null) {
info.append(line + "\n");
}
/* input = new Scanner(stream);
while (input.hasNextLine()) {
info.append(input.nextLine() + "\n");*/
} catch (Exception Process) {
JOptionPane.showMessageDialog(null,
"Please check the script and try again",
"Command Failed!", ERROR_MESSAGE);
}
}
InputStream stream = WinExtract.class.getResourceAsStream("CONTENT/Scripts/Test.bat");