That's more or less what I have. The doSomething() method is called
for the second time when orientation changes because activity is
recreated.

public class MyActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Intent intent = getIntent();
        String action = intent.getAction();

        if (Intent.ACTION_SEND.equals(action)) {
            Log.d(TAG, "Handling intent from another application");
            doSomething();
        }
}
}

My question then is whether there's any common practice to prevent
handling of that intent again.

On 25 Maj, 23:08, TreKing <[email protected]> wrote:
> On Fri, May 25, 2012 at 4:04 PM, pbuda <[email protected]> wrote:
> > Everything works as expected, however when orientation changes, the intent
> > is handled again.
>
> Can you be more specific? Like the sequence of events that occur and what
> you see in your code when "the intent is handled again"?
>
> --------------------------------------------------------------------------- 
> ----------------------
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to