Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Samsung Chord API #29

Open
GoogleCodeExporter opened this issue Apr 5, 2015 · 4 comments
Open

Support for Samsung Chord API #29

GoogleCodeExporter opened this issue Apr 5, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Can you add support for the Chord API?  I can help with it if you want.

http://developer.samsung.com/chord


Original issue reported on code.google.com by john.j.j...@gmail.com on 3 Jun 2013 at 3:35

@GoogleCodeExporter
Copy link
Author

Just adding custom Chord facade would fit right ? 
http://code.google.com/p/android-python27/wiki/TutorialHowToCreateCustomRpcFacad
e

Original comment by anthony....@gmail.com on 3 Jun 2013 at 3:54

@GoogleCodeExporter
Copy link
Author

Thanks for your reply!  I think I can easily create the RPC Facade as described 
in the wiki.

I then want to invoke on the facade using the Lua scripting language.  That 
should work, right?

Original comment by john.j.j...@gmail.com on 3 Jun 2013 at 5:41

@GoogleCodeExporter
Copy link
Author

[deleted comment]

@GoogleCodeExporter
Copy link
Author

Yes should work. You need to embed the Lua interpreter instead of the Python 
one. 

Lua is there: http://android-scripting.googlecode.com/files/lua_r2.zip

You would need to replace python27.zip by lua_r2.zip, extract it, set 
interpreter path and env var for lua.

In GlobalConfig.java:

change to: public static final String PYTHON_ZIP_NAME = "lua_r2.zip";

remove: public static final String PYTHON_EXTRAS_ZIP_NAME = 
"python_extras_27.zip";

In ScriptActivity.java change the interpreter path (chmod):

this.getFilesDir().getAbsolutePath() + "/lua/bin/lua"

And remove to part which extract python extras.

And in ScriptService.java (and BackgroundScriptService.java ) change 
interpreter path + env var:

File pythonBinary = new File(this.getFilesDir().getAbsolutePath() + 
"/lua/bin/lua");

And for var smth like:

environmentVariables.put("LUA_CPATH", this.getFilesDir().getAbsolutePath() + 
"/lua/lib/lua/5.1/?.so" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/lib/lua/5.1/loadall.so" + ":" + this.getFilesDir().getAbsolutePath() 
+"/lua/lib/lua/5.1/?/init.sl" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/lib/lua/5.1/?/?.so");

environmentVariables.put("LUA_PATH", this.getFilesDir().getAbsolutePath() + 
"/lua/share/lua/5.1/?/?.lua" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/share/lua/5.1/?.lua" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/share/lua/5.1/?/init.lua" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/lib/lua/5.1/?.lua" + ":" + this.getFilesDir().getAbsolutePath() + 
"/lua/lib/lua/5.1/?/init.lua");

That should be all.

Original comment by anthony....@gmail.com on 3 Jun 2013 at 7:00

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

No branches or pull requests

1 participant