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
+3 -23
View File
@@ -152,7 +152,7 @@ export class HomePage implements OnInit {
async checkSendIntentReceived(result) {
async checkSendIntentReceived() {
SendIntent.checkSendIntentReceived().then((result: any) => {
@@ -294,29 +294,9 @@ export class HomePage implements OnInit {
if (!this.platform.is('desktop')) {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
/* this.checkSendIntentReceived("value") */
// The app is in the foreground.
/* fetchData()
.then((value) => {
console.log('fetchData was successful in file2.ts', value);
this.imageToBase64(value)
.then((base64Data) => {s
if (base64Data) {
// Use the base64 data as needed
console.log('Base64 data:', base64Data);
} else {
console.error('Base64 data is null');
}
});
if (value)
this.checkSendIntentReceived(value)
})
.catch((error) => {
console.error('Error in file2.ts:', error);
}); */
/* sendIntent.setRouteService(this.router) */
console.log('App is in the foreground');
/* this.checkSendIntentReceived() */
this.checkSendIntentReceived()
} else {
// The app is in the background.
console.log('App is in the background');