examples/java_androidnative1/app/app/src/main/java/com/angr/nativetest1/MainActivity.java
package com.angr.nativetest1;


import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

public class MainActivity extends Activity {

    // Used to load the 'native-lib' library on application startup.
    static {
        System.loadLibrary("native-lib");
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        TextView tv = (TextView) findViewById(R.id.sample_text);
        int a = 17;
        int b = 13;
        int c = multiply(a, b);
        tv.setText(String.valueOf(c));
    }

    /**
     * A native method that is implemented by the 'native-lib' native library,
     * which is packaged with this application.
     */
    public native String stringFromJNI();
    public native int multiply(int a, int b);
}
