Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Developer
Posts: 325
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Headless apps - need to submit form. Seriously?

Hello,

 

I just read that when I want to create long running headless app then I have to ask for permission.  

 

My question is: is this best solution how to prevent from apps that excesively consume battery? 

 

Rationale: I'll fill in form, create app, it will go through formal review and will be approved. App has bug that is not immediatelly visible during the review. Or reviewer is not skilled enough to review app properly. There is thousand reasons why review will not determine that app is not properly written.

 

Better solution: Include Top Battery Consumers report into OS. Or use notification center to inform user that some app excesivelly consumes battery. No formal review may give you as good result as profiler.

 

My feeling from approval based solution is: it just bothers developers and does not really bring added value to users.

 

What is your feeling?

 

Tom

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
Developer
Posts: 33
Registered: ‎11-01-2012
My Device: BlackBerry 9780, BlackBerry 10 Dev Alpha
My Carrier: Mobitel - Sri Lanka

Re: Headless apps - need to submit form. Seriously?

Me too want to implement a long running headless app for BB 10.2. Eventhough I still unable to find a sample application for this, I filled out the App Request Form online and submit. I don't know whether they have enough details to evaluate what I'm going to do. I'm not an expert in BB 10 application development. First I need to create a sample application to run in background. Do I have to submit a request for that too?

AnujAroshA
Developer
Posts: 323
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900
My Carrier: Telus

Re: Headless apps - need to submit form. Seriously?

I think a lot of this is a mix of optics and management. From the optics side they don't want everybody trying to create a headless app just because they can (eg oh cool now I'll make my calculator app stay alive in the background! When this plain just isn't necessary)

Forcing a developer to separately commit to making a headless app helps ensure (a) you really are doing this because you feel that you need it (b) that because you are going down this separate path you can expect that your app will be scrutinized more for how it uses the battery/cpu than a typical app.

From the management side of things it wouldn't surprise me if the constraints that an app runs under are tweaked for headless vs typical apps. E.g if you have an app that runs headless it likely doesn't need as much cpu/ram as an active app like say Angry Birds... because you're not rendering content or dealing with gestures and user interaction. I know in my personal case the headless app I'm writing only needs to "wake up" once a day... do a quick check... and only if a certain condition is met does it need to actually do anything.


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Headless apps - need to submit form. Seriously?

I'm confused what the OP is asking about. The form is just to get your signing keys permission to sign an app that has the headless permission associated, not a change in the regular "vetting" process (which I think is what you're referring to with "formal review and will be approved").

thubalek, can you clarify what your concern is? Are you just worried that your app won't be granted permission to use _sys_run_headless, before you've even tried submitting the form?

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Headless apps - need to submit form. Seriously?

If this is just about whether you can adequately test your app prior to submission for the vetting process, I don't think the way they've done it prevents that. I could be wrong, but it looks like we can use the permission when developing (devMode true) without submitting that form. I just threw the two needed for long-running-and-at-startup headless apps onto a test app and get this dialog when I've sideloaded and try running it:

headless_permissions.jpg


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 325
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Re: Headless apps - need to submit form. Seriously?

My concern is that it does not make sense to me.

 

Why I have to sign extra contract to use part of API? 

 

Somebody really thinks that it will prevent from battery drain? What if there is bug in app? My experience with reviews of my apps is that it is really formal, they even don't find clear bugs. 

 

I think that much better solution is profiler integrated into operating system reporting battery usage of apps to users. Users really care about battery and they will stop using apps that drain battery (my experience from Android). Any contract will not deliver the same service.

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
Developer
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Headless apps - need to submit form. Seriously?


thubalek wrote:

My concern is that it does not make sense to me.

 

Why I have to sign extra contract to use part of API? 

 

Somebody really thinks that it will prevent from battery drain? What if there is bug in app? My experience with reviews of my apps is that it is really formal, they even don't find clear bugs.


There are, I think, numerous reasons why they are taking this approach, and saving battery is only one of them. Perhaps not even the major reason.

 

They have ample past experience from BBOS showing how the background ability has been used and abused. They're trying to let BB10 provide the best user experience in all respects, and this is part of that plan.

 

I may feel otherwise once I actually request approval for my own apps (Battery Guru being the most obvious one but I have others in the works) if they end up rejecting it. I read the submission form carefully, however, and given that they even allow for "user requests" (or something like that) to be considered as part of your business case, I'm hopeful they don't plan to reject apps too arbitrarily. Some types of apps simply need the full always-running-after-startup capability and there's no way around that. I think they simply want to minimize how many apps are like that, when there are in most cases going to be alternatives that impact the user less.


Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!
Developer
Posts: 325
Registered: ‎10-01-2012
My Device: Dev Alpha C, Playbook 32 GB
My Carrier: BleskMobil

Re: Headless apps - need to submit form. Seriously?

On Android headless apps are first class citizens and I never heard about any type of misuse. User may look at Top Battery Consumers report and decide whether app draining battery are worth to keep.

 

Regarding security: I don't believe that it is possible to prevent malicious behavior by requiring to fill up some form and/or by using review. Again: app may be time bomb and you have no chance to find it in advance (even if you have source code, see http://underhanded.xcott.com/ ;-)). 

 

Regarding my apps: I asked for permisission for BX Battery Info as well, together with request for new trigger (Battery Status/Level trigger) so we will see whether they will approve these apps as long running.

--------------------------------------------------------------------------------------------
-- My Blackberry 10 app at http://blackberry.hubalek.net
-- My Android apps at http://android.hubalek.net
New Contributor
Posts: 7
Registered: ‎10-03-2008
My Device: Not Specified

Re: Headless apps - need to submit form. Seriously?

Speaking of Android apps, if I'm not mistaken Android develoeprs who port their apps and submit to BB World can run their applications in the background with no prior approval from BB or restrictions imposed to native BB developers.

Developer
Posts: 57
Registered: ‎10-29-2010
My Device: Z10 LE, PlayBook
My Carrier: T-Mobile

Re: Headless apps - need to submit form. Seriously?

I would think that Android apps running in the background are more about the Android Player running in the background. Android apps don't always completely exit and stop running, so if the active frame is closed, the Android Player still grinds away.

 

I do see your point, though.