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 Constantine375 · Nov 14, 2013 at 03:30 PM · androidupdatebackground

How to regularly send messages(ping) to server when the program running in the Android background?

My ping message write in the update function, but it seems that the update function dosn`t run when the program running in the android background. So what can I do if I want do something in update function when the program running in the android background?

Comment
Add comment · Show 2
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 mattssonon · Nov 14, 2013 at 03:30 PM 0
Share

Please don't post the same question several times. I have rejected your other question.

avatar image Bonfire-Boy · Sep 30, 2016 at 03:53 PM 0
Share

I'm curious, why would you want to do this? Android programs do not run in the background, so people do not expect backgrounded apps to consume resources. And even if you could do it, it's hard to see what the point would be since your app won't be able to do anything with the information. So why can't you just ping when the app is unpaused?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Mefistofel · Nov 14, 2013 at 05:41 PM

There is no standard ways for that in unity. Unity for Android runs in Activity, when minimized, it loses control. Desired functionality have android Services, you can integrate them, making plugin, writing the desired functionality in it, registering a service in the android manifest, etc. To do this, you need Unity Pro and understand the base android architecture...

Comment
Add comment · Show 2 · 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 GLeBaTi · Sep 30, 2016 at 02:29 PM 0
Share

if i create new Thread in unity application, this thread is working in background?

avatar image Bunny83 GLeBaTi · Sep 30, 2016 at 05:09 PM 1
Share

Not reliably. An android process that has moved into the background can be killed at any time when the system needs the resources. That's why things like services exist. There is only one foreground app at a time.

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

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

Related Questions

Downloading file in android background 0 Answers

Can I make my Android game close if you leave the game on the title screen? 1 Answer

Can I remove the Android permission request on Startup in Unity 5.1.4 ? 1 Answer

How to run game on background in Android 0 Answers

Update executes on touch 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