@@ -16,7 +16,7 @@ Send/Share files to other apps.
1616
1717Android Intent, IOS InteractionController:
1818
19- <img src =" https://github.com/braune-digital /nativescript-share-file/blob/master/preview/preview-android.png?raw=true " width =" 250 " > . <img src =" https://github.com/braune-digital /nativescript-share-file/blob/master/preview/preview-ios.png?raw=true " width =" 250 " >
19+ <img src =" https://github.com/FinanzRitter /nativescript-share-file/blob/master/preview/preview-android.png?raw=true " width =" 250 " > . <img src =" https://github.com/FinanzRitter /nativescript-share-file/blob/master/preview/preview-ios.png?raw=true " width =" 250 " >
2020
2121
2222
@@ -25,48 +25,48 @@ Android Intent, IOS InteractionController:
2525Install the plugin in your app.
2626
2727~~~
28- npm install nativescript-share-file
28+ npm install @finanzritter/ nativescript-share-file
2929~~~
3030
3131## Usage
3232
3333Info: Shared files should be in the ` documents ` path.
3434
3535``` TypeScript
36- import { ShareFile } from ' nativescript-share-file' ;
37- import * as fs from ' tns-core-modules/file-system ' ;
38-
39- export class TestClass {
40-
41- shareFile ;
42- fileName ;
43- documents ;
44- path ;
45- file;
46-
47- constructor () {
48-
49- this .fileName = ' text .txt' ;
50- this .documents = fs . knownFolders .documents ();
51- this .path = fs . path .join (this .documents .path , this .fileName );
52- this .file = fs . File .fromPath (this .path );
53- this . shareFile = new ShareFile ();
54-
55- this . shareFile . open ( {
56- path: this .path ,
57- intentTitle: ' Open text file with: ' , // optional Android
58- rect: { // optional iPad
59- x: 110 ,
60- y : 110 ,
61- width: 0 ,
62- height : 0
63- },
64- options: true , // optional iOS
65- animated : true // optional iOS
66- });
67- }
68- }
69-
36+ import { ShareFile } from ' @finanzritter/ nativescript-share-file' ;
37+ import { Observable , knownFolders , path , File } from " @nativescript/core " ;
38+
39+ export class TestClass extends Observable {
40+ shareFile;
41+ fileName ;
42+ documents ;
43+ path ;
44+ file ;
45+
46+ constructor () {
47+ super ();
48+
49+ this .fileName = ' test .txt' ;
50+ this .documents = knownFolders .documents ();
51+ this .path = path .join (this .documents .path , this .fileName );
52+ this .file = File .fromPath (this .path );
53+
54+ this . shareFile = new ShareFile ();
55+
56+ this .shareFile . open ({
57+ path: this . path ,
58+ intentTitle: ' Open text file with: ' , // optional Android
59+ rect: { // optional iPad
60+ x : 110 ,
61+ y: 110 ,
62+ width : 0 ,
63+ height: 0
64+ },
65+ options : true , // optional iOS
66+ animated: true // optional iOS
67+ });
68+ }
69+ }
7070```
7171
7272### Arguments
0 commit comments