Code to turn blackberry off - blackberry

Is there a command or piece of code that I can use to switch the blackberry off from within my app? I have created a simple app that consists of a button, now what I want is for the device to shut down whenever the button is clicked. Is this possible?
Thanks

Yes Device.requestPowerOff(boolean allowAutoStart)

Related

IOS App language not change on click button using LanguageManager-iOS-Lokalise0.1.3

I am using LanguageManager-iOS-Lokalise0.1.3 library for changing app language. This works if i restart the App. I want to change app language at run time on click of button. How can I achieve that using LanguageManager-iOS-Lokalise.
No it is not possible, because you need to re render the view controller. One way is to pop to rootView controller and after language change.
P.S you need to change .semanticContentAttribute to .forceRightToLeft for all class you want to change RToL

Checking through safari whether the PWA is added to homescreen

So I have coded myself a way to display the pop-up encouragement to add the app to home screen on iOS for PWA. OK, user does it, when he clicks through the app all is good. However, when he returns to the website, I want to check whether the app has already been added to the home screen. I have found only this so far: https://stackoverflow.com/a/39986409/6470918
This states that basically it is impossible. Did this situation change during the last two years?
Thank you in advance,
Grzegorz

Custom button to iOS print panel

I was wondering if it's possible to add a custom button to the print panel (UIPrintInteractionController) in an iOS app and if so how to go about doing that. Thanks.

How to change the keyboard in Phonegap iOS

I have making a phonegap app which have text fields in it.
Problem:- I want to remove the Done button from the keyboard or I want a Event listener of done button. Ether of the things will work for me.
My Problem is similar to this link
You can't remove the done button, since Phonegap uses a UIWebView to present the UI you will be stuck with keyboard used by the UIWebView.

iPad prevent page drag

I am writing an application for iPad using phonegap (Simple application using HTML5 and jQuery). The problem is the application window is draggable, as seen in image when I drag window down it comes down and when I leave window it goes up automatically. I don't want this behavior.
Try to set the UIWebViewBounce to NO in your file Cordova.plist.
Check this link: How to prevent app running in phone-gap from scrolling vertically?
Note: with this solution, you may disable the "landscape mode" of your app.
Hope this helps, let me know if this works for you mate

Resources