Google Cardboard Unity SDK - detecting back button press - unity3d

I'm working on a Google Cardboard app in unity and would like to exit VR mode when the phones back button is pressed.
I've tried detecting presses with Input.GetKey and Input.GetKeyDown with KeyCode.Escape. however this seems to always result in the application quitting no matter what. Is the back button's functionality written directly into the .jar used for the cardboard SDK?
Any help would be appreciated!

The back button is currently hard coded in the .jar to exit the app, in keeping with standard Android practice where the back button pops the Activity stack. It may be possible to make that an option in the SDK.
Update for v0.4.5 of the SDK: There's an option to control whether the Back button exits the app, or appears as an Escape key press.

Related

WatchOS 8 pressing one of the side buttons dismisses modal sheet

The behavior of the crown button on the Apple Watch has always been to close your app and take you to your Home Screen / watch face. Now when I build my watch app with Xcode 13 and WatchOS 8 when I press one of the side buttons it dismisses whatever modal sheet I have in my app.
This is a terrible user experience as my app is a workout app and I want my users to quickly get to other apps such as music while they are working out without closing everything out.
Apple's workout app presents a modal to add a workout but when I hit the side button in their app it takes me to the Home Screen. I have tried to watch all the latest videos and read the documentation but I don't see anywhere that I can disable this new functionality of the side buttons. Anyone know how I can change the physical side button behavior for my app? Thank you for your help!
It is a new feature. Add .interactiveDismissDisabled() to the content on the sheet or fullScreenCover.
https://developer.apple.com/documentation/swiftui/navigationview/interactivedismissdisabled(_:)
This is working as intended, it got changed in WatchOS 8.
Your best bet would be to submit it to Apple feature assistant.

Switch to fullscreen

I started programming with the Google Cardboard v0.6 about a year ago. I really nailed what I was trying to do with this software. The problem is, my software requires a toggle between full screen and stereo screen modes which I have applied a canvas button for. It is also supposed to start in full screen with an option of stereo mode.
I have three questions:
With the new SDK, is it possible to script a stereo to full screen toggle routine?
I noticed they make the GoogleVR as a fixed SDK mount within the build settings. I read something along the lines of widget controls within the Android SDK but I'm not to savvy with the way Android Studio reads the APK and how to modify it. Honestly, I'm running Visual Studio with a Source Control library in TFS so I want to keep it out of Android Studio as much as possible.
I also read there is supposed to be a full screen toggle button programmed directly into the SDK but it just doesn't pop up on my screen. Perhaps there's a method of making this button pop up that will save the day?
Even if the button exists, if there is a toggle button I'd love to have the script reference so I can apply it On Start in order to start in full screen mode.
Will toggling full screen reactivate screen canvases?
I know the new GoogleVR does not allow canvases because they have a RenderTexture problem. I'm not too concerned because I'm going to make the Toggle button freeze if no control device is registered to the bluetooth, and if there is I have a button on the control device that returns to full screen (or hopefully with that magical screen button that should exist). Whether I can toggle between the two settings is not going to make a difference if it still doesn't allow for Canvases in full screen.
My greatest frustration right now is with the discontinuation of the scripts on build. I've been using the GVRViewer and such which work just like the V0.6 software, but it appears to completely negate these scripts on build and force the build to use the SDK. I've read in the release notes that at the moment they have no intention of returning to the v0.6 platform and even recommend rolling it back to v0.6 if this is the case, but honestly - if we are forced to use an antiquated version of the software, how long will it be before it gets phased out? In my opinion based on my current observations, this feels a lot like a "one step forward, two steps back" situation.

Going back from Calendar to my app

Im my app, I have this code at a given time:
UIApplication.sharedApplication().openURL(NSURL(string: "calshow://")!)
which takes you to the calendar of the device. How could I get back to the scene where that line is executed?
Thank you.
EDIT:
Pressing home (option+shift+h, since the frame is not shown in my iOS Simulator) takes you to home, not the app, as it should be.
A quote from this:
Unlike other platforms such as Android, iPhone does not create a stack of actions (back stacking on Android). What this means is that if you do decide to launch another application, your application will not resume when the user exits from the application you opened.
If user want to get back to your app, they should press home (option+shift+H) twice, and select the your application from the list.
iOS9 introduced a new "Back-To-App" button at top-left corner, which allow you get back to your application. You should see this button after the calendar is showed from your app.

Android Enable WebView Touch Sound

I need to play touch sounds on Web view event clicks, I enabled the Touch sounds and tried it on android version less than 4.1 it works fine, from my Web View i click the radio button it make to hear the click sounds but on 4.1 and above it doesn't make click sound when I click radio button or button clicks even . I hope it's disabled from the sdk Web view itself at 4.1 and above. Let me have any possible solution to fix the issue.
Thanks in advance!
I believe this is not possible, since the events inside the WebView are not passed to the Android system, you may have a chance to create such beheaviour by embedding these sounds inside the webpage you are rendering inside the WebView.

Is it possible to pause my flash app on iphone by pressing home button?

I'm quite new to Flash. So here's my problem: I've created my app and it works great. But when I press home button on my iphone, my app minimizes and when I open it from multitasking apps, it simply restarts. Is it possible to freeze or pause the game instead of stop? Thanks!
By default the application should be eligible for the 'freeze-drying' iOS4+ functionality that resumes an app from the last place it left off. That may require a setting to be adjusted in your app descriptor (UIApplicationExitsOnSuspend should be false).
If you simply need to save data when the application is quitting, you can listen for Event.EXITING on the NativeApplication:
NativeApplication.nativeApplication.addEventListener(Event.EXITING, onExit);