Best way to get started developing programs for Replicant
i am trying to learn how to make programs for Replicant Android/Linux
so what would be the best way to start?
if possible i would prefer to use a language other than Java but its not a problem if i cant
Thanks in advance.
Relevant to this - I've been having trouble getting the SDK to build. Specifically, after following all the steps through to "../tools/repo sync" for Replicant 4.2, I get this:
Fetching project replicant/kernel/goldelico/gta04 remote: Counting objects: 3239266, done. remote: Compressing objects: 100% (487697/487697), done. remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed remote: Counting objects: 3239266, done. remote: Compressing objects: 100% (487697/487697), done. remote: aborting due to possible repository corruption on the remote side. fatal: early EOF fatal: index-pack failed error: Cannot fetch replicant/kernel/goldelico/gta04 error: Exited sync due to fetch errors
What's going on and how can I fix it?
RE: Best way to get started developing programs for Replicant - Added by Joshua Bowren over 4 years ago
To my understanding Replicant applications run in pretty much the same way Android applications do. The traditional application extends the "Activity" class which is launched by Replicant when touching the application icon on your phone.
In order to write Replicant/Android Applications you will need the SDK. Instructions for installing at: http://redmine.replicant.us/projects/replicant/wiki/SDK
Since Replicant is based on Android it would be helpful to know a bit of history. The Android API developers initially wanted developers to program applications only in Java. Of course since Android uses Linux, native ELF binaries were still able to be run, but without access to the Android framework. Later the Android API developers released what they call the NDK (Native Development Kit) which provides a native API. However native applications are still sand boxed in much the same way as Android Java applications. To my understanding they both launch an instance of Dalvik (later versions of Android added a new runtime ART) even though for native applications it is unnecessary.
The NDK sources are typically released with AOSP and then a binary distribution is formally made. For Replicant there is no binary distribution as of yet, but you should be able to use the NDK sources in the Replicant source tree. If this is too much of a hassle, maybe it would be better to start with Java Replicant applications. I should also note that the GUI widgets and a large part of the API is missing from the NDK. To access parts of the API only available in the Java API you could use the JNI (Java Native Interface) to call native functions from Java code.
I speak mainly from experience writing Android applications, but Replicant applications do not really run differently. Replicant applications should run on Android and vice versa.