Skip to content

Commit

Permalink
Clean up Android docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ibell committed Mar 13, 2016
1 parent 194665a commit 0213bc5
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions Web/coolprop/wrappers/Android/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -29,27 +29,33 @@ Linux & OSX
* Install NDK from here: https://developer.android.com/ndk/downloads/index.html

* To Build

- Check out the sources for CoolProp git clone https://github.com/CoolProp/CoolProp --recursive
- Open the CMakeLists.txt file in the CoolProp directory for editing
- Within the COOLPROP_ANDROID_MODULE modify the command: set(ANDROID_PACKAGE_NAME "CoolProp") to reflect your package name
- Make and move into a build folder
mkdir -p CoolProp/build && cd CoolProp/build
- If a target architecture other than the default (armeabi) is desired, the ndk-build can be modified by editing wrappers/Android/Android.mk.template. For details see https://developer.android.com/ndk/guides/index.html
- Construct the makefile using CMake
cmake .. -DCOOLPROP_ANDROID_MODULE=ON -DNDK_PATH=~/Downloads/android-ndk-r10e (change path based on your installation)
- Now actually do the build
cmake --build .

- Check out the sources for CoolProp::
git clone https://github.com/CoolProp/CoolProp --recursive
- Open the CMakeLists.txt file in the CoolProp directory for editing
- Within the COOLPROP_ANDROID_MODULE modify the command: ``set(ANDROID_PACKAGE_NAME "CoolProp")`` to reflect your package name
- Make and move into a build folder::
mkdir -p CoolProp/build && cd CoolProp/build
- If a target architecture other than the default (armeabi) is desired, the ndk-build can be modified by editing wrappers/Android/Android.mk.template. For details see https://developer.android.com/ndk/guides/index.html
- Construct the makefile using CMake::
cmake .. -DCOOLPROP_ANDROID_MODULE=ON -DNDK_PATH=~/Downloads/android-ndk-r10e (change path based on your installation)
- Now actually do the build::
cmake --build .

* To Incorporate into an Android Studio Project
- Copy the java files from the package directory (i.e build/com/example/myprogram) to the pacakge directory of the android proejct
- Copy the the build/libs/armeabi folder containing the .so file to the app/src/main/jniLibs folder of the Android Project (you may have create the jniLibs folder).
- In the main activity of the Android Project add the code below so the CoolProp functions can be called as described in the java wrapper documentation.
- In the main activity of the Android Project add the code below so the CoolProp functions can be called as described in the java wrapper documentation::

static {
System.loadLibrary("CoolProp");
}
static {
System.loadLibrary("CoolProp");
}


Example Code
Expand Down

0 comments on commit 0213bc5

Please sign in to comment.