Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Android
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Android
Application close when back button is pressed
Jeyaganeshan Jeyatharsini
Greenhorn
Posts: 29
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I opened browser from my application. To do that I finish my activity. If not app crashes. But now when I press back button my whole application closes. How to avoid it?
Ulf Dittmer
Rancher
Posts: 43081
77
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If you don't want the app to close, why are you finishing the activity? That's the consequence.
Jeyaganeshan Jeyatharsini
Greenhorn
Posts: 29
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
But if I don't close, then application crashes... how to resolve it?
Dave Tolls
Rancher
Posts: 4801
50
posted 9 years ago
1
Number of slices to send:
Optional 'thank-you' note:
Send
Jeyaganeshan Jeyatharsini wrote:
But if I don't close, then application crashes... how to resolve it?
Then that is your problem, not the back button one.
What error shows up in your logs?
Jeyaganeshan Jeyatharsini
Greenhorn
Posts: 29
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
can't I use flags constants? If so which constant?
Ulf Dittmer
Rancher
Posts: 43081
77
posted 9 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
No, you need to investigate why the app crashes, as Dave suggested. Start by answering the question he asked - post the full stack trace here.
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
StackOverflowError while navigating between activities of ActivityGroup
JFrame
IE9 browser crashes if we close the window before it finishes loading
Identifying back button press
how to close an android application
More...