How can I use Google Cardboard in my portrait activity? - google-cardboard

My app has an activity use portrait mode(android:screenOrientation="portrait" in AndroidManifest.xml), for some reasons, I can't modify its screnOrientation value. Now I have to integrate the Google Cardbord feature to this activity, but the render looks weird as below picture shown, how can I fix this case? Thanks a lot!

The system ignores screenOrientation if the activity is running in multi-window mode. Can you verify that you are not running in this mode?

Related

Screenshot Notification on Browser?

I wanted to know what would be the best route in mimicking the feature of snapchat of an application being aware of a user screenshotting the page?
By the question I assume you are facing the problem of detecting a screenshot. We can monitor the clipboard and detect the application running in foreground. In case of any snipping tool, the screenshot goes to the clipboard and we can paste it directly.

Call Microsoft Edge inside Hololens app?

Does anyone know is it possible to call or embed Microsoft Edge Window in your Hololens app? For example, I have my Spatial mesh rendered and I'm detecting the flat surfaces. I'd like to be able to call new Edge Window with predefined url whenever I tap on a flat surface. Is there any way to invoke Edge Window this way inside the app?
Thanks in advance.
If you are using Unity, you might be able to use Application.OpenUrl("www.google.nl"); in order to open the standard browser.
See: Unity reference OpenURL
I am not sure if this will close your application first before opening the browser, but i hope this works for you.
If it doesnt, maybe you can try starting a new process by using: System.Diagnostics.Process.Start("PathToProgram.exe");
See: MSDN Reference
You cant open Edge inside your app, you can shut down your app and let the system start edge with a given URL.
If you need to get an image from a website you can use the unity www system:
https://docs.unity3d.com/ScriptReference/WWW-texture.html

Floating icon on other applications

I am curious to know how emojidom is able to show this icon on top of other applications. What it actually is? Because this icon pops up on whatsapp, hangouts, facebook messenger and other chatting applications. And also I can move this icon all around the screen. How is it doing so?
They may be using
android.permission.SYSTEM_ALERT_WINDOW
refer this
You should take a look at source of HALO implemented by ParanoidAndroid
https://github.com/ParanoidAndroid/HALO

Change browser window size programmatically

I am developing a responsive website. For each and every change I made in javascript, css & html file, I need to test it in all possible screen size in portrait and landscape mode. Normally we used to test it in 3 to 5 different browser window size, and in portrait & landscape. I felt changing screensize and orientation again and again is a tedious job. So planned to write a tool, which will open multiple browser windows in a different screen size with the given url loaded in it. Any idea, or advice how to start this?
PS. If you are voting for deleting this question, please consider commenting with some suggestion how I can start, or is there any free tool available for this.
Thanks in advance.
There are number of great tools and services for helping test a website in just about every possible OS/browser/size these days.
BrowserStack.com allows you to pull up your website on nearly every combination of OS/browser/size and use the site to see how elements and features perform. There are other many other services that do this.
Another option would be a browser extension/plugin like Chrome's Window Resizer. It allows you to quickly toggle between common (and custom) window sizes. This is the most manual of the three options here, and the only free option.
One final option is Adobe's Edge Inspect. This app allows you to connect several devices to your computer and simultaneously browse a site across each of the devices. It also allows you to remote inspection on each of the connected devices.
Tools like Selenium can drive browsers and resize them as needed. Depending on the language of your choice, google for something like: selenium resize browser (language of your choice)

Play AudioStreamer in Background mode in iPhone app

I was faced with the one problem.
AuidoStream doesn't works in Background mode.
So I added the "Required background modes" in Info.plist and selected "App plays audio".
But AuidioStream doesn't works in background mode yet.
In original, I had a sample AudioStream code.
I changed the some UI. origin audiostreamer works in background mode after i did like above.
But the audiostreamer that i changed some UI doesn't works in background mode.
I can't guess why this happens.
Please let me know if you know about this.
Thanks
Regards!
i had the same problem it was solved by using Required background modes in Info.plist and App plays audio. make sure you have not stopped the stream explicitly on viewDidUnload or viewWillDisappear kind of methods

Resources