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
Highlighted
New Developer
New Developer
Posts: 6
Registered: ‎07-17-2014
My Device: BB Q10
My Carrier: Wind
Accepted Solution

Problem with headless app

I have a very simple headless app with a service part that can be summarized as this:

 

int main()

{

    while(true)

    {

        appendToLogFile();

        sleep(5);

    }

}

 

This manages to write twice to the log file on 10.3 simulator after system startup and then it dies (nothing gets printed any more, process is gone from 'pidin').

 

Is there something I have to do to make the system not kill us after a couple of seconds?

 

I have the following 2 lines in bar-descriptor.xml:

    <permission system="true">_sys_run_headless</permission>

    <permission system="true">_sys_headless_nostop</permission>

 

I can zip up the project and put it up somewhere if anybody wants. It's based off the template project that Momentics makes for headless apps.

 

TIA.

Developer
Posts: 246
Registered: ‎09-30-2010
My Device: Z10, Onyx2
My Carrier: IND XL

Re: Problem with headless app

have you update the signature to support headless nonstop?

 

if not then you need to update the signature to be able to use headless nonstop. now every developer can create a nonstop headless app. before this you need to apply

New Developer
New Developer
Posts: 6
Registered: ‎07-17-2014
My Device: BB Q10
My Carrier: Wind

Re: Problem with headless app

OK, how do you update the signature? Updated bar-descriptor.xml but I guess there's something more maybe?

 

Thanks.

New Developer
Posts: 4
Registered: ‎07-16-2014
My Device: Z 10
My Carrier: AirTel

Re: Problem with headless app

check this

http://devblog.blackberry.com/2013/11/headless-apps-101/#

i hope it wil solve your many confusion.

 

Developer
Posts: 24
Registered: ‎01-27-2014
My Device: Z10
My Carrier: Rogers

Re: Problem with headless app

I did some experimenting. It seems that headless apps work pretty much as advertised when developing on a device but not very well at all when developing on the simulator.

 

Use a device to develop headless apps, not the simulator.

 

Maybe future simulators will fix the current problems.

New Developer
New Developer
Posts: 6
Registered: ‎07-17-2014
My Device: BB Q10
My Carrier: Wind

Re: Problem with headless app

Whatever man.