NativeScript open action extensions - nativescript

Is there way to open the iOS Action extensions from the NativeScript library?
https://developer.apple.com/ios/human-interface-guidelines/extensions/sharing-and-actions/
Basically I'm trying to open a Text file, so I can upload it to iCloud, Dropbox or send it via Email. Basically like the "intent" on Android.
NativeScript implements a function called utils.ios.openFile(this.documents.path + this.fileName) but this is opening a new Windows with a share Button. When I press this button the action extension popup opens. Is it possible to open that popup straightaway?
A TypeScript/Angular solution would be great.

I wrote this plugin. It will open the sharing-and-actions for iOS and on Android an intent.
https://github.com/braune-digital/nativescript-share-file

Related

Outlook contextual add-ins - download links are not working

I have contextual add-ins and when we click on highlighted text it will open a modal dialog, inside that it contains some link which can be downloaded. when we click on that link in web browser it works fine but when we tried on desktop outlook(Native) it is crashing.
In html i tried in 2 ways, one using anchor tag (<a href="" ng-href="api/rest/download....") and another using by blob (rest call) via angularjs.
Both ways are not working. Is this a limitation in Native outlook to not download any files or am i missing anything here?
Tried target=_blank and the result was same.
The contextual add-in dialog / card is not modal. It is transient dialog that gets closed when it loses focus. Clicking on a link to download a file will cause the dialog to lose focus and close. Also, to download a file, try the openBrowserWindow API. This will also close the contextual card.

Are there any changes in the WebView related APIs in UWP or UAP Windows app?

I am having a Windows 8.1 supported app, but now it is updated to the UWP/UAP (i.e. Windows 10) app.
After updating the custom URI scheme is not working, On a button click on the web page, we were using "navto://" custom URI scheme and handling were done in a js file. The button action was bind through the anchor tag.
From this approach, we navigate our web pages forward/backward or used to send a user to a particular web page.
But now this js file is being not called on the click of the same button and a System Popup appear saying "You will need a new app to open this navto link". For reference, please have a look at the attached screenshot of the error popup. If anybody is familiar with the issue, please suggest me the solution.
Actually I followed this page to migrating the app https://learn.microsoft.com/en-us/visualstudio/misc/migrate-apps-to-the-universal-windows-platform-uwp?view=vs-2015#MigrateCSharp
And also tried other options as well by googling but I haven't got any perfect solution yet.
Thanks

Done callback from WebView

in my XF application I have the possibility to open a web page.
For do this I use the Xamarin.Essential: await Browser.OpenAsync(url, opts);.
I need to have a callback when the user tap on Done button (on iOS) or the back button (on Andorid).
How can I do this?
There is another way other than use Xamarin.Essential?
Thank you!
EDIT
I need to execute some C# code when the user tap on the "done button" in iOS or the back button on Android when the WebView is open.
I'm not trying to execute some JavaScript code, or execute C# code from Javascript.
Android video.
Sample here.
Yeah if you don't want to use Essentials for opening pages, you could use
Device.OpenUri(new Uri("www.example.com"));
And if you want it to be in a async fucntion
await Device.OpenUri(new Uri("www.example.com"));
And if you are looking into adding callback functionality from the webview, you would need to create a HybridWebView and custom renderers for iOS & Android, as shown here.

Open certain links in external browser using Nativescript

I am working on a simple app written in Nativescript.
The app has a login form that authenticates against an API, and on success loads a webview. So not that complicated.
But I would like to be able to open certain links in the default browser on the phone, and not in webview, like links to external sites.
Is it possible to "capture" all link clicks, and if the link has the target attribute set to blank, we make the link open in a external browser?
I need a solution that works both on iOS and Android.
Is this possible to do in Nativescript?
Yes, it's possible to do that in NativeScript but not with the default WebView component. I was exactly in this situation, what I did is writing a plugin that customizes default WebView in NativeScript to override the default WKUIDelegate in iOS webview & idem for Android.
For iOS, the WKUIDelegate allow to detect if any attempt to open link with target _blank with method webViewCreateWebViewWithConfigurationForNavigationActionWindowFeatures, hence, when implementing your custom webview with this delegate allow to open link in external browser / application as you wish.
Take a look at this plugin: https://github.com/Notalib/nativescript-webview-ext to have an idea how to customize default webview.
You may use the nativescript-webview-ext plugin and use the shouldOverrideUrlLoading event to check the URL and cancel the process as needed then use the open url method in utility module to open the given url in default browser.
You can import this
import * as utils from "#nativescript/core/utils";
and then do
utils.openUrl("https://www.youtube.com/");
whenever you want to open a link (in this case youtube) in a default browser.

Firefox Custom Toolbar Button

I am trying to create a firefox toolbar button which when clicked calls (or invokes) TapTip.exe which is the Touch Keyboard for my Windows Tablet. I've tried following this tutorial (https://developer.mozilla.org/en-US/docs/XUL/Toolbars/Custom_toolbar_button) to get my button to work but no luck so far. Is there anyway I can accomplish this task?
I found a way to due this by using a addon named Custom Buttons for Firefox then I found a Launch IE button which I modified to call TapTip.exe instead of IE

Resources