I'm trying to show NowPlayingView on Apple Watch when I play music on an app on iOS.
As described in the documentation when turning on music on iOS, this opens the application on WatchOS and the handleRemoteNowPlayingActivity should fire in the WKExtensionDelegate. All methods of this delegate are fired but not handleRemoteNowPlayingActivity.
What's wrong?
Related
I'm writing a cross-platform Gtk3 application in C++. Lately I've been working on the integration with MacOS:
Gtkmm 3.24 obtained via Homebrew;
XCode 12.0;
MacOS Catalina 10.15.
I have derived my application class from Gtk::Application. The application object overrides the 'on_startup()' which calls the base class 'on_startup() and then uses a Gtk builder resource to construct a Gio::Menu object from an XML file, and then 'Gtk::Application::set_app_menu()' to install it:
MyApplication::on_startup()
{
Gtk::Application::on_startup();
// skipping details: ... Gtk builder reads Gio::Menu object from resource file ...
set_app_menu( pMenu );
}
When I first launch my application:
the menu bar is unresponsive. The application menu appears next to the Apple menu in the bar at the top of the screen, but neither responds to mouse clicks;
except from the frozen menu bar, the application is functioning normally and its main window is responsive.
However, then:
click on any other open application's window, that application's menu bar appears;
click on my application's window to switch back to it, its menu bar returns and now works perfectly.
This is 100% reproducible (frozen at first, toggle away to another app and back and now the menu works).
I created another project in XCode and built the Gtkmm example "app_and_win_menus" and the example application behaves the exact same way.
So I think I'm really just looking for a workaround. I've been scouring the net for any information about this problem and saw others complaining generally about frozen menu bars on MacOS but none specific to Gtk (all other applications on this Mac work normally, it's only the apps that I build with Gtk+/Gtkmm 3.24 that exhibit this issue).
I realize this sounds a bit like a bug report and this may not be the place to bring it up, but I'm unsure where to go from here. Any information much appreciated.
I want to port my Qt application to use the apple pencil on an iPad Pro. Currently, my app uses QTabletEvent to draw to a QGraphicsScene using a Wacom enabled device. I'm planning on trying to handle events from apple pencil with objective-c++ and feed it into Qt's event system. I've never used objective-c++, what are some good tutorials to try to solve this problem? I'm specifically looking for how to pass events from objective-c++ to Qt.
You can call any Qt code from methods in Objective C++ code. You can easily create new events and post them to your application.
You have probably already noticed the pin button of KDE, that pins a window across multiple virtual desktops. I would like to know what API the pin button functionality is part of, is it X or KDE or something else? The pin button is second from the left in the image below.
On KDE SC 4.x ut is part of the kwin API. It is KWin::Workspace::slotWindowOnAllDesktops. It is also available through the kwin javascript scripting api as slotWindowOnAllDesktops()
On KDE Frameworks 5 it is part of the KWindowSystem API. Specifically it is KWindowSystem::setOnAllDesktops
My ultimate wish is to allow users using a touchscreen desktop (an All-in-one computer without mouse or keyboard) to navigate on a website that uses tooltips. Using a mouse, hovering over a tooltip opens it, the tooltip contains links that can be clicked. Using a touchscreen, there is no hover, only 'touches'/clicks. In both cases the page will be displayed on the same OS using the same browser, once the user has a mouse, the other time the user has a touchscreen.
So I need to distinguish between the two: a desktop computer with a mouse and a touchscreen desktop computer without a mouse. Modernizr touch tests (http://modernizr.github.com/Modernizr/touch.html) fail completely on a touchscreen desktop (http://shop.lenovo.com/us/landing_pages/thinkcentre/2010/m90z). Sniffing the UA or browser does not work either.
(After a fair amount of searching, all the detection tries to distinguish different versions of mobile phones or tablets, browsers, UAs... Not desktop touchscreens that are running on the same OS using the same browser.)
Any ideas?
Add event listeners touchstart and mousemove to your page, then wait the user starts to interact with your page. If the first event is mousemove, then user operates with mouse, so it is probably a desktop, otherwise this is a touch-screen.
$(document).on('touchstart.desktopDetect mousemove.desktopDetect', function(ev) {
window.IS_TOUCHSCREEN_DEVICE = (ev.type == 'touchstart');
$(document).off('.desktopDetect');
});
Check working example here:
https://jsfiddle.net/evpozdniakov/uvb51cnm/embedded/result/
I am using Qt to develop an application and inside we have access to select flash streaming videos like youtube. Is there a way to programmaticly full screen the flash application without requiring interaction from the user?
I am using a "QWebView" control.
try calling showFullScreen for the window where your QWebView control is hosted.
void QWidget::showFullScreen ()
Shows the widget in full-screen
mode.
Calling this function only affects
windows.
To return from full-screen mode, call
showNormal().
I would say: locate the button for the fullscreen application on the page, and send a click using QEVent. Tricky, but might work.
If the button is inside the flash application, you will have difficulties to locate it but if you succeed, you can probably send the click to the flash application area.
You can always inject javascript from Qt into your QWebPage. If there is a javascript API for forcing the flash viewer to full screen, I do not know.