views:

526

answers:

3

Hi all,

I have a desktop application using git for synchronization. I have also an android application which do the same as the desktop, but I don't know how to do the synchronization part on it. I haven't found any implementation of git on android. I found a jgit, but its unwell documented and I was not able to do even a commit with that.

I was thinking about remote commands to my git server from my android app, but this is really a tease for me. Could you tell me if any other git implementation which can be used on android exists? If you have any idea how to solve that, please tell me.

Thanks for reply,

Dave

A: 

This is how I would do it:

Well you likely want to define an interface for your synchronization needs.

You implement this interface in C for both desktop and android device (with the help of the NDK) by making the implementation use git (native).

Then, for the Android app, you code a JNI layer on top so that it exposes the interface to Java.

The tricky part would be to have the different git commands compile for Android: you'll have to rewrite makefiles.

Gregory Pakosz
+2  A: 

Another option is using ASE. There seems to be a full-featured pure python implementation of git at https://launchpad.net/dulwich.

rascalking
but how to install dulwich on ASE? ASE is just for scripts, it cant be used for run real applications, at least not yetI ve tried it, but module distutils.core not found....
Dave
From http://code.google.com/p/android-scripting/wiki/FAQ:Can I install other Python modules?Yes. Many pure Python modules will work if you simply add them to /sdcard/ase/extras/python as long as they don't depend on any C Python modules that aren't included with ASE. You can, of course, cross compile your own C Python modules. But, that's not for the faint of heart.Python eggs will need to be manually installed. That is, you will need to copy the Python modules to their appropriate location manually. ASE does not support easy_install.
rascalking
A: 

JGit - http://eclipse.org/jgit/

tianon