JTwitter JAVA API - **statusText** varailble error: " cannot be resolved "

105 Views Asked by At
package com.example.yamba;

import winterwell.jtwitter.Twitter;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;

import com.example.yamba.R.id;

public class StatusActivity extends Activity implements OnClickListener {


    EditText editStatus;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.status);


    editStatus = (EditText) findViewById(id.edit_status);

    }


    public void onClick(View v) {
        String newStatus = editStatus.getText().toString();
        Twitter twitter = new Twitter("student", "password");
        twitter.setAPIRootUrl("http://yamba.marakana.com/api");
        twitter.setStatus(**statusText**);
        Log.d("StatusActivity", "ok: " + newStatus);

    }

}

This line : twitter.setStatus(statusText) makes me trouble.

the statusText gives me an error of : statusText cannot be resolved as a variable. I have downloaded the Jtwitter API . and added it to my app folder. Everything seems to be fine except this variable. Any one as an idea what is the problem?

1

There are 1 best solutions below

0
On

The statusText variable is not defined. Use

twitter.setStatus(newStatus);