Skip to content
This repository has been archived by the owner on May 25, 2020. It is now read-only.

How to use this converter in android device in runtime? #8

Closed
nekitr opened this issue Sep 8, 2018 · 2 comments
Closed

How to use this converter in android device in runtime? #8

nekitr opened this issue Sep 8, 2018 · 2 comments

Comments

@nekitr
Copy link

nekitr commented Sep 8, 2018

Hi, i want to use this converter on an Android device, for runtime converting .obj to .sfb.
My code does not work.

val root = getExternalFilesDir(null).toString() + "/google-ar-asset-converter"

val command = "chmod u+x $root/sceneform_sdk/linux/converter -a -d --mat $root/sceneform_sdk/default_materials/obj_material.sfm --outdir $root/output/ $root/input/andy.obj"

val process: Process = Runtime.getRuntime().exec("$command")

E/ERROR: chmod: -a: No such file or directory
chmod: -d: No such file or directory
chmod: --mat: No such file or directory
chmod: --outdir: No such file or directory

Do you have any idea how to fix this error?

@gdamoreira
Copy link
Owner

Hi @GopNick7, I never tried using this converter in Android environment. But, your code are trying to do chmod in converter and using at same time.

Try typing 2 commands, one for chmod command and other for the converter command.

@nekitr
Copy link
Author

nekitr commented Sep 10, 2018

Thank you for answer, i will be trying

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants