shared image when app its close

This commit is contained in:
Eudes Inácio
2023-10-28 17:04:17 +01:00
parent 1865240569
commit 2d08c5b776
5 changed files with 14 additions and 31 deletions
+5 -5
View File
@@ -3,7 +3,7 @@ import { SendIntent } from "send-intent";
import { Router } from '@angular/router';
import { CallbackScheduler } from './callbackScheduler';
class SendIntent {
export class SendIntentService {
Router!: Router
@@ -20,6 +20,7 @@ class SendIntent {
// event handler
if (result.url) {
this.onReceive(result)
}
}).catch(err => console.error(err));
}
@@ -38,13 +39,12 @@ class SendIntent {
let resultUrl = decodeURIComponent(result.url);
Filesystem.readFile({path: resultUrl}).then(async (content) => {
this.Router.navigateByUrl("/home/publication");
this.Router.navigateByUrl("/home/publications");
alert('shared')
console.log(content.data);
window["sharedContent"] = content.data;
})
})
}
export const sendIntent = new SendIntent()
export const sendIntent = new SendIntentService()