Q:

EditText views don't receive string data from intent on android 2.3

The following code works on an emulator set to a recent (4..) android version, but not on a real Galaxy I running android 2.3.
how can I make my app work on the older version too?
    Intent callingIntent = getIntent();
    //check if it was an Edit/GetContent action
            if (callingIntent.getAction() == Intent.ACTION_EDIT){

                EditText editSubject = (EditText) findViewById(R.id.editText1);
                EditText editBody = (EditText) findViewById(R.id.editText2);

                //get data:

                String body = callingIntent.getStringExtra("body");
                String subject = callingIntent.getStringExtra("subject");
                //show data:
                editSubject.setText(subject);
                editBody.setText(body);

            }

A:

It's a simple thing really, but can be tricky to find... had the same thing.
Intent Actions are actually String.
For example:
Intent.ACTION_EDIT = "android.intent.action.EDIT"
Intent.ACTION_VIEW = "android.intent.action.VIEW"
etc.
In java Strings must be compared using
someText.equals(someOtherText) 
and not 
(someText == someOtherText)
(Same goes for any other object really, the == operator only works for primitives - int,float,bool etc.)
The == operator can work sometimes on strings and sometimes not,
so it's a very annoying bug to find...

