11-14-13 07:41 PM
42 12
tools
  1. kwelamnp's Avatar
    I purchased a marine navigation app called GPS Nautical Charts. We have discussed it before, but it is essentially a gps charting program that keeps track of where vessel is in much the same way as a car GPS.

    Problem is, that the PB hibernates after 5min. This is a serious safety issue if boater is relying on app in say a narrow rocky channel.

    I have asked RIM and they say app developer must include keep awake code. I have asked app developer and he say that PB OS does not support "keep awake" and that they had to pressure Alec Saunders to get it included in BB10. He say that he cannot support keep awake in his PB app.

    Does anyone know just exactly what code developer should add to keep his app awake? Maybe send it directly to him! mailto:support@gpsnauticalcharts.com

    Failing this, the app is of no real use.
    07-23-13 09:06 AM
  2. Chaddface's Avatar
    I don't know details but it's certainly possible because Battery Guru has that feature. I believe the OS limitation is the app has to be on the screen. Either full screen or minimized.
    07-23-13 09:12 AM
  3. kwelamnp's Avatar
    I don't know details but it's certainly possible because Battery Guru has that feature. I believe the OS limitation is the app has to be on the screen. Either full screen or minimized.
    Yes, I did not include that because we have hashed it through before. But to summarize: Certain apps DO have stay awake built in. Battery Guru is one. Apparently Magellan is another. I think that Comwave also stays awake. If the app we want to use does not have stay awake programmed in, then we can run one that does (e.g BG) simultaneously. This will only work if BG is kept visible. This means that the main app must be minimized. For a navigation app, that does not work - it needs a full screen with maps or charts displayed.

    Looking for CB users that can provide or lead developer to method of keeping his app awake.

    Of course, it would be better if BB issued an update that included this and a few other things - but enough threads on that already!
    07-23-13 09:20 AM
  4. ChrisMay's Avatar
    I think the app developeer is partially correct in what he says. As you mention, BatteryGuru implements KeepAwake, but I seem to recall reading in a post by the developer of that app that he had to use a bit of a trick to make it work, as the KeepAwake function could not be directly 'accessed'.

    I know that he is a fairly active member of this forum and seems to be very helpful, so with a bit of luck he may post an answer in due course, otherwise, I guess you could look him up in another BatteryGuru thread, and maybe send him a PM(?)
    Chaddface likes this.
    07-23-13 09:32 AM
  5. FF22's Avatar
    Kalemsoft's video player also prevents Standby. There are a few apps that do it. I don't know if they would share their technique but you could try contacting them, or as noted, Peter of Battery Guru fame. OH, Advanced Camera also keeps the pb from entering standby.
    07-23-13 09:49 AM
  6. kwelamnp's Avatar
    Kalemsoft's video player also prevents Standby. There are a few apps that do it. I don't know if they would share their technique but you could try contacting them, or as noted, Peter of Battery Guru fame. OH, Advanced Camera also keeps the pb from entering standby.
    I did read somewhere that video will keep apps awake. As a result, if an app has even a small video active, the app will stay awake. I sent the developer of GPS Nautical Charts the link, but he does not seem much interested in getting his app to work properly on the PB. Probably a sign of the times as developers desert a sinking ship.
    07-23-13 10:44 AM
  7. kwelamnp's Avatar
    A search found this on another site. Perhaps this is what developer needs to read?

    Re: Standby Time-Out - Playbook Useless!
    Options
    ‎06-25-2011 01:49 PM
    There are several settings involved here, but unfortunately no solution that works in all cases or perfectly. The Showcase mode helps only under narrow conditions.

    For developers, there are two main things. One is referred to as the QNXSystemPowerMode. The default for this means an app stops getting any CPU time as soon as it becomes "inactive". By default this is whenever any other app becomes fullscreen. With the "Paused" mode for the tablet, the app becomes inactive as soon as it is itself not fullscreen (even if you don't switch to another app). With the "Showcase" mode, no app ever becomes inactive as long as the PlayBook is awake. This setting has no impact on if or when the tablet sleeps.

    Secondly, there is the systemIdleMode setting. Developers can set this to KEEP_AWAKE, in which case the unit never sleeps as long as the app doing this is "active" (see above) and even partially visible onscreen. That means that if an app uses KEEP_AWAKE, it will keep the tablet from turning off the backlight or screen, unless you have another app fullscreen or the KEEP_AWAKE app isn't even partially visible (e.g. if you maximize the app icon area, or have more than a few apps running and this one's minimized view is off-screen).

    For music sites, if you get an app which does KEEP_AWAKE, you can enable Showcase mode, run that app and the web browser, start your music, then minimize the apps so that at least the KEEP_AWAKE one is visible on the Home screen, and the tablet "should" not go to sleep.

    I say "should" there because I have, at least before 1.0.6, detected some unreliability in the behaviour of the OS in recognizing the combination of things required to achieve this state. I just tested now using the Trance Music Radio and it works fine, however... no sleeping.

    Also, isn't this whole issue fixed for playing flash video in the web browser, at least since 1.0.6?
    Peter Hansen -- (PlayBook and dev-related blog posts at This Is Not a Blog.)
    Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
    peter9477 likes this.
    07-23-13 10:54 AM
  8. jarviser's Avatar
    A search found this on another site. Perhaps this is what developer needs to read?
    I found out on another thread that if the app is written native it's straightforward code. If it's an android port and runs in the player then keep awake is not accessible by the app. So osmand for example can never have keepawake implemented without a new player. Same may apply to OPs nautical app.

    Unfortunately when parting with cash in blackberry world it's impossible to know if the app is leveraged from android or properly written. (is it?)
    07-23-13 11:01 AM
  9. FF22's Avatar
    I found out on another thread that if the app is written native it's straightforward code. If it's an android port and runs in the player then keep awake is not accessible by the app. So osmand for example can never have keepawake implemented without a new player. Same may apply to OPs nautical app.

    Unfortunately when parting with cash in blackberry world it's impossible to know if the app is leveraged from android or properly written. (is it?)
    I don't know if it is still the case, but at one time BB would not permit the description of an app to mention it was "Android" derived. The only way to tell was if some of the screen shots showed the telltale signs like the Android bottom status bar with the "android back arrow." You could also contact the developer or ask in the App subforum for others thoughts on the app.
    07-23-13 11:32 AM
  10. kraschute's Avatar
    A DLNA remote controller!
    07-23-13 12:11 PM
  11. Innovatology's Avatar
    It is certainly possible to keep the PlayBook awake (Files & Folders has such an option), but it depends on the framework how it is done. So AIR, WebWorks, Native/Qt apps all do it differently. I'm not sure about Android.
    07-23-13 04:44 PM
  12. kmsoft's Avatar
    I did read somewhere that video will keep apps awake. As a result, if an app has even a small video active, the app will stay awake.
    Yup, in WebWorks you can just add a super-short video element as an endless loop, 0 pixel video on the app's "home page" and it'll stay awake.

    I played around with it once when experimenting with making a night-clock app.
    07-23-13 05:02 PM
  13. jpash549's Avatar
    Keeping navigation apps visible

    1. If the app is running and an external monitor is connected through the HDMI port the monitor will continue to show the running app in full screen even tho the PB screen goes dark. This was tested with my PB and Battery Guru with sleep enabled. BG was in charging mode and although the PB screen was dark the BG readings updated.It was also tested with Google Maps (Free) which continued to show but since the system was static motion could not be checked.

    2. I also had a bluetooth HP keyboard connected. Hitting a key (space or control are convenient) turned the PB screen on. This suggests that a periodic bluetooth signal sent to the PB would keep the screen on.

    This seems to work in both showcase or default mode but this might depend on the app.
    FF22 likes this.
    07-26-13 02:15 AM
  14. MasterOfBinary's Avatar
    If you're using a window, refer to https://developer.blackberry.com/nat...c_standby.html. Otherwise, like someone mentioned, you'll have to make a window small enough to not be seen (like 1x1 px), and do the same.
    07-26-13 03:40 AM
  15. jpash549's Avatar
    If you are referring to my post the app is running full screen and there is no other visible app. The Battery Guru updates showed on the connected monitor even though the PB screen was dark.

    Sent from my Nexus 7 using CB Forums mobile app
    07-26-13 03:54 AM
  16. rossjackson01's Avatar
    Yup, in WebWorks you can just add a super-short video element as an endless loop, 0 pixel video on the app's "home page" and it'll stay awake.

    I played around with it once when experimenting with making a night-clock app.
    Any chance of posting the '0 pixel video' so we could all use it?


    I'm not technical, but if I put my thought in plain English?
    I assume you mean that 'Webwork should be installed, run with the video and minimised. Then any other programme can be used and the Playbook will not turn off?

    Hope you can help
    07-26-13 03:56 AM
  17. jojon2se's Avatar
    ...
    I assume you mean that 'Webwork should be installed, run with the video and minimised. Then any other programme can be used and the Playbook will not turn off?
    ...
    I am afraid not.

    WebWorks is not an application, but one of the many "toolkits" that developers can use to put stuff: text, buttons, pictures, etc, on screen - the "wood" that the app "house" is built of, so to speak -- examples of other such frameworks are Cascades, QT and AdobeAIR, which were mentrioned above.

    You could build an app with WebWorks, have it perform the trick described, and leave it running alongside the one you really want to be using, with the apps minimised to the task view, so that they are both visible at the same time, but that is no more or less than what you can already do with Battery Guru today.

    I guess our best option is to keep a pet slug treading around on the PlayBook screen. :P
    07-27-13 03:20 AM
  18. jpash549's Avatar
    There seems to be a difference between the screen timing out and the app actually hibernating that is stopping operation. Battery Guru continues to function if the screen times out or if you put the PB in standby. As I pointed out previously HDMI to an external monitor will continue to show the results of Battery Guru even when the screen of the PB times out and presumably would do the same for any app which continued to run when the the unit went into standby. This seemed to be true of the map app I tried. Thus if you had the PB connected to an external monitor by HDMI the app result would continue to be visible. Small HDMI monitors are available from Lilliput for example but are not cheap. But if you are driving a $60000 +- boat you might be willing to pay a few hundred bucks for a quality 10-12 " monitor.

    Sent from my Nexus 7 using CB Forums mobile app
    07-27-13 03:57 AM
  19. KermEd's Avatar
    I added standby override to my PlayBook apps ages ago. It's dead simple and in the rim docs.

    It's easy to do. 2 lines of code.

    Posted via CB from my LE
    rossjackson01 likes this.
    07-27-13 04:07 AM
  20. rossjackson01's Avatar
    I added standby override to my PlayBook apps ages ago. It's dead simple and in the rim docs.

    It's easy to do. 2 lines of code.

    Posted via CB from my LE
    Can you explain what and how to do such a thing please? I am sure that many of the members would like to have and a be able to use such a facility,

    Regards.

    Ross
    07-27-13 05:21 AM
  21. mmd12's Avatar
    Interesting thread.

    Just my 2 cents.

    I only develop in Native 'C' and don't know how it's done in other languages but this is the code I use to keep my apps from going into standby:

    idle_mode = SCREEN_IDLE_MODE_KEEP_AWAKE;
    screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_IDLE_MODE, &idle_mode);


    As for the original poster's problem I decided to play around with some of the suggestions here and see what might work on my PlayBook.

    If an app is full screen (not minimized) and it hasn't done something similar to the above in it's code, I don't believe there is anything that a user can do to keep if from going into standby.

    If another app is minimized and in keep awake mode, and the desired app that you want to keep awake is also minimized, the PlayBook will not go into standby. Of course the obvious problem is that the desired app is minimized and the screen is much smaller and harder to read.
    FF22 likes this.
    07-27-13 09:40 AM
  22. rossjackson01's Avatar
    Thank you mmd12.

    I have tried the minimised use of a satnav programme in Playbook, and it's not very successful. I may as well be suing a small tomtom thingy.

    I like using a 7" screen. I do use my Nexus 7 with Copilot, but would prefer my Playbook. It's such a good tablet and it's a shame to just use it for video chat.

    Thank you for trying to assist.

    Regards

    Ross
    07-27-13 12:02 PM
  23. FF22's Avatar
    Bottom line - the way the pb is designed, TIMEOUT control is either in the app or it is not - unless you are willing to shrink the app to share the screen with another app.
    07-27-13 12:40 PM
  24. jpash549's Avatar
    I added standby override to my PlayBook apps ages ago. It's dead simple and in the rim docs.

    It's easy to do. 2 lines of code.

    Posted via CB from my LE
    It should be possible then to test any app for this feature by connecting the PB to an external monitor as mentioned above and seeing what happens? Any app which polls wifi or gps for input while in standby would seem to have this feature?

    Sent from my Nexus 7 using CB Forums mobile app
    07-27-13 02:00 PM
  25. snow_stipple's Avatar
    I believe this can work for some. Open whatever screen you want to remain on. Then open OrigamiBrowser and on the very top right click and select 'Keep Screen On'. Go back to the first screen and make it full screen. Then with your left thumb slowly slide in from the the left bezel onto the screen until it becomes slightly smaller with a blue area all around and just a small slice of the OrigamiBrowser still visible. Then, all the while still keeping your thumb on the screen, move the active screen back to the left until only a small blue area remains on that side. Then hold your thumb very still on the screen for about ten seconds as this seems to get the screen to stay like that, and then lift your thumb off. Hopefully, it works right away but you may need to try a few times to get it right. Because a tiny portion of OrigamiBrowser is still visible the almost full sized other screen will remain on until you touch the screen again.

    I tried this with Crackberry's site, a photo, and using Location on Google Maps. All remained open past five minutes and Location appeared to continue working. Note that the Playbook's browser allowed a Google Maps location fix but Origami Browser doesn't seem to, so open Google through the Playbook's browser and get a location fix, then open OrigamiBrowser.

    Here's a picture to show what I mean about the blue area around the screen and OrigamiBrowser just appearing off to the right side.
    Attached Thumbnails What should app developer do to keep PB app awake?-img_20130747.jpg  
    07-27-13 09:04 PM
42 12

Similar Threads

  1. Smart App Shopper - Never miss a price drop again
    By harkal in forum App Announcements
    Replies: 21
    Last Post: 08-21-14, 08:11 AM
  2. UK NatWest mobile banking app for BB10
    By GolfCity in forum BlackBerry 10 Apps
    Replies: 11
    Last Post: 10-25-13, 04:48 PM
  3. Do you carry Z10 & Q10? How?
    By BoyAndroid in forum BlackBerry Q10
    Replies: 14
    Last Post: 08-01-13, 10:36 AM
  4. Not a bad (?) price for a note taking app
    By AlwaysSmile in forum BlackBerry 10 Apps
    Replies: 11
    Last Post: 07-28-13, 09:30 AM
  5. Switch to international character set for SMS!
    By Matt Vairy in forum BlackBerry Curve 9220/9320
    Replies: 1
    Last Post: 07-23-13, 10:10 AM
LINK TO POST COPIED TO CLIPBOARD