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
Developer
Posts: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Relaunch App Programatically

[ Edited ]

In my app I want to relaunch the app programaticaly when the user clicks on language change button in settings page qml.

 

 Can any one please help me with some code to relaunch the app programaticaly.

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

Re: Relaunch App Programatically

Is this because you want the controls to update?

 

Rather than relaunch the app (something not possible) could you not just remove and add back the root scene?

 

If so take a look at the dynamic QML code for how to do this.


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: 148
Registered: ‎04-08-2013
My Device: Blackberry 10
My Carrier: Blackberry

Re: Relaunch App Programatically

Thanks for your reply, So relaunching app programatically is not possible in BB 10. Right? 

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

Re: Relaunch App Programatically

also note that the base application template (when you create a new project in momentics) already contains localization code.

your application receives a signal if the device language is changed, you can update/change your application as needed then.
all translated texts are automatically changed.
----------------------------------------------------------
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: 222
Registered: ‎10-19-2012
My Device: Playbook, BB10DevAlphaB/C, Z10
My Carrier: Sonera, Saunalahti

Re: Relaunch App Programatically

I don't know if some security things come in the way but the unix way would be just exec() your own binary. But as the system is so locked down it probably won't work, but who knows, it might JustWork.


Kaj-Michael Lang, Home.
Author of: Onki and RetroPlayer