johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.31k stars 564 forks source link

starting an activity for result #70

Closed efefes closed 12 years ago

efefes commented 12 years ago

I want to add buttons for the camera and gallery intents, but I need to use startActivityForResult for them. I changed the code around a bit, casted the mContext as an activity which seems to run the camera intent, but not the gallery intent. Also it's not delivering any return code to the HomeActivity, onActivityResult never gets called.

There must be some better way of doing this which I've missed completely, could someone please tell me how to add these two intent starters to the quickbar so that I can use their results in the mainactivity.

johannilsson commented 12 years ago

This would be done just as you normally do a startActivityForResult. But instead of using the IntentAction you must implement your own action and performAction method to fire off the startActivityForResult. Result will come back a usual. No idea how the camera and gallery intents works though.