Coder Social home page Coder Social logo

istornz / flutter_gaimon Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 6.0 546 KB

A Flutter plugin to fully support Haptic feedback with custom pattern 📳

License: MIT License

Kotlin 21.74% Ruby 10.41% Swift 31.95% Objective-C 3.10% Dart 32.80%
android dart flutter flutter-plugin haptic-feedback ios

flutter_gaimon's Introduction

Hello 👋 it's me Dimitri 🐧

https://x.com/iPhoneRetro https://dimitridessus.fr/ https://www.youtube.com/user/theiphoneretro

Fullstack mobile apps developer 📱

In love with Flutter & Dart



My Skills


flutter_gaimon's People

Contributors

dimapparence avatar ductranminh avatar fauconspartiate avatar istornz 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

Watchers

 avatar

flutter_gaimon's Issues

Not working on IOS

I copy pasted the example code but for some reason tapping on them does nothing on iPhone 6s+ 15.4.1 I even went into settings and made sure vibration was on

Sound 2 Haptic

I see it's been on the roadmap for quite some time. Any plans to implement this?
Thanks

MissingPlugin error on Android

On Android I am receiving MissingPluginException (MissingPluginException(No implementation found for method canSupportsHaptic on channel gaimon)) when calling await Gaimon.canSupportsHaptic;. Haptics do work on my phone; should this method only be used for iOS?

Error building APK

Got this error after build:

* What went wrong:
A problem occurred configuring project ':gaimon'.
> 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.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1s
Running Gradle task 'assembleRelease'...                         1.662ms
Gradle task assembleRelease failed with exit code 1

Flutter Doctor:

[✓] Flutter (Channel stable, 3.16.8, on Fedora Linux 36 (KDE Plasma) 5.18.13-200.fc36.x86_64, locale pt_BR.UTF-8)
    • Flutter version 3.16.8 on channel stable at /home/vicente/fvm/versions/3.16.8
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 67457e669f (10 days ago), 2024-01-16 16:22:29 -0800
    • Engine revision 6e2ea58a5c
    • Dart version 3.2.5
    • DevTools version 2.28.5

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /home/vicente/Android/Sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /opt/android-studio/jbr/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
    • clang version 14.0.5 (Fedora 14.0.5-2.fc36)
    • cmake version 3.26.3
    • ninja version 1.10.2
    • pkg-config version 1.8.0

[✓] Android Studio (version 2023.1)
    • Android Studio at /opt/android-studio
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.85.1)
    • VS Code at /usr/share/code
    • Flutter extension version 3.80.0

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Fedora Linux 36 (KDE Plasma) 5.18.13-200.fc36.x86_64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 116.0.5845.179

[✓] Network resources
    • All expected network resources are available.

• No issues found!

More context:

  • Gaimon version: ^1.2.1
  • Yes I have namespaces on my android manifest and my android namespace (build.gradle)
android {
    namespace '<mynamespace>'
   ...
}

Add .ahab support for Android

As stated in the readme.md, the support for .ahab files in Android is still missing. To support custom haptic behaviour based on .ahab files on all devices, a Android implementation should be provided as well.

I started on a Pull Request implementing .ahab support on Android. It still has some values that are missing based on the documentation of Apple. Also the only thing that is considered now is the Intensity of an event. The Sharpness is, as far as I know, not something that can be controlled with the vibration api of Android.

#10

@istornz What do you think of the current approach? I intend to add the implementation of missing values as well

Getting ERROR: Unable to add an additional player channel

I'm doing this app that will give haptic feedback when the user swipes on the screen. I put Gaimon.soft() in onPanUpdates gesture event, it worked well at first, but after a while i get this error:

[Feedback] failed to create player with pattern for <_UIFeedbackCoreHapticsHapticsOnlyEngine: 0x280f7aa00>: Error Domain=com.apple.CoreHaptics Code=-10851 "(null)"
[hapi]     CHHapticEngine.mm:1917  -[CHHapticEngine(CHHapticEngineInternal) getAvailableChannel:]: ERROR: Unable to add an additional player channel

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.