android use java vs linux -


is there advantage/disadvantage of executing linux command in android app rather using java alternative?

ex:

file file = new file("file.txt"); file.delete(); 

vs

rm file.txt 

advantages?

none, really, or @ least not in general case.

i see being useful if want invoke separate , complex program doesn't expose programmatic interface. in case i'd still go invoking via processbuilder rather using system execution.

disadvantages

  • unsafe

    if it's not program, don't know does. may tampered with, , may require using different permissions , privileges.

  • unstable

    if it's not program, don't know if it's there , if be.

  • wasteful

    it spawns process no reason.

  • opaque

    it's harder monitor long-running task , check return codes (and again conventions these may change in future, brings unsafe , unstable).


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -