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
Contributor
guillemhs
Posts: 13
Registered: ‎12-11-2012
My Device: Curve 9320

Can I run an app without GUI on Native SDK for BB 10?

I was wondering if it is possible to run a process or an app without GUI on BB 10. Is it possible? How can I do it?
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Can I run an app without GUI on Native SDK for BB 10?

While a running app is able to launch other processes with no UI (e.g. via a spawn/exec type of call), the parent process does have to be an app with a UI, launched by the user by tapping on the screen or in response to an invocation request from another app.

There are certain special cases where the app may not actually have a UI open up, though aside from system apps then only case I know of is with the Push Service.

Might be best if you were to describe your use case for this, so someone could give you an answer more specific to your situation.

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!
Contributor
guillemhs
Posts: 13
Registered: ‎12-11-2012
My Device: Curve 9320

Re: Can I run an app without GUI on Native SDK for BB 10?

I want to run a geolocation request every 5 minutes.

 

It must not have a GUI, I was thinking on just a process without gui.

 

Is it possible?

Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: Can I run an app without GUI on Native SDK for BB 10?

Most likely it's not possible with the current API.

 

You can try experimenting with extendTerminationPeriod() method of Application class but I think this will be abuse of it's intended purpose. Application will have to be started as GUI application anyway.

https://developer.blackberry.com/cascades/reference/bb__application.html

 


Andrey Fidrya, @zmeyc on twitter
Contributor
guillemhs
Posts: 13
Registered: ‎12-11-2012
My Device: Curve 9320

Re: Can I run an app without GUI on Native SDK for BB 10?

But it was possible on Blackberry Java API.

 

Is it not possible to perform on the new BB 10 SDK API?

 

Cheers,

Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Can I run an app without GUI on Native SDK for BB 10?

It is not currently possible with the BB10 APIs. Maybe in future, but we'd been told in the fall it would not be available to third-party devs at launch, though presumably some time after it would be.

The termination-timeout extension idea is a cute one :-) but is unlikely to work. Someone told me with the latest release they changed that so you could ask for only a single extension, and not repeated ones as you could before.

What you can do for now is have the user run your app and just leave it running. There are settings that will allow you to request that geolocation updates continue even when your app is not fullscreen, and even when the device is in "standby", though the app does have to be left active. Once the user exits an app, you have no way to "stay running", for now.

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!
Contributor
guillemhs
Posts: 13
Registered: ‎12-11-2012
My Device: Curve 9320

Re: Can I run an app without GUI on Native SDK for BB 10?

My idea is based on an app with UI that can start background process. Is that possible on BB 10 API?
Developer
peter9477
Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10

Re: Can I run an app without GUI on Native SDK for BB 10?

I thought I'd answered that above.

No, it's not yet possible. We know nothing more yet.

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!