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
2
Question by kingdutka · Mar 23, 2012 at 03:04 AM · androidcallssuspend

Android Help - How to suspend the game during a phone call?

I was play testing my game and had my wife call me. After pressing the "Answer" button to answer the call about 10 times with no results, all of a sudden it finally answered the call. When I ended the call with the "End Call" button, my game was back on the main menu... There is nothing in my code that would make that happen. (If I had failed the level, I should've at least seen the "Game Over" screen).

So how can I properly suspend the game when I receive an incoming call and pickup exactly where I left off when the call is ended? Or even better, when the call is ended, make the player click a 'Resume' button (it's an action game so better make sure they are ready!)

Comment
Add comment · Show 4
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 BerggreenDK · Mar 23, 2012 at 02:35 PM 0
Share

rather important question, looking forward to see some answers

avatar image kingdutka · Mar 23, 2012 at 05:20 PM 0
Share

I just noticed on my phone that I got a notification that I actually "$$anonymous$$issed" that call... Not sure how my phone thinks I missed the call even though it did actually (eventually) connect me...

avatar image IndieScapeGames · Mar 27, 2012 at 12:20 AM 0
Share

Good question. I don't have an android phone so I'm unable to test it myself.

avatar image ABerlemont · Nov 17, 2017 at 09:55 AM 0
Share

Anyone found a solution for this ?

1 Reply

· Add your reply
  • Sort: 
avatar image
3

Answer by rutter · Mar 23, 2012 at 06:10 PM

In your player settings, make sure that "run in background" is not set.

Unity will call OnApplicationPause() on all of your MonoBehaviours when the player is paused (for example, by receiving a phone call). You could use this to bring up a pause menu.

Comment
Add comment · Show 3 · 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 kingdutka · Mar 23, 2012 at 08:23 PM 0
Share

There is no "Run in background" checkbox for the Android settings. I see it for "Web Player" and "PC and $$anonymous$$ac Standalone" builds but not for Android.

avatar image kingdutka · Mar 27, 2012 at 12:11 AM 0
Share

I did find 'Application.runInBackground = false;' which I placed in my 'Awake()' function for my main menu AND my level 1 main script but got the exact same results.

Still need help with this ASAP!

avatar image BerggreenDK · Mar 27, 2012 at 10:22 PM 0
Share

You need free help ASAP? cool, I need money ASAP wanna swap?

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

7 People are following this question.

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

Related Questions

Does the application have to suspend? 2 Answers

Unity Android Suspend/Resume and Quit behaviour 1 Answer

Restart Game on Resume (Android) 0 Answers

black screen after the first play on android 0 Answers

lightmap comes out blurry on android device 0 Answers


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