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: 45
Registered: ‎05-02-2013
My Device: Q10
My Carrier: Q10
Accepted Solution

Get the date or time change event

Hi, I am developing bb10 application that need to know if clock of the phone has changed by the user.

and the application execute a function in main.qml

please help me, and give me a example that I integrate in my code

Thanks

Developer
Posts: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Get the date or time change event

this should help:
http://supportforums.blackberry.com/t5/Native-Development/System-Time-change-notification-BB-10/m-p/...

I have flagged your duplicate post for deletion, please keep a question to a single thread.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 45
Registered: ‎05-02-2013
My Device: Q10
My Carrier: Q10

Re: Get the date or time change event

Hi; Thanks very much but I need a example in Qml or c++ I am new in programming to bb10; please give me all steps to introduce this in my application (I need to execute a function in my qml file when date or time change). Thanks
Developer
Posts: 6,152
Registered: ‎07-05-2012
My Device: Playbook, Dev Alpha C, Z10 LE, Z30
My Carrier: Orange

Re: Get the date or time change event

[ Edited ]

This is a peer-to-peer forum, you are unlikely to get someone to write code for you when they are probably busy writing their own.

 

Experience comes with trying things yourself so have a go at writing your own code and if and when you get stuck post the code here and someone will help.

 

There are plenty of sample apps using the BPS framework I suggest if you don't yet know how to do this in your app you look at those...

 

http://developer.blackberry.com/native/sampleapps/

 


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: 16,998
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Get the date or time change event

there are sample applications for BPS, and while it may look scary all you have to do is copy and paste the code and modify it a tiny bit to query the correct bps provider (and the code for that is already provided in the linked thread).

how to notify your qml is explained here:
https://developer.blackberry.com/native/documentation/cascades/dev/integrating_cpp_qml/

i would suggest to emit a signal from the bps code and connect that in your qml, it is most likely the easiest solution.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter