Index: /issm/trunk-jpl/src/android/ISSM/.classpath
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/.classpath	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/.classpath	(revision 13890)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="src" path="gen"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+	<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
+	<classpathentry kind="output" path="bin/classes"/>
+</classpath>
Index: /issm/trunk-jpl/src/android/ISSM/.project
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/.project	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/.project	(revision 13890)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>ISSM</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.android.ide.eclipse.adt.ApkBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>
Index: /issm/trunk-jpl/src/android/ISSM/AndroidManifest.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/AndroidManifest.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/AndroidManifest.xml	(revision 13890)
@@ -0,0 +1,25 @@
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="com.example.issm"
+    android:versionCode="1"
+    android:versionName="1.0" >
+
+    <uses-sdk
+        android:minSdkVersion="15"
+        android:targetSdkVersion="15" />
+
+    <application
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".ISSM"
+            android:label="@string/title_activity_issm" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+</manifest>
Index: /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/BuildConfig.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/BuildConfig.java	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/BuildConfig.java	(revision 13890)
@@ -0,0 +1,6 @@
+/** Automatically generated file. DO NOT MODIFY */
+package com.example.issm;
+
+public final class BuildConfig {
+    public final static boolean DEBUG = true;
+}
Index: /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/R.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/R.java	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/gen/com/example/issm/R.java	(revision 13890)
@@ -0,0 +1,43 @@
+/* AUTO-GENERATED FILE.  DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found.  It
+ * should not be modified by hand.
+ */
+
+package com.example.issm;
+
+public final class R {
+    public static final class attr {
+    }
+    public static final class dimen {
+        public static final int padding_large=0x7f040002;
+        public static final int padding_medium=0x7f040001;
+        public static final int padding_small=0x7f040000;
+    }
+    public static final class drawable {
+        public static final int ic_action_search=0x7f020000;
+        public static final int ic_launcher=0x7f020001;
+    }
+    public static final class id {
+        public static final int button1=0x7f080001;
+        public static final int input=0x7f080000;
+        public static final int menu_settings=0x7f080003;
+        public static final int output=0x7f080002;
+    }
+    public static final class layout {
+        public static final int activity_issm=0x7f030000;
+    }
+    public static final class menu {
+        public static final int activity_issm=0x7f070000;
+    }
+    public static final class string {
+        public static final int app_name=0x7f050000;
+        public static final int hello_world=0x7f050001;
+        public static final int menu_settings=0x7f050002;
+        public static final int title_activity_issm=0x7f050003;
+    }
+    public static final class style {
+        public static final int AppTheme=0x7f060000;
+    }
+}
Index: /issm/trunk-jpl/src/android/ISSM/jni/Android.mk
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/Android.mk	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/jni/Android.mk	(revision 13890)
@@ -0,0 +1,19 @@
+LOCAL_PATH:= $(call my-dir)
+my_LOCAL_PATH:=$(LOCAL_PATH)
+
+#include $(LOCAL_PATH)/issmlib\Android.mk
+include $(call all-subdir-makefiles)
+
+
+LOCAL_PATH := $(my_LOCAL_PATH)
+
+include $(CLEAR_VARS)
+LOCAL_PATH := $(my_LOCAL_PATH)
+LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
+LOCAL_CFLAGS := -Wno-psabi
+LOCAL_LDLIBS := -llog -ldl
+LOCAL_MODULE := FacLib
+LOCAL_SRC_FILES := Main.cpp 
+LOCAL_STATIC_LIBRARIES := libISSMCore
+
+include $(BUILD_SHARED_LIBRARY)
Index: /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/jni/Main.cpp	(revision 13890)
@@ -0,0 +1,11 @@
+#include "./issmlib/include/fac.h"
+#include "com_example_issm_FacLib.h"
+#include <cstddef>
+
+JNIEXPORT jlong JNICALL Java_com_example_issm_FacLib_fac(JNIEnv *env, jclass clazz, jlong n)
+{
+	fac *f = new fac();
+	jlong result = (jlong) (f->factorial(n));
+	delete(f);
+	return (jlong) result;
+}
Index: /issm/trunk-jpl/src/android/ISSM/jni/com_example_issm_FacLib.h
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/com_example_issm_FacLib.h	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/jni/com_example_issm_FacLib.h	(revision 13890)
@@ -0,0 +1,21 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+#include <jni.h>
+/* Header for class com_example_issm_FacLib */
+
+#ifndef _Included_com_example_issm_FacLib
+#define _Included_com_example_issm_FacLib
+#ifdef __cplusplus
+extern "C" {
+#endif
+/*
+ * Class:     com_example_issm_FacLib
+ * Method:    fac
+ * Signature: (J)J
+ */
+JNIEXPORT jlong JNICALL Java_com_example_issm_FacLib_fac
+  (JNIEnv *, jclass, jlong);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
Index: /issm/trunk-jpl/src/android/ISSM/jni/issmlib/Android.mk
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/issmlib/Android.mk	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/jni/issmlib/Android.mk	(revision 13890)
@@ -0,0 +1,6 @@
+LOCAL_PATH:= $(call my-dir)
+include $(CLEAR_VARS)
+LOCAL_MODULE    := libISSMCore
+LOCAL_SRC_FILES := libISSMCore.a
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/include
+include $(PREBUILT_STATIC_LIBRARY)
Index: /issm/trunk-jpl/src/android/ISSM/jni/issmlib/include/fac.h
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/jni/issmlib/include/fac.h	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/jni/issmlib/include/fac.h	(revision 13890)
@@ -0,0 +1,5 @@
+class fac
+{
+	public:
+	long factorial(long n);
+};
Index: /issm/trunk-jpl/src/android/ISSM/obj/local/armeabi/objs/FacLib/Main.o.d
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/obj/local/armeabi/objs/FacLib/Main.o.d	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/obj/local/armeabi/objs/FacLib/Main.o.d	(revision 13890)
@@ -0,0 +1,14 @@
+/Users/larour/issm-uci/trunk-jpl/src/android/ISSM/obj/local/armeabi/objs/FacLib/Main.o: \
+ /Users/larour/issm-uci/trunk-jpl/src/android/ISSM/jni/Main.cpp \
+ /Users/larour/issm-uci/trunk-jpl/src/android/ISSM/jni/./issmlib/include/fac.h \
+ /Users/larour/issm-uci/trunk-jpl/src/android/ISSM/jni/com_example_issm_FacLib.h \
+ /Users/larour/issm-uci/trunk-jpl/externalpackages/android/android-ndk/install/platforms/android-14/arch-arm/usr/include/jni.h \
+ /Users/larour/issm-uci/trunk-jpl/externalpackages/android/android-ndk/install/sources/cxx-stl/system/include/cstddef
+
+/Users/larour/issm-uci/trunk-jpl/src/android/ISSM/jni/./issmlib/include/fac.h:
+
+/Users/larour/issm-uci/trunk-jpl/src/android/ISSM/jni/com_example_issm_FacLib.h:
+
+/Users/larour/issm-uci/trunk-jpl/externalpackages/android/android-ndk/install/platforms/android-14/arch-arm/usr/include/jni.h:
+
+/Users/larour/issm-uci/trunk-jpl/externalpackages/android/android-ndk/install/sources/cxx-stl/system/include/cstddef:
Index: /issm/trunk-jpl/src/android/ISSM/proguard-project.txt
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/proguard-project.txt	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/proguard-project.txt	(revision 13890)
@@ -0,0 +1,20 @@
+# To enable ProGuard in your project, edit project.properties
+# to define the proguard.config property as described in that file.
+#
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in ${sdk.dir}/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the ProGuard
+# include property in project.properties.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}
Index: /issm/trunk-jpl/src/android/ISSM/project.properties
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/project.properties	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/project.properties	(revision 13890)
@@ -0,0 +1,14 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-15
Index: /issm/trunk-jpl/src/android/ISSM/res/layout/activity_issm.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/layout/activity_issm.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/layout/activity_issm.xml	(revision 13890)
@@ -0,0 +1,33 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent" >
+
+    <EditText
+        android:id="@+id/input"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:ems="10"
+        android:inputType="number" />
+
+    <Button
+        android:id="@+id/button1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignRight="@+id/input"
+        android:layout_below="@+id/input"
+        android:layout_marginRight="46dp"
+        android:layout_marginTop="23dp"
+        android:text="calculate" />
+
+    <TextView
+        android:id="@+id/output"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_alignParentLeft="true"
+        android:layout_below="@+id/button1"
+        android:layout_marginTop="39dp"
+        android:textSize="20sp" />
+
+</RelativeLayout>
Index: /issm/trunk-jpl/src/android/ISSM/res/menu/activity_issm.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/menu/activity_issm.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/menu/activity_issm.xml	(revision 13890)
@@ -0,0 +1,6 @@
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/menu_settings"
+        android:title="@string/menu_settings"
+        android:orderInCategory="100"
+        android:showAsAction="never" />
+</menu>
Index: /issm/trunk-jpl/src/android/ISSM/res/values-large/dimens.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values-large/dimens.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values-large/dimens.xml	(revision 13890)
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">16dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/res/values-v11/styles.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values-v11/styles.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values-v11/styles.xml	(revision 13890)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/res/values-v14/styles.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values-v14/styles.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values-v14/styles.xml	(revision 13890)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar" />
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/res/values/dimens.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values/dimens.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values/dimens.xml	(revision 13890)
@@ -0,0 +1,7 @@
+<resources>
+
+    <dimen name="padding_small">8dp</dimen>
+    <dimen name="padding_medium">8dp</dimen>
+    <dimen name="padding_large">16dp</dimen>
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/res/values/strings.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values/strings.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values/strings.xml	(revision 13890)
@@ -0,0 +1,8 @@
+<resources>
+
+    <string name="app_name">ISSM</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="menu_settings">Settings</string>
+    <string name="title_activity_issm">ISSM</string>
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/res/values/styles.xml
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/res/values/styles.xml	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/res/values/styles.xml	(revision 13890)
@@ -0,0 +1,5 @@
+<resources>
+
+    <style name="AppTheme" parent="android:Theme.Light" />
+
+</resources>
Index: /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/FacLib.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/FacLib.java	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/FacLib.java	(revision 13890)
@@ -0,0 +1,13 @@
+package com.example.issm;
+
+public class FacLib
+{
+	public static native long fac(long n);
+	static {
+        System.loadLibrary("FacLib");
+    }
+	public static long facIterative(long n)
+	{
+		return fac(n);
+	}
+}
Index: /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java
===================================================================
--- /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java	(revision 13890)
+++ /issm/trunk-jpl/src/android/ISSM/src/com/example/issm/ISSM.java	(revision 13890)
@@ -0,0 +1,39 @@
+package com.example.issm;
+
+import android.os.Bundle;
+import android.app.Activity;
+import android.text.TextUtils;
+import android.view.Menu;
+import android.view.View;
+import android.view.View.OnClickListener;
+import android.widget.Button;
+import android.widget.EditText;
+import android.widget.TextView;
+
+
+public class ISSM extends Activity implements OnClickListener {
+	private EditText input;
+	private TextView output;
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_issm);
+        this.input  = (EditText) super.findViewById(R.id.input);
+        this.output  = (TextView) super.findViewById(R.id.output);
+        Button button = (Button) super.findViewById(R.id.button1);
+        button.setOnClickListener(this);
+        
+    }
+    
+	public void onClick(View view) 
+	{
+		// TODO Auto-generated method stub
+		String input = this.input.getText().toString();
+		if(TextUtils.isEmpty(input))
+		{
+			return;
+		}
+		long result = FacLib.facIterative(Long.parseLong(input));
+		this.output.setText("Result = " + result + "\n");
+	}
+}
