Welcome to the CrackBerry Forums Create Your Account or Ask a Question Answers in 5 minutes - no registration required!
Page 1 of 4 1234 LastLast
Results 1 to 25 of 92
Like Tree69Likes
  1. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #1  

    Default Why Can't Services Run in the Background?

    I have purchased quite a few apps but all of them have one annoying feature - they don't run in the background.

    IM+, for example, is pretty much useless as it doesn't run when closed and does not give you any notifications. Without the ability to run in the background, it's a waste of $8 as you can simply get the same functionality from the web-based instant messaging services.

    Again, it's not only IM+ but pretty much all apps (at least those I have bought).

    I was wondering what prevents developers from including the background operation functionality. I actually read here and there that it's the "lack of API" (?), but I absolutely don't know what this means.

    Furthermore, do you, folks, expect that the OS 2.0 will change the situation (e.g. RIM releases everything needed to the developers along with the update)?

    Thanks.
  2. caquito07's Avatar
    CrackBerry Abuser

    Posts
    194 Posts
    #2  

    Default

    Quote Originally Posted by kennyliu View Post
    I have purchased quite a few apps but all of them have one annoying feature - they don't run in the background.

    IM+, for example, is pretty much useless as it doesn't run when closed and does not give you any notifications. Without the ability to run in the background, it's a waste of $8 as you can simply get the same functionality from the web-based instant messaging services.

    Again, it's not only IM+ but pretty much all apps (at least those I have bought).

    I was wondering what prevents developers from including the background operation functionality. I actually read here and there that it's the "lack of API" (?), but I absolutely don't know what this means.

    Furthermore, do you, folks, expect that the OS 2.0 will change the situation (e.g. RIM releases everything needed to the developers along with the update)?

    Thanks.
    TRy changing the setting for Application Behavoir, go to Settings, click on General, change Applicaiton Behavior from Default to Showcase
    Thanked by 2:
    Vee_G (01-06-2012),  kennyliu (01-06-2012) 
    blue-b likes this.
  3. blackjack93117's Avatar
    Banned

    Posts
    4,157 Posts
    PIN
    Wooden shoe like to know
    #3  

    Default

    Yep - put it in showcase mode. Why this isn't the default who knows.
    Thanked by:
    kennyliu (01-06-2012) 
    Willard814 likes this.
  4. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #4  

    Default

    Quote Originally Posted by caquito07 View Post
    TRy changing the setting for Application Behavoir, go to Settings, click on General, change Applicaiton Behavior from Default to Showcase
    Thanks but I am talking about a different "background operation" functionality. For instance, on my android phone, I simply close Facebook, Skype, IM+, and many other apps and they still get me notifications (only present in the notification bar/slider). That is, the apps are "closed" and are retrieved only when needed.

    Furthermore, the notification system is integrated into the OS and you get all sorts of notifications (vibrate, LED, sound, screen flashing, etc.).

    And in the Playbook, the app window should be open for the app to be alive. I.e. I have a feeling that each app is kind of "sandboxed".
    Last edited by kennyliu; 01-06-2012 at 12:54 AM.
  5. blackjack93117's Avatar
    Banned

    Posts
    4,157 Posts
    PIN
    Wooden shoe like to know
    #5  

    Default

    Quote Originally Posted by kennyliu View Post
    Thanks but I am talking about a different "background operation" functionality. For instance, on my android phone, I simply close Facebook, Skype, IM+, and many other apps and they still get me notifications (only present in the notification bar/slider). That is, the apps are "closed" and are retrieved only when needed.

    Furthermore, the notification system is integrated into the OS and you get all sorts of notifications (vibrate, LED, sound, screen flashing, etc.).

    And in the Playbook, the app window should be open for the app to be alive. I.e. I have a feeling that each app is kind of "sandboxed".
    If the apps are closed and retrieved only when needed - that is not multitasking - it is app switching. You are talking about notifications - which are not really the same thing. Apps can run in a minimized state and perform minimal functionality like this - but not be running completely functionally as playbook apps do. If the app needs to be open to be alive that is not multitasking. They ARE running in the background at all times in showcase mode.

    The answer to your question is that apps can and do run in the background on playbook. In fact you can see them running when minimized. Open a few in showcase mode - perhaps youtube and something else with activity in the screen - the Vevo app, a download with a progress bar. Minimize them and you can watch what they are doing simultaneously - or listen to the audio. they are NOT sandboxed or suspended, and they DO run in the background.

    Anything else?
    Last edited by blackjack93117; 01-06-2012 at 02:13 AM.
  6. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #6  

    Default

    Quote Originally Posted by blackjack93117 View Post
    If the apps are closed and retrieved only when needed - that is not multitasking - it is app switching. You are talking about notifications - which are not really the same thing. Apps can run in a minimized state and perform minimal functionality like this - but not be running completely functionally as playbook apps do. If the app needs to be open to be alive that is not multitasking. They ARE running in the background at all times in showcase mode.

    The answer to your question is that apps can and do run in the background on playbook. In fact you can see them running when minimized. Open a few in showcase mode - perhaps youtube and something else with activity in the screen - the Vevo app, a download with a progress bar. Minimize them and you can watch what they are doing simultaneously - or listen to the audio. they are NOT sandboxed or suspended, and they DO run in the background.

    Anything else?
    Thanks for the response. Semantics aside, CLOSING apps on the Playbook, terminates the app itself. Closing some apps in Android only sends them to the background where they still keep running.

    In other words, on the Playbook, you have to keep all needed apps OPEN/MINIMIZED in order for them to "run" in the "background".

    Maybe I am not explaining this too well, but, again, the same IM+ runs absolutely differently on the Playbook and on Android. On the Playbook, you have to have the window open/minimized, whereas in Android, you just "close" it. It's no longer visible (except for the little icon in the notification bar) but it's still there running in the background.

    OK, that's just UI implementation. The biggest annoyance, however, is that there is no integration of notifications in QNX. All notifications are within the app and only if the latter is open/minimized.

    Those who have used Android for some time will probably understand what I mean. Same goes for desktop OSs. For instance, you can CLOSE windows for certain apps but the apps continue running and can be retrieved from the notification area.

    I just remember Peter (the developer of Battery Guru) said something about the lack of APIs when he explained why Battery Guru should be open to log the readings, so I thought developers could explain this in a greater detail.
    Last edited by kennyliu; 01-06-2012 at 02:36 AM.
    cranky_berry likes this.
  7. Megacharge's Avatar
    CrackBerry Abuser

    Posts
    302 Posts
    #7  

    Default

    Quote Originally Posted by kennyliu View Post
    Thanks for the response. Semantics aside, CLOSING apps on the Playbook, terminates the app itself. Closing some apps in Android only sends them to the background where they still keep running.

    In other words, on the Playbook, you have to keep all needed apps OPEN/MINIMIZED in order for them to "run" in the "background".

    Maybe I am not explaining this too well, but, again, the same IM+ runs absolutely differently on the Playbook and on Android. On the Playbook, you have to have the window open/minimized, whereas in Android, you just "close" it. It's no longer visible but it's still there running in the background.

    OK, that's just UI implementation. The biggest annoyance, however, is that there is no integration of notifications in QNX. All notifications are within the app and only if the latter is open/minimized.

    Those who have used Android for some time will probably understand what I mean.

    I just remember Peter (the developer of Battery Guru) said something about the lack of APIs when he explained why Battery Guru should be open to log the readings, so I though developers could explain this in a greater detail.
    I have an Android phone, and I understand what you are saying. For me this is a flaw/negative of Android. When I close an app, I closed it because I wanted it closed. It makes me angry when I have to bring up the task manager to close apps that I recently closed, and it bothers me big time that Android doesn't have an "active app" tray like the windows on the Playbook.

    I love Android, but I can't stand how it handles multitasking, it's almost as bad as iOS in that regard.
    BlackBerry PlayBook
    + tethered to my
    Samsung Galaxy S II
    = pure awesomeness
    Thanked by:
    kennyliu (01-06-2012) 
  8. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #8  

    Default

    Quote Originally Posted by Megacharge View Post
    I have an Android phone, and I understand what you are saying. For me this is a flaw/negative of Android. When I close an app, I closed it because I wanted it closed. It makes me angry when I have to bring up the task manager to close apps that I recently closed, and it bothers me big time that Android doesn't have an "active app" tray like the windows on the Playbook.

    I love Android, but I can't stand how it handles multitasking, it's almost as bad as iOS in that regard.
    Yes, for some apps it's a con, but most of the time there are settings to disable such behavior.

    On the other hand, running certain apps in the background is what those apps were actually meant to do. For example, I really want instant messaging apps to constantly run in the background to notify me of messages so that I read them once they arrive. Of course, I can sign out (terminate the app) or become "invisible" any time, if I don't want to be bothered. But still, I believe certain apps have to have that ability to run in the background (and it should be up to you whether you want them in the background or not). Unfortunately, on the Playbook you don't get to choose. So I am hoping someone can answer why and whether this will change any time soon.
    Last edited by kennyliu; 01-06-2012 at 02:47 AM.
  9. Superfly_FR's Avatar

    Posts
    9,665 Posts
    Global Posts
    9,680 Global Posts
    PIN
    Hey, what did you expect ?
    #9  

    Default

    Quote Originally Posted by kennyliu View Post
    Yes, for some apps it's a con, but most of the time there are settings to disable such behavior.

    On the other hand, running certain apps in the background is what those apps were actually meant to do. For example, I really want instant messaging apps to constantly run in the background to notify me of messages so that I read them once they arrive. Of course, I can sign out (terminate the app) or become "invisible" any time, if I don't want to be bothered. But still, I believe certain apps have to have that ability to run in the background (and it should be up to you whether you want them in the background or not). Unfortunately, on the Playbook you don't get to choose. So I am hoping someone can answer why and whether this will change any time soon.
    I think what you"re talking about is more related to a "service" running app mode (as in windows) than a multitasking problem. Maybe next generation of apps and QNX (OS10/PB2.0 OS) will allow such implementations (as they are, for instance on our BB Phones for Facebook app). At this point I couldn't say that the PB development platform(s) allow such notifications/ services, but maybe a dev could ?
    Join my BBM Channel : C00035FA6
    "I speak English like a Spanish Cow"
    I'm a StockBerrian, proudly holding 50 150 250 400 550 1000 BlackBerry shares
    Thanked by:
    kennyliu (01-06-2012) 
    kennyliu likes this.
  10. collapsed's Avatar
    CrackBerry Abuser

    Posts
    470 Posts
    Global Posts
    476 Global Posts
    #10  

    Default

    Gosh..Just like facebook on your BB smartphone. You get notifications even if you close the app. You have to keep it open on the playbook and it looks a bit weird..since i usually close everything before putting it in stand-by
  11. thymaster's Avatar
    CrackBerry Master

    Posts
    1,180 Posts
    Global Posts
    1,189 Global Posts
    #11  

    Default

    The PB does support notification API. Look at AppWorld when there is an app that requires an update, AppWorld runs in the background and sends a notification icon (exclamation mark) in the right corner.

    Apps that doesn't completely close in the background is not a flaw but a BAD idea. Apps like Messenger and Appworld are ok to run in the background waiting for the server to talk back. However most apps on Android and iOS that isn't closed properly are still stored in RAM which can build up and causes the OS to congest. The average consumers don't know how to terminate these apps properly and don't care so they get pissed off because their device keeps freezing on them. I love how the PB OS was design to terminate these apps properly and easily.
    Thanked by:
    Superfly_FR (01-06-2012) 
    kbz1960, recompile and Megacharge like this.
  12. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #12  

    Default

    Quote Originally Posted by thymaster View Post
    The PB does support notification API. Look at AppWorld when there is an app that requires an update, AppWorld runs in the background and sends a notification icon (exclamation mark) in the right corner.
    Yes, I agree on this. Notifications work with the native apps (AppWorld, alarm clock, hopefully email). But I haven't seen any third-party app using notifications.

    Quote Originally Posted by thymaster View Post
    Apps that doesn't completely close in the background is not a flaw but a BAD idea. .... However most apps on Android and iOS that isn't closed properly are still stored in RAM which can build up and causes the OS to congest. The average consumers don't know how to terminate these apps properly and don't care so they get pissed off because their device keeps freezing on them.
    Not entirely true. Android handles the congestion by terminating inactive apps itself.

    Quote Originally Posted by thymaster View Post
    I love how the PB OS was design to terminate these apps properly and easily.
    I love this design too, but...

    Quote Originally Posted by thymaster View Post
    Apps like Messenger and Appworld are ok to run in the background waiting for the server to talk back.
    certain apps as those you mentioned (mostly PIM - email, calendars, instant messaging, social networking, etc.) should be able to run in the background. Otherwise, they have no benefit over web-based apps or websites.
    Last edited by kennyliu; 01-06-2012 at 04:50 AM.
  13. peter9477's Avatar
    CrackBerry Genius of Geniuses

    Posts
    5,216 Posts
    Global Posts
    5,218 Global Posts
    #13  

    Default

    Short answer (I'm rushing out the door): the term "API" refers to Application Programming Interface (or, no doubt, variations thereof) and basically means that the operating system has to provide an interface to allow apps to create "services" (the generic term for "things that run in the background") or you can't do it.

    Right now, although the OS itself obviously supports services (it's got dozens running for its own purposes), it's not yet possible for apps to create them.

    We need RIM to define an API that allows that... simple as that.

    Notifications are fine, but an app can't trigger them when it's not running. If an app can "spawn" a service, that service can continue to run, using very little memory (think tens of kilobytes of RAM, possibly, instead of tens of megabytes) and almost no CPU, but doing whatever it is that it needs to do in the background (i.e. without a UI showing). It could signal the user via notifications when it's ready for interaction, such as with (say) a Twitter app which does a periodic search of recent tweets and tells you when "something interesting" has occurred. You'd tap on the notification and that would launch the UI for the app again, which would then interact with the service to find out what had been going on while it was not running.

    There are a half dozen things that need to be in place before all this can work, and it hasn't been at the top of RIM's list of priorities but they are working on it.

    Some people may not be too familiar with this idea of services, but no modern operating system would look like much if they weren't littered with them...
    Battery Guru for BB10 tracks voltage, power, battery health. (Also on the PlayBook.) White Noise helps you sleep or concentrate.
    Follow us on Twitter or Facebook or visit Engenuity's mobile apps page.
    Thanked by 4:
    farskija (01-06-2012),  helsinki98 (01-06-2012),  kennyliu (01-06-2012),  Superfly_FR (01-06-2012) 
  14. Innovatology's Avatar
    CrackBerry Master

    Posts
    1,273 Posts
    #14  

    Default

    Peter, you call that "short" ?!
    ORBIT for BB10 - The World In Your Pocket - World, Time, Weather in spectacular 3D. Demo on our site!

    Files & Folders
    for PlayBook and BB10: a powerful unified file, folder & cloud manager and media streamer with integrated SkyDrive, Google Docs, Google Drive, SugarSync, Dropbox, Box, thumbnails and more - Free 3-day trial! - Voted Best New BlackBerry App
    peter9477 likes this.
  15. app_Developer's Avatar
    CrackBerry Genius

    Posts
    2,356 Posts
    #15  

    Default

    @peter9477, do you think we'll get this with OS2? Or do you think that will be something later?

    How about just a notifications API (push or local) at least? Or did I miss that?

    Sorry to bug you, but you've been more forthcoming and credible with this stuff than anyone else I've spoken to at RIM so far.

    Cheers.
    peter9477 likes this.
  16. kbz1960's Avatar
    Doesn't Matter

    Posts
    65,149 Posts
    Global Posts
    65,304 Global Posts
    #16  

    Default

    It's a baby OS these things will come in time. I haven't used IM+ but have used the web interface and ran imo.im android app when I was on the beta. I never tried them on wifi but imo.im would not work at all over bridge and the web based ones all seem to time out when they are not the focus. I'm not sure how they act on wifi as I use my playbook when away from wifi.
    Sent from me using my fingers. Be pantless in 5K. Febreze - for more than smells.
    the 50K CrackBerry challenge
    Posted from my phone or pc or tablet that are no better than anyone else's
  17. omniusovermind's Avatar
    CrackBerry Genius

    Posts
    1,772 Posts
    Global Posts
    2,576 Global Posts
    #17  

    Default

    Quote Originally Posted by kennyliu View Post

    Not entirely true. Android handles the congestion by terminating inactive apps itself.
    Not sure how well the tablet android OS`s are handling this (although I`m not hearing much improvement) but I know on my phone running gingerbread, android is allowing a lot of RAM-sucking to happen in the background before it starts closing inactive apps down, which leads to slightly laggier performance as well as increased battery drain. Good concept in theory but I`m not a fan of it in practice due to those reasons. I much prefer the QNX style of giving me total control of my multi-tasking
    Carrier controlled updates is the worst smartphone spec of them all
    Nexus 4
  18. StikiGreenZ's Avatar
    CrackBerry Abuser

    Posts
    247 Posts
    #18  

    Default

    Another example of an app that should run is BlackBerry news. On the smartphone version, it updates the news constantly depending on the frequency you ask for. On the PlayBook, it doesn't update til the app is launched. Me personally, I'm on the subway when I need it, and I don't have reception at that point. It would be nice for the app to be able to update silently in the background as it does on smartphones. I'm forced to do a workaround (open the app when I wake up in the morning, which I tend to forget 4/5 days of the week!)
    StikiGreenZ - BlackBerry Z10, BlackBerry PlayBook
    kennyliu likes this.
  19. Rickroller's Avatar
    CrackBerry Genius

    Posts
    3,446 Posts
    Global Posts
    3,465 Global Posts
    PIN
    Proud contributer to The Human Fund
    #19  

    Default

    Quote Originally Posted by Megacharge View Post
    I have an Android phone, and I understand what you are saying. For me this is a flaw/negative of Android. When I close an app, I closed it because I wanted it closed. It makes me angry when I have to bring up the task manager to close apps that I recently closed, and it bothers me big time that Android doesn't have an "active app" tray like the windows on the Playbook.

    I love Android, but I can't stand how it handles multitasking, it's almost as bad as iOS in that regard.
    You don't need to go into task manager to close apps. That's how Android is designed to run..the system itself will manage it's own memory and close things as its needed. And if this really does bother you..you should look into CyanogenMod roms. They have a setting to long press the back button to "kill" the application completely.
    "Hard work spotlights the character of people: some turn up their sleeves, some turn up their noses, and some don't turn up at all." -Sam Ewing
    Rollin' on Twitter
  20. omniusovermind's Avatar
    CrackBerry Genius

    Posts
    1,772 Posts
    Global Posts
    2,576 Global Posts
    #20  

    Default

    Quote Originally Posted by Rickroller View Post
    You don't need to go into task manager to close apps. That's how Android is designed to run..the system itself will manage it's own memory and close things as its needed. And if this really does bother you..you should look into CyanogenMod roms. They have a setting to long press the back button to "kill" the application completely.
    But as I said 2 posts up...
    Also, I`m not sure having to suggest rooting a device in order to get this functionality is a positive.
    Carrier controlled updates is the worst smartphone spec of them all
    Nexus 4
  21. kbz1960's Avatar
    Doesn't Matter

    Posts
    65,149 Posts
    Global Posts
    65,304 Global Posts
    #21  

    Default

    Quote Originally Posted by Rickroller View Post
    You don't need to go into task manager to close apps. That's how Android is designed to run..the system itself will manage it's own memory and close things as its needed. And if this really does bother you..you should look into CyanogenMod roms. They have a setting to long press the back button to "kill" the application completely.
    Does it just close whatever it feels like closing? What if you want an app to stay and android closes it on you? Wouldn't that pee you off a little or be annoying as heck?
    Sent from me using my fingers. Be pantless in 5K. Febreze - for more than smells.
    the 50K CrackBerry challenge
    Posted from my phone or pc or tablet that are no better than anyone else's
  22. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #22  

    Default

    Quote Originally Posted by peter9477 View Post
    Short answer (I'm rushing out the door): the term "API" refers to Application Programming Interface (or, no doubt, variations thereof) and basically means that the operating system has to provide an interface to allow apps to create "services" (the generic term for "things that run in the background") or you can't do it.

    Right now, although the OS itself obviously supports services (it's got dozens running for its own purposes), it's not yet possible for apps to create them.

    We need RIM to define an API that allows that... simple as that.

    Notifications are fine, but an app can't trigger them when it's not running. If an app can "spawn" a service, that service can continue to run, using very little memory (think tens of kilobytes of RAM, possibly, instead of tens of megabytes) and almost no CPU, but doing whatever it is that it needs to do in the background (i.e. without a UI showing). It could signal the user via notifications when it's ready for interaction, such as with (say) a Twitter app which does a periodic search of recent tweets and tells you when "something interesting" has occurred. You'd tap on the notification and that would launch the UI for the app again, which would then interact with the service to find out what had been going on while it was not running.

    There are a half dozen things that need to be in place before all this can work, and it hasn't been at the top of RIM's list of priorities but they are working on it.

    Some people may not be too familiar with this idea of services, but no modern operating system would look like much if they weren't littered with them...
    Finally, an answer from a developer. Thanks a lot, Peter.

    Any word on how soon developers can expect the background services for third party apps to be implemented?
  23. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #23  

    Default

    Quote Originally Posted by kbz1960 View Post
    Does it just close whatever it feels like closing? What if you want an app to stay and android closes it on you? Wouldn't that pee you off a little or be annoying as heck?
    IIRC Android will close only inactive apps on a FIFO basis.

    If you have 1mb of RAM, memory is generally not a problem in Android.
    Last edited by kennyliu; 01-06-2012 at 10:00 AM.
  24. kbz1960's Avatar
    Doesn't Matter

    Posts
    65,149 Posts
    Global Posts
    65,304 Global Posts
    #24  

    Default

    Quote Originally Posted by kennyliu View Post
    IIRC Android will close only inactive apps on a FIFO basis.

    If you have 1mb of RAM, memory is generally not a problem in Android.
    So if I opened an IM app first, then opened several other apps it would start by closing the IM app I want to stay open?
    Sent from me using my fingers. Be pantless in 5K. Febreze - for more than smells.
    the 50K CrackBerry challenge
    Posted from my phone or pc or tablet that are no better than anyone else's
  25. kennyliu's Avatar
    CrackBerry Genius

    Posts
    2,138 Posts
    Thread AuthorThread Author   #25  

    Default

    Quote Originally Posted by kbz1960 View Post
    So if I opened an IM app first, then opened several other apps it would start by closing the IM app I want to stay open?
    No, if IM is still running in the background, it won't be closed. That's what's great about apps/services/processes running in the background. Besides, background services eat up a negligible amount of RAM.

    Again, it's closed and inactive apps that get closed. At least, this is how I understand it.
    Last edited by kennyliu; 01-06-2012 at 10:14 AM.
    Rickroller likes this.
Page 1 of 4 1234 LastLast

Posting Permissions