Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upRequest for an support to run commands on runtime #1540
Comments
|
You can call any native method in javascript: java.lang.Runtime.getRuntime().exec("logcat -c");
java.lang.Runtime.getRuntime().exec("logcat -f /data/data/org.nativescript.testapp/files/app/test.log \"*:S MyActivity:D MyActivity2:D\""); |
I need my app to list out all logs in my android phone, but i can't able to achieve this in native script. In Java, the same will be done using below.
try { Process process = Runtime.getRuntime().exec( "logcat -c"); process = Runtime.getRuntime().exec( "logcat -f " + logFile + " *:S MyActivity:D MyActivity2:D"); } catch ( IOException e ) { e.printStackTrace(); }