• 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 JINNEE-0419 · Apr 27, 2013 at 11:32 AM · andoridunityplayer

Application quit without ending other activities on Android

I had build a Android game using Unity3D, and I added an Advertisement SDK into my game by integrating Eclipse with Unity3D, the SDK required several activities, services and receiver w$$anonymous$$ch are declared in Androidmanifest.xml.

The Advertisement activities needs to run after my game is quit.

Now the problem is, when the UnityPlayer.Quit() is called, it seems every activities associated is shut down by unity.

To solve t$$anonymous$$s, I change UnityPlayer.Quit() w$$anonymous$$ch is called in onDestroy() to t$$anonymous$$s.finish(), but another problem comes. When I open my game again, it just closed immediate, and I have to open it once again to start it normally.

Can anyone tell me how to solve t$$anonymous$$s?

Thanks!

Comment
Add comment · Show 1
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 CarpetHead · Nov 22, 2013 at 12:46 PM 0
Share

I'm having the same problem. did you ever solve this?

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Wiki

Answer by Onzzzy · Apr 27, 2013 at 01:23 PM

You could try run it in background. File > Build Settings> Player Settings > Click the downwards arrow button > Run in background.

T$$anonymous$$s might work for you.

Comment
Add comment · Show 1 · 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 JINNEE-0419 · Apr 27, 2013 at 04:16 PM 0
Share

Thank you for your replay. Unfortunately there is no Run in background option on Android platform. And I don't want my entire game running in background. What I want is, when the UnityPlayer quit, it release all the resources as normal, but without killing other activities and services.

avatar image
0

Answer by meat5000 · Nov 22, 2013 at 01:03 PM

According to Google, you can have multiple apps w$$anonymous$$ch share data between each other if they share a Key. You could in theory use t$$anonymous$$s to your advantage if you use a silent install for the AD network nonsense :) I'm quite sure its been done before.

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
0

Answer by jfmichel · Dec 10, 2013 at 07:04 PM

Old question but I stumble upon t$$anonymous$$s issue recently and solved it by specifying a different process name (f.i. ":unity") for the UnityPlayerActivity in the Android Manifest. It seems UnityPlayer kills its process when quit() is called so you just have to be sure your Application and other Activities have a different process name (by default it's the Application package name).

See http://developer.android.com/guide/topics/manifest/activity-element.html#proc for more info.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

16 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 avatar image avatar image avatar image avatar image

Related Questions

what is wrong with Unity-player (Garbled Screen) 0 Answers

Script for resize aspect ratio for every device (andorid 2D) ?? 0 Answers

Problem with UnityPlayer extending QCARPlayerActivity 0 Answers

Rotation android 0 Answers

OnApplicationQuit not working on android 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