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
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10

Dialog When App is Minimized (Active Frame)

I would like my app to notify the user when a reminder needs to be fired. Naturaly, the user will have the app minimized (as an Active Frame).

 

I've been going through the documentation & the sample app but I can't find much to go on. How do I:

  1. Get the app to keep checking the reminders while in an Active Frame?
  2. Issue a Dialog to the user to choose whether to snooze or turn the reminder off?
  3. Update the Active Frame with the next reminder to be issued?

I've went through this: https://developer.blackberry.com/html5/apis/blackberry.ui.dialog.html

but I'm not sure which function to use and where to fire it!

 

Wadi
Please use plain text.
Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: Dialog When App is Minimized (Active Frame)

Let me make sure I understand correctly:

 

- You would like to have a dialog WHILE minimized? This is not possible in WebWorks and would require Cascades to access the system dialogs.

 

- You can run your code in the background using the run_when_backgrounded: https://developer.blackberry.com/html5/documentation/rim_permit_element.html

- To update the active frame you can issue calls to the active frames method through the updateCover method:

- https://developer.blackberry.com/html5/apis/blackberry.ui.cover.html

 

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10

Re: Dialog When App is Minimized (Active Frame)

The app would of course be minimised, the user won't have it open all the time, otherwise what's the point of a reminder. by minimised I don't mean closed, I just mean it's an active frame.
So you're saying there is NO way to build a reminder type app with WebWorks? :smileysad:
Wadi
Please use plain text.
Retired
erikjohnzon
Posts: 245
Registered: ‎09-21-2012
My Device: Q10

Re: Dialog When App is Minimized (Active Frame)

You can write a notification to the UIB using the following in WebWorks:

 

- https://developer.blackberry.com/html5/apis/notification.html

 

If that API is too constricting you can write a native extension that exploits the following:

 

- https://developer.blackberry.com/cascades/documentation/device_comm/notifications/index.html

 

 

 

@erikjohnzon
erjohnson@blackberry.com
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10

Re: Dialog When App is Minimized (Active Frame)

So if I used the Dialog in the WebWorks documentation, it won't work if the App is minimized!?

https://developer.blackberry.com/html5/api/blackberry.ui.dialog.html

 

If I DO have to use a native extension, might I find a ready one for a DIalog somewhere? :Angel:

 

I'm really trying to avoid Native & C++ development :smileytongue: I tried going native with my app, but it took me forever to get any progress done while I was able to get my App up to speed and ready in a couple of days with WebWorks. I'm a Web Developer.

Wadi
Please use plain text.
BlackBerry Development Advisor
oros
Posts: 1,557
Registered: ‎04-12-2010
My Device: BlackBerry Z10

Re: Dialog When App is Minimized (Active Frame)

You are correct wantoun, the dialog API displays a dialog within your application, which is minimized. It won't be pushed to a global / device level.

There doesn't appear to be a Community API for this yet:
https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10

Erik Oros | @WaterlooErik | eoros@blackberry.com | Developer Issue Tracker

If a reply has answered your question, please click Accept as Solution to help other visitors in the future.
Please use plain text.
Developer
wantoun
Posts: 165
Registered: ‎10-04-2010
My Device: P'9982 & Z10

Re: Dialog When App is Minimized (Active Frame)

Thanks Erik. Is there a way to "request" it or something? It's really a vital part of my app as it's sort of a reminder app.
Wadi
Please use plain text.
BlackBerry Development Advisor
twindsor
Posts: 832
Registered: ‎07-15-2008
My Device: Passport
My Carrier: Bell

Re: Dialog When App is Minimized (Active Frame)

Go to the Github link that Erik included and open an issue with the details of what you are looking for. We'll take a look and between the various community members we can see if there is some interest and an opportunity to create one.

 

Within the repository there is a Template extension if you want to try yourself.

Tim Windsor
Open Source Technical Lead
Please use plain text.