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
Developer
Posts: 169
Registered: ‎03-25-2011
My Device: Playbook, Z10 L.E.
My Carrier: Vodafone NL
Accepted Solution

Block default SystemToast after setWallpaper

Hello,

 

Everytime I call bb/platform/HomeScreen.setWallpaper via QML and the call succeeds, a default SystemToast is shown with the text "Picture set as wallpaper." It's pretty much the same that appears after you change the wallpaper via the Settings > Display.

When I show a SystemToast with a different message right after setWallpaper is called, the two notifications are shown at the same time on top of each other. if you see carefully the attached screen shot you can see my custom notification message behind the default one.

IMG_00000106.png

 

How do I prevent this from happening?

 

OS Version 10.2.1.1055, using the SDK 10.2.1 Gold.

 

Cheers.

Cheers!
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Block default SystemToast after setWallpaper

I'm not sure you'd be able to prevent the system one, but you could delay the timing of your one or change its position...

 

http://developer.blackberry.com/native/reference/cascades/bb__system__systemtoast.html#property-posi...


If you've been helped click on Like Button, if you've been saved buy the app. Smiley Happy

Developer of stokLocker, Sympatico and Super Sentences.
Developer
Posts: 169
Registered: ‎03-25-2011
My Device: Playbook, Z10 L.E.
My Carrier: Vodafone NL

Re: Block default SystemToast after setWallpaper

Changing positions is a good workaround.

 

I will file a bug or feature request later.

 

Thanks a lot!

Cheers!