Coder Social home page Coder Social logo

Comments (13)

PriceFallin avatar PriceFallin commented on June 25, 2024 2

@WisaniShilumani I actually started working on an ionic3 app now with the plugin and was able to get it working with my new build.

Here's some tips:

  • Before you install the plugin, put it in a directory in your project. For example, I put mine in /plugin-src. Then when you're ready to install run ionic cordova plugin install /path/to/plugin --nofetch (the no fetch flag basically let's ionic know that there is no npm registry for the plugin.
  • Declare cordova in the class file that you want to use it in: declare const cordova: any;. This will expose cordova and the attached videoconversation methods to it so that you can call it by using cordova.videoconversation.open(...). I have my plugin named different so if cordova doesn't work then you can rename it throughout the plugin as I mentioned earlier in this thread.

Hope this helps!

from cordova-plugin-twilio-video.

WisaniShilumani avatar WisaniShilumani commented on June 25, 2024 1

@PriceFallin Thanks a million! That's super helpful. I managed with the typescript work, but later ran into problems with cordova 7. It didn't like the hyphens in the AndroidManifest.xml file during the build. The android:name="cordova-plugin-twilio-video.ConversationActivity" in particular.

I replaced all hyphens with points, and it's working fine now. Thanks for the plugin, been struggling with video calling for over 3 months now!

from cordova-plugin-twilio-video.

PriceFallin avatar PriceFallin commented on June 25, 2024

I'm assuming you're referencing an Ionic 2/3 app.

I was able to successfully implement this in an Ionic v1 app, but haven't implemented it in Ionic 2/3 yet. I do plan on doing that soon though. Also, this plugin is built for both version so I would imagine it would work.

Try declaring 'cordova' in the head of the source file where you want to use the plugin. You might have to rename it to something else like 'cordova-video-call' throughout the plugin (ex. cordova-video-call.videoconversation.open...). You can just declare it with:
declare var cordova: any

or if you change the name:
declare var cordova-video-call : any

The open command is just the function name we decided to use in the javascript that connects to the native code.

I don't have an example just yet but when I finally get this working in my Ionic3 app I'll try to send some more info if you're still having trouble. Hopefully this is helpful for you.

-Price

from cordova-plugin-twilio-video.

smuaq avatar smuaq commented on June 25, 2024

Thanks for supplying the repo @PriceFallin ! I've been using my own improved implementation of opentok plugin for video chats for over a year now. Would you be able to supply a sample running app (ionic 1) I would love to do a performance/usability test for twilio vs opentok. Thanks again!

from cordova-plugin-twilio-video.

jamesdeantv avatar jamesdeantv commented on June 25, 2024

I was able to successfully get up and running with the help of your repo. Thanks!

from cordova-plugin-twilio-video.

PriceFallin avatar PriceFallin commented on June 25, 2024

Hi @smuaq, I don't have a demo set up that I can provide. For this you'll need to just build your own, although all you really should need is a simple button that would call the cordova function to start the video chat. Of course you would also need to either set up your own server to get a token/roomID or generate one from Twilio's video tool console.

@jamesdeantv Glad you got it working!

from cordova-plugin-twilio-video.

smuaq avatar smuaq commented on June 25, 2024

Great thanks!

from cordova-plugin-twilio-video.

WisaniShilumani avatar WisaniShilumani commented on June 25, 2024

@jamesdeantv mind sharing your code?

from cordova-plugin-twilio-video.

jamesdeantv avatar jamesdeantv commented on June 25, 2024

Glad to hear you got things sorted.

from cordova-plugin-twilio-video.

dzungcao avatar dzungcao commented on June 25, 2024

Hi @WisaniShilumani, would you mind to share with me how you did the change on hyphens ?

Thank you very much.

from cordova-plugin-twilio-video.

cavalryjim avatar cavalryjim commented on June 25, 2024

@WisaniShilumani or @dzungcao, can you share the solution to the hyphens error? I have the plugin working with iOS and recently added the Android platform to my project. When trying to build, I receive:

AndroidManifest.xml:68: Tag <activity> attribute name has invalid character '-'.

Are you suggesting renaming the plugin? Uninstall, rename, & reinstall?

// plugin.xml
<plugin 
    id="cordova.plugin.twilio.video"
    version="0.2.0" 
    xmlns="http://apache.org/cordova/ns/plugins/1.0"
    xmlns:android="http://schemas.android.com/apk/res/android">
  ....
</plugin>

Thanks!

from cordova-plugin-twilio-video.

WisaniShilumani avatar WisaniShilumani commented on June 25, 2024

@cavalryjim No need to uninstall. Replace hyphens with points at both platform and plugin level. I did a search & find and made the changes at both levels. I recently made a switch to WebRTC and don't have a record of the changes, sorry about that.

from cordova-plugin-twilio-video.

cavalryjim avatar cavalryjim commented on June 25, 2024

Posting this only to help anyone experiencing the '-' hyphen issue...
I created a renamed version that works with:

$ java -version
java version "1.8.0_131"
$ npm --version
5.7.1
$ ionic --version
3.20.0
$ cordova --version
7.1.0

https://github.com/cavalryjim/videoCordovaPluginTwilioVideo

from cordova-plugin-twilio-video.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.