BlackBerry programming - Close popup screen with a tap - blackberry

I have a popup screen (a small screen) stays on top of a main screen.
This popup screen has a button, the button will close the screen when clicked.
Do you know how to close this popup screen when users tapping on the phone, outside the area that the popup screen cover (without clicking the button)?
FYI: app is designed to run on touch phone only (BB Storm, BB Torch...)

You can try overriding the touchEvent method on both the screen and the popup. If you return true in the popups touchEvent then the only touchEvents the screen will receive should be outside of the popup.
http://www.blackberry.com/developers/docs/5.0.0api/net/rim/device/api/ui/Field.html#touchEvent(net.rim.device.api.ui.TouchEvent)

It's not entirely clear what you're after from your question, but generally you can use this code to remove any screen from the screen stack:
UiApplication.getUiApplication().popScreen(screen);

Related

Can I suppress alert "It looks like you are typing while in full screen" over iOS 12 fullscreen mode

We are trying to show video over iOS safari with fullscreen mode (on later iOS 12, if the user enabled fullscreen mode API) and trying to allow the user to tap video screen to show some interactive effect over video (on fullscreen mode).
but when we tap screen several times on fullscreen mode, an alert dialog of "It looks like you are typing while in fullscreen" was shown.
We want to avoid this message in some way.
We will appreciate any help. Thank you in advance.
Only a partial answer, but this was a solution for us:
The warning does not occur when the website is launched from the iOS home screen.
Open the web page in Safari
Tap the Share button
On the bottom row of icons, scroll over until you see Add to Home Screen and tap this.
A new shortcut will be added to the iOS homescreen
Launch from here and this warning message will not bother you
This is only a solution if you're in control of the iPad, or if your users are very compliant! But in our case this was all we needed. Hopefully some others will find the same.

iOS 10 local notifications: show notification content on lock screen

I've added local notification with Notification Content Extension.
It shows okay on home screen (with app in background).
The problem lies in displaying notification content on lock screen. When notification arrives on lock screen, it is only displayed with text and swiping left shows "Clear" button.
I need some way to show notification fully from lock screen (as on home screen).
For example I saw "View" button in some of the tutorials/articles, can I even create or control something like it?
So with notifications on iOS 10, Apple changed the way they appear on devices. When the screen is locked, you can see a View and Clear button or just clear button based on whether the device is enabled with 3D touch or not.
Swiping left on a message now offers View and Clear on non-3D Touch devices or just Clear on 3D Touch devices.
On 3D Touch devices, the long press on notification reveals the notification actions menu which can be customized using Category definition in the code.
Hope this answers your query.

iOS 9 new back button animation

So apple brought some new functions with iOS9.. One of these is the tiny black back-button, which appears when I open an app over a popup or something like that.
In my app the user can press a button to enter the settings. Then this new button appears. I was able to register, when this button was pressed, but as soon as the animation appears, there is such a black background. Is there a possibility to change the color of this animation-background?
As you can see, I mean this button:
This black background:

Can I make my iphone app use only a portion of the screen

I was hoping to create a small windowed screen when the home button is pressed. It would keep a portion of the app process open while another app isn't open.
So say I had music playing on the app and when the home button gets pressed the screen would be windowed or shrunk and just displayed over the main screen (kind of like the little help button that can be moved around). Would using widgets in IOS 8 work?
When the user presses the Home button, the app goes to background, and that's it. You can't customize that action.
You only get a notification that the user closed the app so that you can save your app state or data for the next launch.

How to replicate home button double tap effect on click of a button?

In IOS, when we double tap the home button, it lift's the current app and shows all the app that are running on the bottom. I can scroll the bottom and select the music player option from there. I want to achieve the same screen lift effect, when user taps a button from withing the app instead of double tapping the home button. Is it possible to that? If yes, how can we do it?
No the home button function (unless jailbroken) cannot be re-created inside your UI.
Also since iOS6 users can opt to have Guided Access enabled, if that button where to be created would be considered useless. Now that would be a pain to do in a de-bugging process.
You would have to access the Home Button API (if there was one) as well as the guided access API.

Resources