Adam Snaider | 1c095c9 | 2023-07-08 02:09:58 -0400 | [diff] [blame^] | 1 | package com.example.androidapp; |
| 2 | |
| 3 | import android.app.Activity; |
| 4 | import android.os.Bundle; |
| 5 | import android.util.Log; |
| 6 | import android.widget.TextView; |
| 7 | |
| 8 | public 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 | } |