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

Getting MissingPluginException. #11

Open
chrislaurie-io opened this issue Jun 17, 2021 · 7 comments
Open

Getting MissingPluginException. #11

chrislaurie-io opened this issue Jun 17, 2021 · 7 comments

Comments

@chrislaurie-io
Copy link

Calling in code FlutterBeep.beep(): Throwse this error in platform_channel.dart:

MissingPluginException(No implementation found for method stopSysSound on channel flutter_beep))

@dnsprado
Copy link

dnsprado commented Jul 3, 2021

Hi guys, got same issue here. Also tried FlutterBeep.playSysSound(AndroidSoundIDs.TONE_CDMA_ABBR_ALERT) and got the same error.

@kbaylosis
Copy link

Do this in your MainActivity.kt

import com.gonoter.flutter_beep.FlutterBeepPlugin  // Add this

class MainActivity: FlutterActivity() {
	override fun onCreate(savedInstanceState: Bundle?) {
		super.onCreate(savedInstanceState);
		
		FlutterBeepPlugin.registerWith(registrarFor("com.gonoter.flutter_beep.FlutterBeepPlugin")); // Add this
	}
}

@danielle-h
Copy link

@kbaylosis this didn't work for me, still getting the same error.

@kbaylosis
Copy link

@danielle-h what version of flutter are you using? that code i provided no longer applies in the latest flutter

@danielle-h
Copy link

@kbaylosis I was using the latest flutter at the time. I haven't tried it since, I used a different solution to get a beep in my app.

@danielle-h
Copy link

@kbaylosis I tested it now, it's working great, thanks!

@thanhbinh84
Copy link

For java

import com.gonoter.flutter_beep.FlutterBeepPlugin;
import io.flutter.plugin.common.PluginRegistry;
import io.flutter.plugin.common.PluginRegistry.PluginRegistrantCallback;

public class MainActivity extends FlutterActivity implements PluginRegistrantCallback {
    @Override
    public void registerWith(PluginRegistry registry) {
        FlutterBeepPlugin.registerWith(registry.registrarFor("com.gonoter.flutter_beep.FlutterBeepPlugin"));
    }
}

The exception's gone but still don't heard any sound.

FlutterBeep.beep(false);
FlutterBeep.playSysSound(AndroidSoundIDs.TONE_CDMA_ABBR_ALERT);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants