Run a process in background in Android -
i'm developing app has connect server once every hour. happens without user having open app.
can apps run in background? meaning if using app playing game when app has connect server, can app connect without interrupting user playing game. know i-phone allows 1 3rd party application run @ time, ios different?
assuming apps can run background processes, can stay open ever? know of newer phones don't give user ability terminate application , system terminate programs whenever wants.
if apps can't run in background , stay open ever, can app automatically opened phone every hour?
i've been looking @ alarm clock apps, seem background process open/ run @ set time, want app do. sadly can't find source code. alarm clock examples require app open or alarm won't go off. appreciated. (please don't link me google source, have looked @ that)
1-> yes app can connect server in background without interrupting user. need use background service achieve this.
2-> can have background service keeps running bad idea , keep running ever .this drain battery , use memory ,cpu , network unnecessarily. system has control on apps can kill background processes when required.
3-> don't think there provision can automatically open app. unless using kind of service sends broadcast or event app launch it. bad design again. user not if his/her phone behave weirdly :)
Comments
Post a Comment