• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android - back button from a send-intent closes application

Yvano

Lurker
i have a drawer menu, when i press one of its buttons to start a sharing intent as below:

Code:
Intent iFriends = new Intent(Intent.ACTION_SEND);
iFriends.setType("text/plain");
iFriends.putExtra(Intent.EXTRA_TEXT, "http://www.liveplus.mobi");
iFriends.createChooser(iFriends, "Invite Friends");
startActivity(iFriends);

The sharing dialog appears, but if i press the back button, the whole application exits!

any idea!
 
Hey Yvano,

I think your best course of action would be to view the logcat at the time of your issue (guessing you're getting an FC (force-close)).

That should help narrow-down where and what your issue is.

The Eclipse IDE has a logcat window and you can also use "adb logcat" from the command line from your Android SDK.

Cheers and best of luck with your debugging :thumbup:.

:)

P.S. I added 'code' tags in place of your 'high' tags to get it to display the code properly (I think there's a current, known issue with the HIGH tags not working)
 
Back
Top Bottom