Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by paulaceccon · Dec 05, 2012 at 12:53 PM · androidmessagequit

Quit Application on Android

Hi.

I would like to know if there is a way to call the standard Quit function on Android. I know that I can quit an application use the Application.Quit and the Escape button. But this just close the application, without confirm if that is what the user really wants. So, I would like to display a message like this:

alt text

This style is completely different from the game style, so, it seems to me that it was call a Android function, I don't know...

Well, anyway, this is what I would like to do. This is possible?

Thanks.

2012-12-05 10.45.44.jpg (84.6 kB)
Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Psymon · Dec 05, 2012 at 12:58 PM 0
Share

I'm not sure but it seems you have to make a plugin which will call the Alertdialog of Android : http://developer.android.com/reference/android/app/AlertDialog.Builder.html

avatar image Landern · Dec 05, 2012 at 01:19 PM 0
Share

Why not just present the user with some unity GUI, if they touch/press/click exit, then execute the application quit, otherwise, close/hide the unity GUI.

avatar image paulaceccon · Dec 05, 2012 at 01:21 PM 1
Share

This is what I have done. I am just wondering if there is a easy way to show this Yes/No that most game show (with Android style), without making more Unity GUI.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Paulius-Liekis · Dec 05, 2012 at 01:26 PM

IIRC, Prime31 plugins give you functionality to show these basic dialogs.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Landern · Dec 05, 2012 at 01:56 PM

You can create your own plugin for android, but you will have to dig out the correct code to end the Unity Activity on the device. Here is the documentation, will take a little more work, but i'm sure you can manage.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Touch a box collider, quit the game. (2D) 1 Answer

Application.quit() not working on android 5 Answers

Proper way for Quit Application 2 Answers

Application.CancelQuit doest not work.,Application.CancelQuit doest not work 1 Answer

Androud quit on doubletap escape 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges