Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nativescript-community/ui-share-file

Package Overview
Dependencies
Maintainers
12
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nativescript-community/ui-share-file - npm Package Compare versions

Comparing version 1.2.1 to 1.2.2

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

## [1.2.2](https://github.com/nativescript-community/ui-share-file/compare/v1.2.1...v1.2.2) (2021-03-09)
**Note:** Version bump only for package @nativescript-community/ui-share-file
## [1.2.1](https://github.com/nativescript-community/ui-share-file/compare/v1.2.0...v1.2.1) (2020-11-02)

@@ -8,0 +16,0 @@

24

index.d.ts
export interface ShareOptions {
path: string;
rect?: {
x;
y;
width;
height;
};
animated?:boolean
options?:boolean
title?:string
type?:string
path: string;
rect?: {
x;
y;
width;
height;
};
animated?: boolean;
options?: boolean;
title?: string;
type?: string;
}
export declare class ShareFile {
open(args: ShareOptions): Promise<boolean>;
open(args: ShareOptions): Promise<boolean>;
}
{
"name": "@nativescript-community/ui-share-file",
"version": "1.2.1",
"version": "1.2.2",
"description": "Send/share file to other apps.",

@@ -34,3 +34,3 @@ "main": "share-file",

"bootstrapper": "nativescript-plugin-seed",
"gitHead": "dfc38f17dd2519927e08f21a1e4a1066c5857b83"
"gitHead": "a4b376cdb1e5f427f2847aa1528623f8cc7e62e2"
}

@@ -1,2 +0,2 @@

import { AndroidApplication, android as androidApp, } from '@nativescript/core/application';
import { AndroidApplication, android as androidApp } from '@nativescript/core/application';
import { File, Folder } from '@nativescript/core/file-system';

@@ -14,12 +14,14 @@ const REQUEST_CODE = 2343;

intent.addFlags(android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION);
const uris = new java.util.ArrayList();
const uri = this._getUriForPath(path, '/' + this.fileName(path), androidApp.context);
uris.add(uri);
// uris.add(uri);
const builder = new android.os.StrictMode.VmPolicy.Builder();
android.os.StrictMode.setVmPolicy(builder.build());
intent.setAction(android.content.Intent.ACTION_SEND_MULTIPLE);
intent.setType('message/rfc822');
intent.putParcelableArrayListExtra(android.content.Intent.EXTRA_STREAM, uris);
const activity = androidApp.foregroundActivity ||
androidApp.startActivity;
intent.setAction(android.content.Intent.ACTION_SEND);
intent.setType((args === null || args === void 0 ? void 0 : args.type) || '*/*');
intent.putExtra(android.content.Intent.EXTRA_STREAM, uri);
// intent.putParcelableArrayListExtra(
// android.content.Intent.EXTRA_STREAM,
// uris
// );
const activity = androidApp.foregroundActivity || androidApp.startActivity;
const onActivityResultHandler = (data) => {

@@ -26,0 +28,0 @@ androidApp.off(AndroidApplication.activityResultEvent, onActivityResultHandler);

@@ -45,3 +45,3 @@ import { Application } from '@nativescript/core';

controller,
delegate,
delegate
};

@@ -48,0 +48,0 @@ this.resolve = resolve;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc