Using a different class in Android Studio : <p>HOw do you use a method in a different class from the one you're calling it from in Android Studio? I have the following main class:</p>

<pre><code>package com.example.bluebus;


import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.TextView;

import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;

import static java.util.concurrent.TimeUnit.SECONDS;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        BeeperControl test = new BeeperControl();
        //test.test();
        //test.test();*/

    }
}
</code></pre>

<p>and in the same folder I have the following BeeperControl class:</p>

<pre><code>import java.util.concurrent.ScheduledFuture;

import static java.util.concurrent.TimeUnit.SECONDS;

/**
 * Created by Arthur on 1/7/2017.
 */

public class BeeperControl extends AppCompatActivity {
        /*private final ScheduledExecutorService scheduler =
                Executors.newScheduledThreadPool(1);*/
        final TextView text = (TextView) findViewById(R.id.text);
    /*
        public void beepForAnHour() {
            final Runnable beeper = new Runnable() {
                public void run() {
                    text.setText("Hello!");
                }
            };
            final ScheduledFuture&lt;?&gt; beeperHandle =
                    scheduler.scheduleAtFixedRate(beeper, 0, 1, SECONDS);
            scheduler.schedule(new Runnable() {
                public void run() { beeperHandle.cancel(true); }
            }, 60 * 60, SECONDS);
        }*/
        public void test(){
            text.setText("Who are you?");
        }
}
</code></pre>

<p>When written as is, the app works fine. However, when I uncomment test.test(), the app keeps closing when I try to run it in an emulator. From what I've seen, it may be a problem with updating the manifest, but I'm not sure how to fix it. Any help will be appreciated!</p>
