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

Web and WebWorks Development

Reply
New Contributor
Posts: 4
Registered: ‎06-09-2011
My Device: Bold 9700
My Carrier: ATT

Possible for WebWorks widget get time or location updates when not open?

Is it possible for a WebWorks widget to check the time or location periodically, when not open?

 

An example would ploting my movment for a day,  the phone would need to check its location every 10 min or so and store the data.

 

Would that need to me done in a full JAVA app?

 

p.s.

Sorry if this has ben brought up, I may just be searching the wrong terms.  If that is the case, could you let me know the corect terminology.

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Possible for WebWorks widget get time or location updates when not open?

You can build your application to run in the background and periodically grab GPS location data..I'm not sure what exactly you mean by "when not open".. do you mean when it is not in the foreground?

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Contributor
Posts: 4
Registered: ‎06-09-2011
My Device: Bold 9700
My Carrier: ATT

Re: Possible for WebWorks widget get time or location updates when not open?

Thanks,

 

Yes, running in the background is what I meant. I have not seen any documentation on this.  Do you have any recommendations.

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Possible for WebWorks widget get time or location updates when not open?

It's easy to do with HTML5 workers, but you may drain the device's battery

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Possible for WebWorks widget get time or location updates when not open?

You actually shouldn't even need to use Workers...  Can you explain more about how you want your application to work.  It is hard to give accurate advice without knowing a bit more Smiley Happy

 

Do you want your app to have a UI or just run in the background?  

 

Do you want your application to run on install and startup of the device?

 

Any other details are helpful.  You have a bunch of options on how to technically make things work, but we'll need to know a bit more to give you the right direction

 

Cheers,

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Possible for WebWorks widget get time or location updates when not open?

I'd be interested in knowing how you can get an app to do things in the background on the PlayBook in the default mode then Smiley Happy. Every app I've used stops working when sent to the background.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: Possible for WebWorks widget get time or location updates when not open?

On the PlayBook it depends on your display modes (Showcase, etc).  The user can set it so that apps can run in the background or not.

 

I'm not sure if there is a way for your app to override this.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: Possible for WebWorks widget get time or location updates when not open?

That's the reason I thought workers should be used, but would those be frozen as well?

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
New Contributor
Posts: 4
Registered: ‎06-09-2011
My Device: Bold 9700
My Carrier: ATT

Re: Possible for WebWorks widget get time or location updates when not open?

Details are few, we are just consieving of ideas for games we can create for the office to play and get familiar with balckberry Webworks dev. 

Something along the lines of tracking your movements through the day, and they doing some graphic manipulation of the path you made (make it a pictures, overlay with someone elses, make a colage - but that would all be on the server).

 

So we would collect the persons gps position every 10-30min, store them on the phone, then at the end of the day/week they can send the list of coordinates and times to our server.

 

There would need to be a UI for set up, maybe mark home and work as center points  and for the user to send the path data at the end of the day, week (we don't want that to be automatic , although it might be more educational for us). 

We figure this would be a good little learing tool for us, hitting a bunch of common dev elements (storing data, sending data, cron type jobs, gps and loading maps....)

Really just an exploratory thing to find out what might be possible.

New Contributor
Posts: 4
Registered: ‎06-09-2011
My Device: Bold 9700
My Carrier: ATT

Re: Possible for WebWorks widget get time or location updates when not open?

Sorry I relaize I did not answer all of your questions.

 

Do you want your app to have a UI or just run in the background?  

Yes there would be a UI for set up and sending the recorded data.

 

Do you want your application to run on install and startup of the device?

Yes that is what we were imagining.

 

Thanks for tall of the help!