Coder Social home page Coder Social logo

cordova-plugin-dbmeter's People

Contributors

akofman avatar mirupal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

cordova-plugin-dbmeter's Issues

Error when iOS simulating because of a swift compiler

To have this plugin installed (without using it or even mentioning it in config.xml) is enough to create a build fail for iOS but for iOS only (for android the problemes come after with a blacked screen).

Here is some of the error outputs
** BUILD FAILED **
The following build commands failed:
CompileSwift normal i386 /Users/Workfluo/ionic-server/wad/platforms/ios/What a Day/Plugins/cordova-plugin-dbmeter/DBMeter.swift

CompileSwiftSources normal i386 com.apple.xcode.tools.swift.compiler

(2 failures)

Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/Workfluo/ionic-server/wad/platforms/ios/cordova/build-debug.xcconfig,-project,What a Day.xcodeproj,ARCHS=i386,-target,WaD,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/Workfluo/ionic-server/wad/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/Workfluo/ionic-server/wad/platforms/ios/build/sharedpch

Can't build for iOS due to Swift update

[11:55:36]: ▸ ❌ /Users/ionic/builds/XXX/XXX/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginDbmeter/DBMeter.swift:75:50: 'AVAudioSessionCategoryRecord' has been renamed to 'AVAudioSession.Category.record'
[11:55:36]: ▸ try audioSession.setCategory(AVAudioSessionCategoryRecord)
[11:55:36]: ▸ ^~~~~~~~~~~~~~~~~ ~~~~~~~~
[11:55:36]: ▸ ** ARCHIVE FAILED **
[11:55:36]: ▸ The following build commands failed:
[11:55:36]: ▸ CompileSwift normal arm64 /Users/ionic/builds/XXX/XXX/ios/capacitor-cordova-ios-plugins/sources/CordovaPluginDbmeter/DBMeter.swift
[11:55:36]: ▸ CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler
[11:55:36]: ▸ CompileSwift normal arm64
[11:55:36]: ▸ (3 failures)

volume +/- buttons on iPhone is disabled after DBMeter.start

Hi,

I found a problem, once DBMeter.start is called, the volume +/- button on iPhone are not working any more.
Even after DBMeter.stop or .delete is called, still don't work.

Could you please have a check on this?

Thank you for your great work.

Swift Error

I get this error:

Check dependencies
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.
The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.

** ARCHIVE FAILED **

My config:

<gap:plugin name="cordova-plugin-add-swift-support" source="npm"/>
	<preference name="UseLegacySwiftLanguageVersion" value="true" />
	<gap:plugin name="cordova-plugin-dbmeter" source="npm"/>

DBMeter counting limited to 90

Hey!

I noticed that the counter is limited to 90 for me, and when the dB is higher than that, it just freezes at 90. Is that a bug, or some proposital thing?

Thanks anyway, love that plugin!

iOS: calling DBMeter.start multiple times results in -70db

When calling DBMeter.start() multiple times (accidentally or on purpose) the resulting dB value will always be -70.

I would suggest, throwing an error, on multiple starts.

My setup was:

const dummy = {
  dB: 0,
  isListening: false,
  startMeter() {
    const $this = this;
    setInterval(() => {
      if (!this.paused) {
        if (!this.isListening) {
          DBMeter.isListening((isListening) => {
            this.isListening = isListening;
            if (!isListening) {
              DBMeter.start(_.throttle($this.recordMeter, 100), $this.errorLog);
            }
          }, $this.errorLog);
          return;
        }
        // update stuff with this.db
      }
    }, 100);
  },
  recordMeter(dB) {
    this.dB = dB;
  },
  errorLog(e) { 
    // log
  }
};

On iOS the first few intervals DBMeter.isListening() passes false so i told the system to start again.
After like 0.3 to 1 second DBMeter.isListening() passes true.

Cannot record file with cordova-plugin-media while dbmeter listening

Hello, while dbmeter is listening, apache/cordova-plugin-media creates empty files. media.startRecord() and media.stopRecord() are not throwing exceptions. When dbmeter is not listening everything works well.
Spec.: ionic 3.12.0, cordova 6.5.0, ionic-angular 3.3.0, Android 6.1.2 platform.

volume compare from mic ?

Hi,
is it possible to compare a volume from microphone ? something like low or high volume from microphone directly when we speak (ios cordova)
thanks

fatal error: unexpectedly found nil while unwrapping an Optional value (lldb)

Hello,
Thank you for this plugin. It works perfectly on android for me, but i've found a problem wih IOS. I can build my project with Xcode 8.2 without errors, but when I run in debug mode, I get the above message in DBMeter.swift - private func timerCallBack() -
In release mode it simply crash.

errorxcode

I got this error after i chnaged build settings optimization to none

because with default values i have this error while bulding:

was compiled with optimization - stepping may behave oddly; variables may not be available

Many thanks for your support

Android null pointer Exception

Hi everyone, i'm using this plugin for an Android app, and sometimes in my google developer console i can see that on some devices the app crashes with this stack:

java.lang.NullpointerException:
at org.apache.cordova.dbmeter.DBMeter$1$1.run
at java.util.TimerThread.mainLoop
at java.util.TimerThread.run

Can you please help me?

New Update

Is there a newer version of this plugin? I don't think it is accurate though it returns results straight out of the box.

DBMeter.start after DBMeter.delete inconsistent behavior

after doing a DBMeter.delete(callback, errorLog); the use of DBMeter.start(callback, errorLog); has inconsistent behavior on Android and iOS.

On Android the DBMeter will be restartet and is listening.
On iOS the DBMeter wont be restartet, and does not throw an error.

I'd love to have a consistent behavior here. So you can rely on both platforms on the delete feature.

"Native: tried calling DBMeter.start, but the DBMeter plugin is not installed."

Hi everyone, I am trying to run the following code :

let subscription = this.dbMeter.start().subscribe(
data => console.log(data)
);

but I have this following error :

[ng] [console.warn]: "Native: tried calling DBMeter.start, but the DBMeter plugin is not installed."
[ng] [console.warn]: "Install the DBMeter plugin: 'ionic cordova plugin add cordova-plugin dbmeter'"
[ng] [console.warn]: "Native: tried calling DBMeter.stop, but the DBMeter plugin is not installed."
[ng] [console.warn]: "Install the DBMeter plugin: 'ionic cordova plugin add cordova-plugin-dbmeter'"
[ng] [console.error]: "ERROR" "plugin_not_installed"

here is the installation i did :

cordova plugin add cordova-plugin-add-swift-support
cordova plugin add cordova-plugin-dbmeter
npm install @ionic-native/db-meter

I put the following code in the config.xml file in the platform (ios) tag:

"
need microphone access to record sounds
"

and I did not forget to add in the providers "DBMeter" so I really don't understand the error

Can you please help me? (thank you)

Crashes on iOS – CordovaPlugins/DBMeter.swift:5: Fatal error

I’m implementing cordova-plugin-dbmeter through the Ionic Native wrapper (@ionic-native/db-meter). It works fine on Android, but on iOS, the plugin crashed when initialized. It builds fine in Xcode, though. And all other plugins (Capacitor, Ionic Native, Cordova) works just fine.

The error message I get is:

CordovaPlugins/DBMeter.swift:5: Fatal error: Use of unimplemented initializer ‘init(webViewEngine:)’ for class ‘CordovaPlugins.DBMeter’

And here it crashes:

image

I’ve tried using the plugin without the wrapper, but no success. I read that the plugin requires cordova-plugin-add-swift-support, but Capacitor doesn’t support the plugin cordova-plugin-add-swift-support and should provide the necessary Swift support anyway.

Anyone has got this to work, or have any ideas? Getting lots of gray hair over this.

cordova-plugin-dbmeter no provider for DBMeter

cordova-plugin-dbmeter no provider in Ionic 2 Application

import { DBMeter } from '@ionic-native/db-meter';

constructor(public platform: Platform, public dbMeter: DBMeter) {}

and in class ...

// Start listening
let subscription = this.dbMeter.start().subscribe(
    data => this.currentAmplitude = data
);

Gives this error!

Runtime Error
Error in ./MyApp class MyApp - inline template:19:0 caused by: No provider for DBMeter!
Stack
Error: No provider for DBMeter!
    at NoProviderError.BaseError [as constructor] (http://localhost:8100/build/main.js:8347:34)
    at NoProviderError.AbstractProviderError [as constructor] (http://localhost:8100/build/main.js:52946:16)
    at new NoProviderError (http://localhost:8100/build/main.js:52977:16)
    at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/main.js:98815:19)
    at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/main.js:98843:25)
    at ReflectiveInjector_._getByKey (http://localhost:8100/build/main.js:98806:25)
    at ReflectiveInjector_.get (http://localhost:8100/build/main.js:98615:21)
    at AppModuleInjector.NgModuleInjector.get (http://localhost:8100/build/main.js:53648:52)
    at CompiledTemplate.proxyViewClass.AppView.injectorGet (http://localhost:8100/build/main.js:99357:45)
    at CompiledTemplate.proxyViewClass.DebugAppView.injectorGet (http://localhost:8100/build/main.js:99599:49)
Ionic Framework: 2.1.0
Ionic Native: 2.4.1
Ionic App Scripts: 1.1.3
Angular Core: 2.2.1
Angular Compiler CLI: 2.2.1
Node: 7.2.1
OS Platform: Windows 8.1
Navigator Platform: Win32
User Agent: Mozilla/5.0 (Linux; Android 5.0; SM-G900P Build/LRX21T) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Mobile Safari/537.36

Any solutions on this? I´m missing something ?

Thankx a lot

Compile error in Xcode 8.3

Hello,
Thank you for this cool plugin. We've used it to build a Cordova app detecting people breath.
It is working as expected in Androïd, and for iOS only in debug version. We are going to publish the app on the app store and when we want to build the release version, Xcode 8.3 wants us to upgrade to Swift 3 :/
After doing the upgrade, we have the following errors :

  • Value of type ‘dispatchSource’ has no member ‘setTimer’
  • Heterogeneous collection literal could only be inferred to ‘String : any’; add explicit type annotation if this is intentional

Is there a way to resolve that and publish the app ? ... we are really annoyed (thanks Apple grrr...)

Thanks in advance !

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.