how to call method in another activity
<p>I should call a method from a activity to another activity. my firstclass is:</p>

<pre><code>public class firstclass extends Activity {
    public String Kind(){
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
    boolean Key = preferences.getBoolean("Key", true);
    if(Key){
        name="you";
    }
    else{
        name="me";
    }
    return name;
    }
}
</code></pre>

<p>secondclass is:</p>

<pre><code>public class secondclass extends Activity {
    public void take(String token, int transactionId) {
        firstclass first = new firstclass(); //error in this class
        first.Kind();
   }
}
</code></pre>

<p>My error is:</p>

<pre><code>03-25 19:05:39.082    5421-5487/com.example.com E/AndroidRuntime﹕ FATAL          EXCEPTION: pool-5-thread-1
java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
        at android.os.Handler.&lt;init&gt;(Handler.java:197)
        at android.os.Handler.&lt;init&gt;(Handler.java:111)
        at android.app.Activity.&lt;init&gt;(Activity.java:759)
        at com.example.com.firstclass&lt;init&gt;(firstclass.java:17)
        at com.example.com.secondclass(secondclass.java:157)
</code></pre>