I am developing an ionic-cordova application with chat via Openfire.
I can’t get the si-filetransfer plugin to work
This are the npm packages:
"strophe.js": "^1.2.14",
"strophejs-plugin-http-file-upload": "^1.0.3",
"strophejs-plugins": "0.0.7",
and this the code in file .ts:
import { Strophe } from 'strophe.js';
........
this.connection.si_filetransfer.addFileHandler(self.fileHandler);
this.connection.ibb.addIBBHandler(self.ibbHandler);
but connection.si_filetransfer’ and ‘connection.ibb’ are always ‘undefined’
How can I import si_filetransfer and make it working?
Can anyone help me?
thanks in advance
It was a problem of include plugins from node modules, with this code works:
import { Strophe } from 'strophe.js';
require('strophejs-plugin-http-file-upload');
require('strophejs-plugins/si-filetransfer/strophe.si-filetransfer.js');
require('strophejs-plugins/ibb/strophe.ibb.js');
Related
After upgrading from #mui/material 5.5.0 to 5.6.4 my vite react-ts app doesn't run, throwing an error: styled_default is not a function by Popper.js, the popper component is being used by an autocomplete component
The theme provider is wrapping entire app
Autocomplete is hitting an api to populate options, but a fresh vite project with mui doesn't seem to have this issue?
Any help / pointers in the right direction would be appreciated
running react 17.0.2
vite 2.8.0
mui/material 5.6.4
For me worked by change the ThemeProvider export path
after
import { ThemeProvider } from '#mui/material/styles';
previously
import { ThemeProvider } from '#mui/material';
This issue has been closed. https://github.com/mui/material-ui/issues/32727
Yet it is an ongoing issue.
Try reinstalling your node_modules. Worked for me.
I am trying to import IonAccordion and IonAccordionGroup, but I'm facing error like
"Line 38:16: 'IonAccordionGroup' is not defined react/jsx-no-undef".
And I'm using library type as react for ionic app development. And latest version of ionic and react.
Here I've attached the picture
Thank You
This should be as simple as including the following lines at the top of your Menu.tsx file:
import React from 'react';
import { IonAccordionGroup } from '#ionic/react';
Note that IonAccordion is a new component for Ionic React 6 and you will need to upgrade to version 6 if you are using an older version of Ionic React.
Currently working on a react app which uses the Facebook SDK. It seems to brake on the import of com.facebook.CallbackManager with the following error:
/android/app/src/main/java/com/phonebook/theredcorner/MainApplication.java:5: error: cannot find symbol import com.facebook.CallbackManager;
I've tried many suggestions online but it all doesn't seem to work. Anyone recently got this error and knows how to solve it?
I'm importing it in my MainApplication.java as follows
package com.phonebook.theredcorner;
import android.app.Application;
import com.facebook.CallbackManager;
import com.facebook.FacebookSdk;
import com.facebook.reactnative.androidsdk.FBSDKPackage;
import com.facebook.appevents.AppEventsLogger;
Furthermore I've followed all steps on the Facebook getting started page to implement the Facebook SDK.
The Facebook SDK was published as an independent module to Maven. Include the dependency in the app/build.gradle file.
dependencies {
// Facebook Core only (Analytics)
implementation 'com.facebook.android:facebook-core:5.0.0'
}
You may also need to add the following to your project/build.gradle file.
buildscript {
repositories {
mavenCentral()
}
}
If the error persists after installation, make sure the file is in the next path.
facebook-android-sdk/facebook-core/src/main/java/com/facebook/CallbackManager.java
I have an ionic 3 chat application. In the chat messages users would like to place links (urls) to external resources.
Is there any opportunitiy to make this urls clickable (for chat message receivers) for opening that external resources?
Example:
Thanks in advance
Install InAppBrowserPlugin -- link
$ ionic cordova plugin add cordova-plugin-inappbrowser
$ npm install --save #ionic-native/in-app-browser
then on url call make your logic ... eg:
import { InAppBrowser } from '#ionic-native/in-app-browser';
constructor(private iab: InAppBrowser) { }
...
const browser = this.iab.create('https://ionicframework.com/');
browser.show();
// browser.close()
I am trying to import famous into my application
When i create a breakpoint in the base index.html file in ember cli and look at what require seems to know about i see famo.us is there
in my brocfile i have tried the following
app.import('vendor/famous/famous.js', {
'famous/core/Context':''
});
app.import('vendor/famous/famous.js', {
'famous/core/Context':'default'
});
app.import('vendor/famous/famous.js');
this may be fixed by master of loader.js https://github.com/stefanpenner/loader.js/issues/25