File tree Expand file tree Collapse file tree 4 files changed +45
-31
lines changed
src/main/java/com/margelo/nitro/ahap Expand file tree Collapse file tree 4 files changed +45
-31
lines changed Original file line number Diff line number Diff line change @@ -24,8 +24,6 @@ apply plugin: "com.android.library"
2424apply plugin : " kotlin-android"
2525apply from : ' ../nitrogen/generated/android/ahap+autolinking.gradle'
2626
27- apply plugin : " com.facebook.react"
28-
2927def getExtOrIntegerDefault (name ) {
3028 return rootProject. ext. has(name) ? rootProject. ext. get(name) : (project. properties[" Ahap_" + name]). toInteger()
3129}
Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ class Ahap : HybridAhapSpec() {
77 override val memorySize: Long
88 get() = 0L
99
10+ private var hapticsEnabled: Boolean = true
11+
1012 override fun startHaptic (events : Array <HapticEvent >, curves : Array <HapticCurve >) {
1113 // TODO: Android haptics implementation not yet supported
1214 }
@@ -42,4 +44,28 @@ class Ahap : HybridAhapSpec() {
4244 override fun destroyContinuousPlayer (playerId : String ) {
4345 // TODO: Android haptics implementation not yet supported
4446 }
47+
48+ // MARK: - Global Haptics Enable/Disable
49+
50+ override fun setHapticsEnabled (enabled : Boolean ) {
51+ hapticsEnabled = enabled
52+ }
53+
54+ override fun getHapticsEnabled (): Boolean {
55+ return hapticsEnabled
56+ }
57+
58+ // MARK: - System Haptics (Predefined OS-level feedback)
59+
60+ override fun triggerImpact (style : HapticImpactStyle ) {
61+ // TODO: Android haptics implementation not yet supported
62+ }
63+
64+ override fun triggerNotification (type : HapticNotificationType ) {
65+ // TODO: Android haptics implementation not yet supported
66+ }
67+
68+ override fun triggerSelection () {
69+ // TODO: Android haptics implementation not yet supported
70+ }
4571}
Original file line number Diff line number Diff line change 1212 "preinstall" : " cd .. && bun install && cd example"
1313 },
1414 "dependencies" : {
15+ "semver" : " ^7.6.0" ,
1516 "@expo/vector-icons" : " ^15.0.3" ,
1617 "@react-native-community/slider" : " ^5.1.1" ,
1718 "@react-native-segmented-control/segmented-control" : " ^2.5.7" ,
You can’t perform that action at this time.
0 commit comments