Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
1
Question by KeithSizemore · Jun 24, 2016 at 05:02 AM · androidplugin

Android Background Service Plugin Development (Unity Free)

I'm developing a simple android/iOS app that requires background services to run while the app has either been closed or "hidden".
I need to simply compare a DateTime variable to the current device time (alarm clock) then open my application up and run some processes then sleep again until notified again. I've been watching this tutorial on unity plugin development and noticed the instructor stating that it's not possible to develop native plugins with the free version of unity and that will require the pro version. I've searched more on this for more details and came up empty handed. Can anyone clarify this?

Comment
Add comment
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

3 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by nintendaii · Feb 24, 2021 at 02:17 PM

Hi, here is a good example of unity app with background service https://github.com/nintendaii/unity-background-service

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 kamran-bigdely · Apr 13, 2017 at 12:42 PM

There is no difference between pro and free version of Unity in that regard. What he said was right couple years ago but then Unity Technologies changed its policy.

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 gfoot · Apr 13, 2017 at 12:02 AM

I think that's out of date, but you don't need a native plugin anyway. It's easiest to do this using an Android Javascript plugin, which you need to launch as a service when your app is started. This then runs in the background even when your app is terminated, and can do things like display notifications to the user.

I'm not sure whether it's possible to auto-launch your app again, but it's not something I'd recommend in any case as users do not expect it, it is very intrusive. Typically if any processing needed to be done, you'd do it in the Javascript, which is much more lightweight than firing up a Unity-based app.

Here's a good example of how to build a jar plugin and use it from Unity: https://github.com/Agasper/unity-android-notifications

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 oferei · Oct 18, 2017 at 11:22 AM 0
Share

JavaScript? Do you mean Java?

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

Create a ListView in Unity Android app: use UnityGUI or Android plugin? 0 Answers

Android obfuscator 1 Answer

YouTube Player Fragment in Plugin 1 Answer

Where can I find the resource definition for google play games android configuration? 1 Answer

Are all DLL files pre-loaded at game start up or loaded when needed? 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