blob: 9baf60262136180208c846d1d058630e5ba51650 [file] [log] [blame]
Adam Snaider1c095c92023-07-08 02:09:58 -04001package com.example.androidapp;
2
3import android.app.Activity;
4import android.os.Bundle;
5import android.util.Log;
6import android.widget.TextView;
7
8public class AndroidMain extends Activity {
9 @Override
10 public void onCreate(Bundle savedInstanceState) {
11 super.onCreate(savedInstanceState);
12 setContentView(R.layout.android_main);
13
14 Log.v("Bazel", "Android app launched");
15 System.loadLibrary("android_app"); // 'android_app' is the name of the native library in this example
16 Log.v("Bazel", "Value from rust: " + JniShim.getValue());
17
18 final TextView helloTextView = (TextView) findViewById(R.id.text_view);
19 helloTextView.setText("Value from rust: " + JniShim.getValue());
20 }
21}