Accessing Class level stuff from an inner Class
<p>Sorry if the title is kinda confusing, and if the Android tags don't really belong, I thought I would add them in since this is for an Android application.</p>

<p>What I want to do, is be able to access the object neoApi inside the Neoseeker class, from its inner class RunningTimer.  Now, in my code, you can see what I would think to work, but when I run my application, nothing pops up.  Nothing inside my TextView, no Toast, nothing at all.  How can I remedy this?  Thanks!</p>

<pre><code>package com.neoseeker.android.app;

import java.util.Timer;
import java.util.TimerTask;

import org.json.JSONObject;

import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;
import android.widget.Toast;

public class Neoseeker extends Activity {

    NeoAPI neoApi = new NeoAPI();
    Timer timer = new Timer();

    TextView text;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        // Set up Timer
        timer.scheduleAtFixedRate(new RunningTimer(), 0, 1000 * 60 * 3); // Runs every 3 minutes

        text = (TextView) findViewById(R.id.text);

    }

    /**
     * Causes a status bar notification
     * @param contentText The text to display to describe the notification
     */
    public void causeNotification(CharSequence contentText) {
        String ns = Context.NOTIFICATION_SERVICE;
        NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
        int icon = R.drawable.icon;
        CharSequence tickerText = "Neoseeker";
        long when = System.currentTimeMillis();

        Notification notification = new Notification(icon, tickerText, when);
        notification.defaults |= Notification.DEFAULT_ALL;
        notification.defaults |= Notification.FLAG_AUTO_CANCEL;

        Context context = getApplicationContext();
        CharSequence contentTitle = "Neoseeker";
        Intent notificationIntent = new Intent();
        PendingIntent contentIntent = PendingIntent.getActivity(Neoseeker.this, 0, notificationIntent, 0);

        notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
        int NEOSEEKER_ID = 125468131; // Random ID?

        mNotificationManager.notify(NEOSEEKER_ID, notification);
    }

    class RunningTimer extends TimerTask {

        boolean sent_notification = false;
        int unread_pm_count_at_last_check = 0;
        public void run() {
            /*
            int unread = Neoseeker.this.neoApi.getPmUnread();
            if (unread &gt; 0) {
                if (!sent_notification) {
                    Neoseeker.this.causeNotification("You have " + unread + " private message" + ((unread &gt; 1) ? "s." ? "."));
                }
            }
            */
            int unread = Neoseeker.this.neoApi.getPmUnread();
            Toast.makeText(Neoseeker.this, "new: " + unread, Toast.LENGTH_SHORT).show();
            Neoseeker.this.text.setText("this is the text! " + unread);
        }
    }
}
</code></pre>
