Titanium orientationchange event does not fire - titanium

I have an iOS application developed using Titanium. I am using the orientationchange event to re-layout some views when the orientation changes.
This is how the event is registered in alloy.js:
Ti.API.info("Registering orientationchange");
Ti.Gesture.addEventListener('orientationchange',function(e) {
Titanium.API.info("Orientation change detected . isPortrait= " + e.source.isPortrait() );
Titanium.App.fireEvent('orient', {portrait:e.source.portrait});
});
Then I listen for the 'orient' event in my views to perform the layout changes.
This worked just fine before, using Ti SDK 7.5 and iOS 12. It stopped working after having updated to Ti SDK 8.2 and iOS 13.1.
Now however, I just get the "Registering orientationchange" printout in the console, but the registered callback is never called.
I cannot find anything in the release notes, and the event is still documented in the Ti SDK online documentation.
Anyone found a reason or workaround for this?

Related

OnNotification() function dosen't work when i send localNotification

I am using react-native-push-notification to implement push notifications, I have followed the documentation properly when I send remote notification OnNotification() get called properly but when I send LocalNotification using PushNotification.LocalNotification() I get proper notification pop-up but it doesn't trigger OnNotification() function, I have gone through lot of stackoverflow questions and git issue still no solution, can anyone have solution have on this issue that would be great help
For ios this method will trigger/callback when you click on the notification and launch the app from killed state
PushNotificationIOS.getInitialNotification().then(notification => {
if (!notification) {
return;
}
});
I just implemented and tested in release mode, it worked well. For Andriod i'm still figuring it out which method triggers the call back in killed state.
Note: Above code works only in release mode for iOS.

Detect New Day on watchOS While App Is Open

I'm currently working on my first watchOS app extension, which is based on Xcode's Multiplatform template. I'm looking for a solution that will allow me to detect a significant date change, such as the observation of midnight, when the watch app is open. However, I've been unable to find such a solution. I'd like to avoid using Timers, if possible.
I'm able to observe UIApplication.significantTimeChangeNotification (iOS) and Notification.Name.NSCalendarDayChanged (macOS), but I've not found a similar notification for watchOS. What I did find in the documentation for WKExtension are notifications that are similar to iOS app lifecycle notifications.
What I want is to update the UI of the watchOS app when it's open and a new day is observed, which UIApplication.significantTimeChangeNotification gets me on iOS. Is there a way for the watch app to observe a date change when the app is open on the watch?
You can use .NSCalendarDayChanged on watchOS as well:
NotificationCenter.default.addObserver(
self,
selector: #selector(dayChanged(_:)),
name: .NSCalendarDayChanged,
object: nil
)

Empty Firemonkey app crashes on startup just on Android 7.1, with error NullPointerException on String.contains(CharSequence)

I created a completely new and empty FMX app, tried it using Delphi 10.3.3 and 10.4.0 (patch 3), and when installed on Android 7.1.2 devices (tried two different ones and the official simulator VM), after the splash screen this error message appears:
'java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference'
The error message box flickers quickly (endless loop) and gets slower and slower and after a minute the complete device doesn't react anymore and I can only hard reset it.
I found this thread, so I'm not alone. They say it worked until Delphi 10.1.2. There are also many other similar search results.
Is there any solution? On other Android versions it works well.
Or what can I try to get more information about what causes it?
Do you know a good candidate for an app made with Firemonkey that I could download directly and try out on the device?
Now there is a fix available at quality.embarcadero.com!
Just one line has to be added to 'Androidapi.JNIBridge.pas'. I'm not sure if I should copy it here... Will update this answer when it is released.

Worklight persistent busy indicator

I'm working on a project using IBM Worklight and any time I build and deploy my project on any simulator or device, I have this busy indicator spinner in the middle of the screen. Its always there, on every page and its there in the ios, windows, web and android simulators as well as one android device we've tested on. Has anyone seen this before and if so how would I get rid of it.
Jquery-mobile was the problem, it was continuously displaying the indicator for seemingly no good reason. Deleting Jquery mobile fixed the problem
I already used the native worklight loading.It is very good and I tested it on different platforms, devices. But it is necessary to close it when you leave the function that opened it.
Example:
var busyInd = new WL.BusyIndicator ("content", {text: "Please wait..."});
function consult(){
busyInd.show();
//impl
busyInd.hide();
}

WP8: Can this (PhoneApplicationService.RunningInBackground ) be used outside of location based app?

From this link below, it seems that your app can still get event when app is switched to background. But it seems it is used only for location based app. Can normal app do that? I had tried to declare ID_CAP_LOCATION but still Application_RunningInBackground not get called when switch to background.
http://msdn.microsoft.com/en-us/library/windowsphone/develop/microsoft.phone.shell.phoneapplicationservice.runninginbackground(v=vs.105).aspx
The app doesn't execute in background, unless it is continously tracking the location.
This section lists the conditions under which the operating system
will deactivate an app running in the background....
The app stops actively tracking location. An app stops tracking location by removing event handlers for the PositionChanged and
StatusChanged events of the Geolocator class or by calling the Stop()
method of the GeoCoordinateWatcher class.
Source: Running location-tracking apps in the background for Windows Phone 8
You will find complete info of how to run apps in background here:
How to run location-tracking apps in the background for Windows Phone 8