Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sound and Video recording in Record activity don't work on Android/iOS #932

Closed
llaske opened this issue Feb 24, 2021 · 9 comments
Closed
Labels
bug to be release Fixed, to be release
Milestone

Comments

@llaske
Copy link
Owner

llaske commented Feb 24, 2021

On Android and iOS, features to record sounds and videos don't work. Nothing happen when clicking on matching button.

image

This feature works in the browser and in Windows/MacOS/Linux.

@llaske llaske added the bug label Feb 24, 2021
@llaske
Copy link
Owner Author

llaske commented Feb 24, 2021

Sounds related to missing of cordova-plugin-media-capture plugin.
Fix in progress on https://github.com/llaske/sugarizer/tree/feature/cordova10

@sarthak-g
Copy link
Contributor

@llaske ,
How can we add a plugin and test it with sugarizer activity (for ex: media capture plugin in record activity).

@llaske
Copy link
Owner Author

llaske commented Mar 5, 2021

@sarthak-g you could use Sugarizer APK Builder with the image llaske/sugarizer-apkbuilder:cordova10 instead of llaske/sugarizer-apkbuider:latest.

@sarthak-g
Copy link
Contributor

@llaske I mean, how can we use sugarizer as cordova project so that I can add any new plugin in it (with 'cordova plugin add' command). Right now when we do 'cordova plugin list' in sugarizer directory and cordova-plugin-sugarizeros directory, both shows they are not cordova based project.

@llaske
Copy link
Owner Author

llaske commented Mar 7, 2021

If you want to change Cordova settings or build options, use Sugarizer APK Builder but change the entry point to open a bash instead of launching build process:

sudo docker run --rm -it \
	 -v `pwd`/sugarizer:/sugarizer \
	 -v `pwd`/cordova-plugin-sugarizeros:/cordova-plugin-sugarizeros \
	 -v `pwd`:/output \
         --entrypoint /bin/bash \
         llaske/sugarizer-apkbuilder:cordova10

It launch a command line into the docker so you're free to update the build environment. Then you could launch the ./make_android.sh (the default entry point for the image) to start generation.

@saurabhhere
Copy link
Contributor

Hi @llaske @sarthak-g,
I am able to generate apk using Sugarizer APK Builder and llaske/sugarizer-apkbuilder:cordova10 but facing a few issues. Those are:

  1. In which directory we have to use Cordova command like cordova add plugin, currently for llaske/sugarizer-apkbuilder:cordova10 and llaske/sugarizer-apkbuilder:latest it is showing "not a Cordova based project".
  2. After adding the plugin how do we have to test it? Do we have to generate apk again using the docker image to test changes?
  3. If yes, How to run that apk? Do we have to use emulator to check changes or is there any other method to check changes for android/ios?
    It will be of great help to me if you can guide me.
    Thanks :)

@sarthak-g
Copy link
Contributor

Hi @saurabhhere ,
Below is the method which I followed for testing.

  1. In which directory we have to use Cordova command like cordova add plugin, currently for llaske/sugarizer-apkbuilder:cordova10 and llaske/sugarizer-apkbuilder:latest it is showing "not a Cordova based project".

You can simply add plugin with spec(version no.) in config.xml file.
Ex- for adding media capture plugin, add this line to config file:
<plugin name="cordova-plugin-media-capture" spec="3.0.3" />
After saving, when you will build apk, it will automatically install plugin.

  1. After adding the plugin how do we have to test it? Do we have to generate apk again using the docker image to test changes?

Yes

  1. If yes, How to run that apk? Do we have to use emulator to check changes or is there any other method to check changes for android/ios?

After building apk, you can install it in your phone and test it. If you have to check console messages, you can do that through USB debugging.
Steps:

  1. Enable USB debugging in your phone. Connect your phone to desktop via USB.
  2. Go to chrome browser in desktop.
    Type: "chrome://inspect" in URL and enable "discover USB devices" option.
  3. Run apk in phone and you can see your device with apk name under "Remote target" section in chrome desktop. Click on "inspect" and you can see console messages.

@saurabhhere
Copy link
Contributor

@sarthak-g Thank you for your clear and helpful explanation.

@llaske
Copy link
Owner Author

llaske commented Mar 27, 2021

Fixed in b628ec0

@llaske llaske added the to be release Fixed, to be release label Mar 27, 2021
@llaske llaske added this to the v1.5 milestone Apr 26, 2021
@llaske llaske closed this as completed Apr 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug to be release Fixed, to be release
Projects
None yet
Development

No branches or pull requests

3 participants