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
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve

Invisible app

Cna we have an app in BB10 that is running in background, not visible to user. It needs to do some bookeeping operations that user need not intervene.

 

-thanks

Please use plain text.
Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810

Re: Invisible app

You can set an application to run in background by setting 

<permission>run_when_backgrounded</permission>

 

 

See this for more info: https://developer.blackberry.com/cascades/documentation/dev/fundamentals/

 

-Dishooom

Please use plain text.
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve

Re: Invisible app

This will not make app invisible to the user when no other apps are running..rt?
I mean user can see the app in the task manager.
Please use plain text.
Developer
dishooom
Posts: 103
Registered: ‎12-31-2012
My Device: Blackberry 9810

Re: Invisible app

[ Edited ]

 

Running in the background

run_when_backgrounded permission

 

Perform background processing. Without this permission, your app stops all processing when the user switches focus to another app.

You should use this permission sparingly and only when your app must perform processing in the background. This permission is useful for apps that play music or manage downloads. Apps that use this permission are rigorously reviewed for acceptance to theBlackBerry World storefront for their use of device battery power.

Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900

Re: Invisible app

What might your application be doing - maybe there is a better option?

 

If your application is "spyware" don't expect to get much help from the community. ;-)

 

 

If you have an app idea (like I do) that I want to run like an alarm clock that does nothing until exactly 6 AM (and becomes awake and visible) then maybe there is a better way? or worst case scenario... I plan to make my active frame a silhouette image of a sleeping cat... indicating when it will next wake up.


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.
Regular Contributor
mdmdev
Posts: 75
Registered: ‎11-30-2012
My Device: curve

Re: Invisible app

Basically i am doing this for asset tracking. This is not a spyware :smileytongue:.

Please use plain text.
Trusted Contributor
fireball003
Posts: 132
Registered: ‎10-01-2012
My Device: Playbook

Re: Invisible app

Hi steve_web,
I am working on a custom alarm app. However, I cannot find a way to wake the app up at next set time (while not running in the background). How did you do that? What is the better way?
Please use plain text.
Developer
Ebscer
Posts: 867
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha

Re: Invisible app

This is not yet possible.

 

However the development roadmap points to a planned release of "headless applications" which would work in this case. You will most likely need to wait until summer for this to be released... http://developer.blackberry.com/native/downloads/roadmap/


Read my thoughts on BlackBerry Development at news.ebscer.com
Please use plain text.
Trusted Contributor
fireball003
Posts: 132
Registered: ‎10-01-2012
My Device: Playbook

Re: Invisible app

[ Edited ]

Should I mention (which I already did here) that it works for ported android apps. I have found one custom alarm app (Islamic Qibla and Prayer Times), ported from android, in BB world which starts by itself at scheduled time. How come cascades is limited when compared to android player?

 

Is there any way to do that using native APIs?

Please use plain text.
Developer
steve_web
Posts: 321
Registered: ‎05-07-2009
My Device: BlackBerry Z10, PlayBook, 9900

Re: Invisible app

Interesting notes... I didn't realized that the minimized apps can't be easily "re-launched".

 

My situation is very specific and hopefully I find a good solution ;-)

 

Without giving the game away... this is what I'm after with my app.
 (pseudo code)

 

if(time >= magicTime){

    if(conditionOfSomeFeatureOnDevice != desiredCondition){

        //do some sort of action...

        //audible alarm, notification, vibrate, activate the flux capacitor, etc.

    }

}

 

I'm totally ok with my app being visible but minimized the whole time (active frame mode)... and my "code" can run only at the magicTime... or check every 15/30min if it is at/past the magicTime... I'm ok either way... but somehow doing some sort of action would be handy... very handy... I look forward to any cool options that come up otherwise I'll wait until the Headless apps are available as noted on the roadmap: http://developer.blackberry.com/native/downloads/roadmap/


PlayBook Apps: DataMine, Dots + Boxes, 5 Marbles
BlackBerry SmartPhone Apps: 5 Marbles Soon: **** (D.Z.A), ****Quest, **** Challenge, VaultCracker, DevBrowser, Radial****
Please use plain text.