Cross platform Google Sheets API implementation in Xamarin.Forms - google-api

I am creating an app in a Xamarin.Forms PCL project that uses the Google API to push some data to a spreadsheet. However, when I install the Google.Apis.Sheets.v4 nuget package, I cannot access the GoogleWebAuthorizationBroker from the PCL. When I used an interface and implemented in the Android app, it throws an unsupported exception when it attempts to open the web browser.
It says something like
"Failed to open browser with URI 'blah blah blah'.
I tried just catching that exception and using Device.OpenURI to open it, but it does not return to the app after the user signs in. Is there any way to fix this?

Related

Cannot use Google Picker from a site with SharedArrayBuffers

I want to enable SharedArrayBuffer in a web app in which I'm already using the Google Picker and Google Drive "embed item" UIs. I'm testing in Chrome 103.
I changed my web server settings to use COEP "credentialless" and COOP "same-origin". After doing this, Dev Tools' Application pane confirms that SharedArrayBuffers is available, and I'm able to instantiate them in code. However, now the i-frames containing Google Picker and Google Drive embed UIs fail to load due to missing CORP response headers.
Is this a known issue with these Google widgets, or am I missing something?
Here are the failing requests:
https://drive.google.com/file/d/[GOOGLE DRIVE FILE ID]/preview
https://docs.google.com/picker?protocol=gadgets&origin=https%3A%2F%[MY_ORIGIN]&oauth_token=...
Picker error
Google Drive embed item error
dev tools application error report
dev tools network error report

Task module with React component doesn't open

I have a Teams bot (.Net Core 3.1 + Bot SDK 4.0) and I call task module from it to render my React app. A React app is a SPA located at the same App Service as a bot. It works fine at the local stand and at the developer's stand, but at the customer's test stand, after calling the task module, a problem arises.
At desktop windows app there is happening nothing at first time, after the second click of the button to open the task module, an error appears at the bottom of the adaptive card:
There is an error in the Developer Tools:
I also tried to open this task module in popup application mode, it returns an error window:
In the Developer Tools, in this case, I have the following errors:
When I try to open my React app from the browser or use it as a tab for my bot, it works fine. What should be the problem with opening it as a task module? Maybe I need to do some extra steps in the Microsoft Teams admin center?
I found a way to solve the problem. I installed the bot through a local upload of the manifest, but then I found out that it was also added to the list of applications for our organization (at Teams admin center), and apparently there was some kind of collision between them. After I uninstalled the application from my desktop Teams and installed it from the application pool - the error disappeared.

What is the Idiom type for Xbox?

I have a UWP app created using Xamarin.Forms and I uploaded it on Microsoft Store, I enabled Microsoft to decide which platforms can I support, Xbox was automatically selected by Microsoft. I cant unfortunately test it since I dont have Xbox or any emulator available. But I am seeing that there are some downloads and Microsoft Developer Console shows the type as "Console"...
Now my question is on Xamarin.Forms doesnt have that idiom as Console, it is defined here as phone, tablet, desktop, tv, Unsupported... how to check for Xbox?
This is not built into Xamarin.Forms, so you will have to use Windows-specific API to recognize if the app is running on Xbox. You can implement a custom Dependency service that will have an interface which you will implement in UWP project. The documentation will tell you how to do it.
Then to check which type of device the app is actually running on you can check the value of:
Windows.System.Profile.AnalyticsInfo.VersionInfo.DeviceFamily
This property contains a value depending on which type of hardware the app is currently open:
"Windows.Xbox"
"Windows.Mobile"
"Windows.Desktop"
"Windows.Team"
"Windows.IoT"
"Windows.Holographic"

Google sign in with Xamarin

I'm implementing Google sign in for my Xamarin app, by following this article. Which nuget package contains the GoogleSignIn object?
Before you are able to work using these APIs and you will use WebView but you will get an Authentication error, disallowed_useragent.
Look at this article:
https://medium.com/#didourebai/authentication-with-google-using-xamarin-forms-403-thats-an-error-disallowed-useragent-fcaadad6f01a
And the solution is to use Xamarin.Auth
https://github.com/xamarin/Xamarin.Auth

Is it possible to create an iOS 8 sharing extension that opens the website in its app?

I'm building an app, and I was curious if there's a way to open the app when you're on the website through the iOS Safari extension. So, if I'm on a post I'd tap the app icon in the share sheet and I'd pass that to the app to load the post in the app.
I know the Bing app can translate the current website and inject directly into the DOM, so I was wondering what custom logic you can implement.
There's really no way to open the app from this kind of extension. Extensions can't access [UIApplication sharedApplication], so they can't call openURL:. There's an openURL:completionHandler: method on NSExtensionContext, but it only works in "today" extensions. Share extensions can display a fully custom UI and can save data that's available to their containing app, but they can't actually open that app.

Resources