Joanne
Joanne

Reputation: 1236

android: return to Gallery after images are uploaded (any function substituting "back" button activity?)

My app is a simple uploader built for uploading image to web services.

User goes to the Gallery and uploads the images by pressing "Share" -> my app. After uploaded, user gets a blank page and have to press "back" button to leave my app after the images are uploaded.

But I don't want user to press back button every time after upload the images.

Any idea how can I do that?

Upvotes: 0

Views: 150

Answers (2)

Adnan Zahid
Adnan Zahid

Reputation: 583

Simply type onBackPressed() when uploading is finished.

Upvotes: 0

Joanne
Joanne

Reputation: 1236

I found the answer myself.

Adding finish(); after the upload activity will work.

Upvotes: 2

Related Questions