Updating Twitter Status using JTwitter
<p>I am trying to write a code in android that would help update my twitter status from within my app, but am having problems with it.Below is the code snippet</p>

<pre><code>public void onClick(View v) {
        String statusText = edit.getText().toString();
        new PostToTwitter().execute(statusText);

    }

    public static String getLogtag() {
        return LOGTAG;
    }

    class PostToTwitter extends AsyncTask&lt;String, Void, String&gt; {

        @Override
        protected String doInBackground(String... params) {
            try{
            Twitter twitter = new Twitter("screenname", "password");
            // twitter.getStatus("winterstein");
            twitter.setAPIRootUrl("https://twitter.com/#!/nindevworks");
            twitter.setStatus(params[0]);
            Log.d(TweetActivity.getLogtag(),"Successfully Posted: " + params[0]);
            return "Successfully Posted: " + params[0];
            }catch (TwitterException e) {
                Log.e(TweetActivity.getLogtag(),"Died ", e);
                e.printStackTrace();
                return "Failed Posting: " + params[0];
            }

        }

        @Override
        protected void onPostExecute(String result) {
            // TODO Auto-generated method stub
            super.onPostExecute(result);
                Toast.makeText(TweetActivity.this, "result " + result ,Toast.LENGTH_SHORT).show();

        }

    }
</code></pre>

<p>And please could someone explain this portio</p>
