Giter VIP home page Giter VIP logo

headset_connection_event's Introduction

G'day! ๐Ÿ‘จ๐Ÿพโ€๐Ÿ’ป

I am Raf and I've been building software and mobile apps in Australia for more than 10 years ๐Ÿ‘ด๐Ÿพ


Recent Projects

Here are some projects that I've been involved with in the last few years.


Collaboration

Are you looking to partner up on building beautiful apps? Hit me up on Linkedin!

headset_connection_event's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

headset_connection_event's Issues

Not building with AGP8

Hello. can you update your lib to agp 8?

Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
Running Gradle task 'assembleDebug'...

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':headset_connection_event'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

     If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant.

You should add namespace to gradle.build like this

android {
  // Conditional for compatibility with AGP <4.2.
  if (project.android.hasProperty("namespace")) {
    namespace 'com.example.app'
  }
...
}

and remove manifest.package from AndroidManifest.xml

Is There RemoveListener?

I'm using this package very well, thanks.
but I'm curious about removeListener.
just found addListener.

how can i handle about listener ?

3.0.0 is depending on outdated permission_handler package

First of all, I really love your work.
Would you consider upgrade permission_handler to a newer version, or update a headset_connection_event without permission_handler package. Thanks a lot.

Because headset_connection_event >=3.0.0 depends on permission_handler ^10.0.1 and you_arrived_app depends on permission_handler ^11.0.1, headset_connection_event >=3.0.0 is forbidden.
So, because you_arrived_app depends on headset_connection_event ^3.0.0, version solving failed.


You can try one of the following suggestions to make the pubspec resolve:
* Consider downgrading your constraint on headset_connection_event: flutter pub add headset_connection_event:^2.1.1
* Consider downgrading your constraint on permission_handler: flutter pub add permission_handler:^10.4.5

[Android] Does not work when targetSdkVersion is set to 31+

To replicate: Open example, change targetSdkVersion to 31 (or 32) in build.gradle, make the necessary changes in AndroidManifest, and build.

You will have to make these minor adjustments in AndroidManifest
Under "<activity
android:exported="true"

And make this the intent-filter

     <receiver
            android:name="flutter.moum.headset_event.HeadsetBroadcastReceiver"
            android:exported="true" >
            <intent-filter>
                <action android:name="android.intent.action.HEADSET_PLUG" />
                <action android:name="android.intent.action.MEDIA_BUTTON" />
            </intent-filter>
        </receiver>

This will allow you to successfully build the release onto your device. However, the listener does not work at all. It simply does not respond to bluetooth connect/disconnect events. Setting TargetSdkVersion to 30, even while keeping the above manifest changes, fixes the problem entirely. This is on an Android 12 device.

Not working for Type C headset

The package don't work on Type C headphones , especailly all Headphones on android 12 , 13
new Android phones only have Type C socket , I made sure that app have the permession of "HeadsetPlugin.requestPermission(); "
but I think it's asking for wrong permissons " not bluetooth I think " .

I added required receiver to androidmanifest . and uses-permissions

tested on android 10 which doesn't require permission , didn't work too .

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.