native code

This commit is contained in:
Eudes Inácio
2023-10-25 20:41:00 +01:00
parent 97d86455cf
commit d7f80d7cc2
2 changed files with 13 additions and 2 deletions
+11
View File
@@ -26,6 +26,8 @@ import { Plugins } from '@capacitor/core';
import { Filesystem } from '@capacitor/filesystem';
import { NewActionPage } from '../pages/publications/new-action/new-action.page';
import { PublicationsPage } from '../pages/publications/publications.page';
import { fetchData } from 'plugins/Echo';
const { App } = Plugins;
@@ -153,6 +155,8 @@ export class HomePage implements OnInit {
refreshing() { }
async checkSendIntentReceived() {
try {
@@ -288,6 +292,13 @@ export class HomePage implements OnInit {
App.addListener('appStateChange', ({ isActive }) => {
if (isActive) {
// The app is in the foreground.
fetchData()
.then((value) => {
console.log('fetchData was successful in file2.ts',value);
})
.catch((error) => {
console.error('Error in file2.ts:', error);
});
console.log('App is in the foreground');
/* this.checkSendIntentReceived() */
} else {